Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. @diesieben07 I'll do that then, thanks!
  2. so your saying that I need to move all my Item = new Item() s into RegistryEvent.Register<Item> event
  3. Do you know why? I call setRegistryName(MOD_ID, name); does this change this?
  4. I've never had any problems doing this, and I mis-spoke, this is how I am creating them, not how I'm registering them. Registration is done this way @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event) { event.getRegistry().registerAll(cadiboo.wiptech.init.Items.ITEMS); //... blocks & ore dict } Does this still break stuff? I've never had a single problem with this method.
  5. Personally, I think the first way is great because it allows you to instantiate the same class multiple times with different names. Isn't this the ultimate reduction of code? for example over half my items are instantiated in this way public static final ItemBase TITANIUM_NUGGET = new ItemBase("titanium_nugget").setNugget().setBeaconPayment(); Or even this way public static final ItemTool COPPER_SHOVEL = new ItemTool("copper_shovel", ItemTool.COPPER, ItemTool.SPADE_EFFECTIVE_ON, ToolTypes.SHOVEL); this allows me to have 1 class for all my tools, 1 class for all my armor, 1 class for all my normal items (ingots, nuggets etc.) and very few other classes
  6. yeah it is an odd way to do it, but it places all your registration logic in one file. Whats wrong with putting public Blah() { super(); this.setRegistryName(new ResourceLocation(Reference.ID, "blah")); this.setUnlocalizedName("blah"); } in every class?
  7. I don't know if this is what you were looking for but this is how I instantiate my items public class ModItems { public static final ItemFlamethrower FLAMETHROWER = new ItemFlamethrower("flamethrower"); public static final ItemHammer HAMMER = new ItemHammer("hammer"); public static final ItemRailgun RAILGUN = new ItemRailgun("railgun"); public static final ItemCoilgun COILGUN = new ItemCoilgun("coilgun"); public static final ItemPlasmagun PLASMA_GUN = new ItemPlasmagun("plasmagun"); public static final Item[] ITEMS = { FLAMETHROWER, HAMMER, RAILGUN, COILGUN, PLASMA_GUN }; }
  8. are you 100% sure you are running in Debug mode and not normal mode?
  9. This is a known bug, but I get it about 2/3 times I launch the Dedicated server (usually in Eclipse Workspace, usually in debug mode), thought that these screenshots might help Log
  10. 1.7.10 is no longer supported on this forum - Update to a more recent version for support heres a list of things to look at that may help you fix your problem, best of luck!
  11. Full crash log please
  12. Try removing the mod that calls tries to create the entity - the Ultimate Pun Mod
  13. itemstack.damageItem(maxDamage / clipSize, playerIn); what are you trying to do here??
  14. public abstract class ItemGun extends Item why abstract? public abstract void shoot(World worldIn, EntityPlayer playerIn, EnumHand handIn); why is it abstract and why doesn't it do anything?
  15. look at how ItemBow does it noticed that your already trying to do it the same way can you post a GitHub? your ItemGun class is rather hard to read Ignore this post
  16. also put registerRender in ModelRegistryEvent using Subscribe Events so that it gets called at the proper time
  17. Do you have a GitHub you can link?
  18. In this post I show how to make sure that Java 8 is being used
  19. Make sure that the server is the only app running and post your computer specs.
  20. He meant the entire log. Please post it.
  21. Yes it is necessary, you might be able to add them back in later, once you've found what mod(s) are causing the crash
  22. first get your registration working, then try to make your block do something. Off the top of my head onBlockActivated is called when you right-click the block and is used to usually open GUIs. If you do anything inside onBlockActivated, return true. otherwise return false For example: Crafting Tables open the crafting table GUI and return true. Heres the code from the base Block.class and from BlockWorkbench.class
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.