Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. True Mod 1 shouldn't cache a value till they are in the init event.
  2. I personally think that this is the job of the person who has overriden the object.
  3. I'm just saying that the @ObjectHolder annotation is not required for that, I didn't clarify. All Items and Blocks can be overridden without it. Via the same methods, reflection. The only bonus @ObjectHolder would add is not being required to have the mod in which you are overriding, but then overriding that block/item wouldn't make sense. Plus you would have to depend on the mod in the first place because your Block/Item should extend the same parents to allow for the inheritance to stay the same for compatibility. And if you didn't want to depend on the mod you could just use a system similar to the @SidedProxy which you would have to anyways due to the inheritance thing.
  4. You will need a custom capability to store your information then you will need to override the methods that decide such things(getDamage, getStrVsBlock)
  5. Do you have an pack.mcmeta file? Is your lang file located in assets/modid/lang/?
  6. If you are doing the second method I posted then you could do. list.add(BLOCK1 = new Block(...).set...);
  7. I believe you need a blockstate for your item. Yes they can have them too.
  8. Look at how all other entities render their models.
  9. Isnt there a method in either the event or the DamageSource called getSource or getTrueSource that return an Entity.
  10. Does not equal Mine is a method yours is a static initializer. A way to test this would be to make your variables final. If you use your code it won't have a syntax error. Whereas if you use mine it will.
  11. Also we aren't going to blindly help you do something that might be illegal. Plus there is always the chance that there is another method.
  12. Maybe, but the reason why it isn't allowed is because the nether portal overlay when you are inside it is gui and so is the chat. You would have to replace the portal gui and add a chat functionality.
  13. There are two ways. I'll show you the "better one" first. @ModeventSub class RegistryHandler { @SubscribeEvent static void registerBlock(Register<Block> reg) { Block[] BLOCKS = new Block[]{new Block(...).setRegistryName("block1").set..., new Block(...).setRegistryName("BLOCK2").set...}; reg.register(BLOCKS); } } @ObjectHolder(MODID) class Blocks { public static final BLOCK1 = null; public static final BLOCK2 = null; } Then there is this method. @EventBusSub class RegistryHandler { @SubscribeEvent static void registerBlocks(Register<Block> reg) { BLOCKS.init(); // Register blocks. } } class Blocks { public static Block BLOCK1; public static Block BLOCK2; static void init() { BLOCK1 = new Block(...).set... BLOCK2 = new Block(...).set... } } You can added them to an array or a collection and then use that to register them if you want.
  14. Well he gave you the documentation which is equivalent to what you want.
  15. Use the RenderPlayerEvent.Post and render your hair there when you want to.
  16. It's a forge thing. In a lot of other games or programming contexts it would be fine, but when you set your registry name if you do not use the overload that accepts a modid as well as the actual name, forge will have trouble knowing for what mod it is registering it for. This is due to how static initialization is done.
  17. Actually there is one other thing you could do. You could override the HOPPER block and therefore the HOPPER TileEntity, or just the TileEntity.
  18. You will have to use the WorldTickEvent and iterate through all of the loaded tile entities and have a cache of the ItemStacks in stored elsewhere and compare them every tick.
  19. First copy the code within the method registerModels from one of your classes. Second paste it in place of the call to the method. Thirdly correct any errors, IE instead of Item.getItemFromBlock(this) do Item.getItemFromBlock(block). Finally delete the IHasModel file and remove all references to it.
×
×
  • Create New...

Important Information

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