• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Code repository: Here   I registered my custom feature in FeatureRegistry.java and McbbsWiki.java.   FeatureRegistry.java: public static final DeferredRegister<Feature<?>> FEATURES = DeferredRegister.create(ForgeRegistries.FEATURES, "mcbbswiki"); public static RegistryObject<McbbsWikiLuckyBlockFeature> feature_lucky_block = FEATURES.register("feature_lucky_block", () -> new McbbsWikiLuckyBlockFeature(NoFeatureConfig.field_236558_a_));   McbbsWiki.java (the main class of this mod): FeatureRegistry.FEATURES.register( FMLJavaModLoadingContext.get().getModEventBus() );   But, when I used FeatureRegistry.feature_lucky_block.get() to get the object (in world.biome.McbbsWikiBiomeMaker.java:37), the game throwed a NullPointerException and crashed.   I found out "FeatureRegistry.feature_lucky_block.isPresent()" returned false and "FeatureRegistry.feature_lucky_block.value" is null, but do not know how to solve the problem.   The full logs are shown below.Please help me. latest.log crash-2021-01-20_15.04.42-fml.txt
    • The nubikcz mod is new weapon and foods NubikCZmod.jar
    • Hello, today I am posting this post because I have a problem. Indeed, I would like to make a more or less simple system but on which I have some difficulties. I would like to make sure that when a player clicks on another player with handcuffs (custom item therefore) that the handcuffs go into the breastplate slot where they normally find a piece of armor. The problem is, I can't get the player I clicked on. I would like to go through the "onRightclick" function which we put directly in the class of the item but if that is not possible it does not matter if we go through an event forge. FYI I have already tried both without success. Probably due to my inexperience. Thank you in advance ElpisII And PS: I said above that the item should be put in an armor slot. And I know I created a basic item and not an armor so that will have to be thought about.Class where I create the item: Item class : public class CloseHandcuffs extends Item implements IHasModel { public CloseHandcuffs(String name) { setUnlocalizedName(name); setRegistryName(name); setCreativeTab(CreativeTabs.MATERIALS); ItemInit.ITEMS.add(this); } @Override public void registerModels() { Main.proxy.registerItemRenderer(this, 0, "inventory"); } }  
    • @kiou.23     if you konw json its the better way you also can overide the loot tables with a datapack so i think its the better way. and I didn't know that there was this possibility. but I'm open to new things.
  • Topics

  • Who's Online (See full list)