Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

coxakil50

Members
  • Posts

    6
  • Joined

  • Last visited

coxakil50's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. The error is : [14:14:30] [modloading-worker-2/ERROR] [ne.mi.fm.ja.FMLModContainer/LOADING]: Failed to create mod instance. ModID: skysagamod, class com.Destiny.skysagamod.CMain java.lang.ExceptionInInitializerError: null at com.Destiny.skysagamod.CMain.<init>(CMain.java:26) ~[?:?] {re:classloading} at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_181] {} at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_181] {} at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_181] {} at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_181] {} At this line in CMain class I have : RegistryHandler.init(); When I add // in RegistryHandler before public static final RegistryObject<Item> ROCK_BLOCK_ITEM = Items.register("rock_Block", () -> new BlockItemBase(ROCK_BLOCK.get())); code compile so problem is with registration itemblock.
  2. BlockItem gets error and code does not compile.
  3. I'm starting recently with making simple mod. I add new block but i found problem with adding block item. Can someone help me with that ? This is my code : in RegistryHandler: public static final RegistryObject<Item> ROCK_BLOCK_ITEM = Items.register("rock_Block", () -> new BlockItemBase(ROCK_BLOCK.get())); in BlockItemBase: public class BlockItemBase extends BlockItem { public BlockItemBase(Block block) { super(block, new Item.Properties().group(CMain.Tab)); } }
  4. I create a class "ToolBase" where i implement IItemTier. In "RegistryHandler" class (where i create item) i wrote : "public static final RegistryObject<Item> SWORD = Items.register("sword", ToolBase::new)" In the "ToolBase" i wrote : public class ToolBase implements IItemTier { @Override public int getMaxUses() { return 0; } @Override public float getEfficiency() { return 0; } @Override public float getAttackDamage() { return 0; } @Override public int getHarvestLevel() { return 0; } @Override public int getEnchantability() { return 0; } @Override public Ingredient getRepairMaterial() { return null; } And I have an error, I don't know what I should add
  5. I don't know exactly how to add a durability and etc to item
  6. I'm starting recently with making simple mod. I add new items but i found problem with adding sword. Tutorials on the yt are to the oldest version of minecraft. Can someone help me with that ?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.