Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. so your saying that I need to move all my Item = new Item() s into RegistryEvent.Register<Item> event
  2. Do you know why? I call setRegistryName(MOD_ID, name); does this change this?
  3. 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.
  4. 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
  5. 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?
  6. 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 }; }
  7. are you 100% sure you are running in Debug mode and not normal mode?
  8. 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
  9. 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!
  10. Try removing the mod that calls tries to create the entity - the Ultimate Pun Mod
  11. itemstack.damageItem(maxDamage / clipSize, playerIn); what are you trying to do here??
  12. 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?
  13. 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
  14. also put registerRender in ModelRegistryEvent using Subscribe Events so that it gets called at the proper time
  15. In this post I show how to make sure that Java 8 is being used
  16. Make sure that the server is the only app running and post your computer specs.
  17. He meant the entire log. Please post it.
  18. 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
  19. 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.