The third parameter of EntityRegistry#registerModEntity is its mod-specific ID, which is used to create the entity on the client. You use the same ID for both of your entities, so FML spawns the one that was registered first.
I recommend creating an int field to store the current/next ID and then using it and incrementing it each time you register an entity. You can see an example of this here.
I can't seem to find a *.zip file in the tabula folder in the mods folder. Should it be there? Also, is this true for tabula for minecraft 1.8.8 or just a newer version?
Tabula doesn't use the .zip extension for its project files, it uses .tbl. It's still a ZIP archive, though.
Animations were first added to Tabula in 1.7.10, they're still present in the 1.8.9 version.
It should be as simple as calling OBJLoader#addDomain in preInit from your client proxy to allow OBJ models to be loaded from your mod's resource doman and then specifying the models in the same way as normal but including the .obj extension in the model paths.
Overriding it to return a non-null value will fix this immediate problem, but you shouldn't be using IInventory or EntityPlayerMP#displayGUIChest at all. Use IItemHandler for your inventory and IGuiHandler to open your GUIs.
Something is sending an SPacketOpenWindow with "minecraft:container" as the GUI ID and null as the window title/display name.
The most likely source is the EntityPlayerMP#displayGUIChest method being called with an IInventory that doesn't implement IInteractionObject and returns null from IWorldNameable#getDisplayName*, e.g. an instance of your TileEntityBeehive class.
* IInventory extends IWorldNameable, TileEntity provides a matching getDisplayName method that returns null
Are you sure it's not working, or are you just not hearing the sounds?
SoundEvents.BLOCK_ANVIL_FALL uses the step/stone1-6 sound files, which are very quiet and short. Vanilla plays this sound event when a living entity falls on an anvil.
SoundEvents.BLOCK_ANVIL_LAND uses the random/anvil_land sound file, which is a much more distinctive "clang" sound. Vanilla plays this sound event when a falling anvil lands. Is this the sound you meant to use?
The World#playSound overloads with an EntityPlayer argument do the following:
On the logical server, they send a packet to every player except the one passed as an argument telling their clients to play the sound
On the logical client, they play the sound only if the player passed as an argument is the client player
If you pass a player argument, you need to call the method on both sides. If you pass null as the player argument, you only need to call it on the logical server.
You can't assume that the thrower will always be a player and you're only calling the method on the logical server, so just pass null as the player argument.
Do I need one such class for every entity or just one for everything?
You need at least one IRenderFactory implementation for each Render type. I recommend using a lamda/method reference (if you're targeting Java 8) or an anonymous class (if you're targeting Java 6/7) to implement IRenderFactory.
And where does the RenderManager instance come from? Do I create it when I call the class implementing IRenderFactory?
The RenderManager instance is passed to the IRenderFactory#createRenderFor method by Forge.
The whole point of IRenderFactory is that the Render instance isn't created until the RenderManager instance is created. Implementing IRenderFactory on your Render class defeats this.
You need to use a completely separate class to implement IRenderFactory.
So I put in the render manager argument, but there's some rendering problem, which makes the game crash. I looked at the log, but the only thing I understood was that the problem was related to the rendering of EntityGargoyleFire
The RenderManager you pass to the RenderGargoyleFire constructor was null, probably because you called it at the wrong time.
The correct way to register a Render is to call RenderingRegistry.registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) with an IRenderFactory implementation that creates and returns your Render instance. Use the RenderManager argument passed to the IRenderFactory rather than getting it from Minecraft.
EntityAIAttackMelee takes a double "speedIn": Is this used to make the entity accelerate when attacking?
If you look at the class, you'll see that it's assigned to the EntityAIAttackMelee#speedTowardsTarget field, which has the following doc comment:
/** The speed with which the mob will approach the target */
I did use a constructor of EntityAINearestAttackableTarget without the predicate targetSelector. It takes a boolean "checkSight": Does this mean whether the entity only attacks targets it can see?
Again, look at the field that it's assigned to:
/** If true, EntityAI targets must be able to be seen (cannot be blocked by walls) to be suitable targets. */
As for the drops it seems there is no more method for rare drops. Is that true?
It is. This is now handled in the appropriate loot tables instead.
0
The third parameter of EntityRegistry#registerModEntity is its mod-specific ID, which is used to create the entity on the client. You use the same ID for both of your entities, so FML spawns the one that was registered first.
I recommend creating an int field to store the current/next ID and then using it and incrementing it each time you register an entity. You can see an example of this here.
0
Tabula doesn't use the .zip extension for its project files, it uses .tbl. It's still a ZIP archive, though.
Animations were first added to Tabula in 1.7.10, they're still present in the 1.8.9 version.
0
It should be as simple as calling OBJLoader#addDomain in preInit from your client proxy to allow OBJ models to be loaded from your mod's resource doman and then specifying the models in the same way as normal but including the .obj extension in the model paths.
0
Use SlotItemHandler for your IItemHandler inventories.
Keep in mind that IItemHandler is a capability, you don't implement it on your TileEntity like IInventory.
0
Overriding it to return a non-null value will fix this immediate problem, but you shouldn't be using IInventory or EntityPlayerMP#displayGUIChest at all. Use IItemHandler for your inventory and IGuiHandler to open your GUIs.
0
Something is sending an SPacketOpenWindow with "minecraft:container" as the GUI ID and null as the window title/display name.
The most likely source is the EntityPlayerMP#displayGUIChest method being called with an IInventory that doesn't implement IInteractionObject and returns null from IWorldNameable#getDisplayName*, e.g. an instance of your TileEntityBeehive class.
* IInventory extends IWorldNameable, TileEntity provides a matching getDisplayName method that returns null
0
Always post the crash report or FML log when asking for help with a crash.
0
Are you sure it's not working, or are you just not hearing the sounds?
SoundEvents.BLOCK_ANVIL_FALL uses the step/stone1-6 sound files, which are very quiet and short. Vanilla plays this sound event when a living entity falls on an anvil.
SoundEvents.BLOCK_ANVIL_LAND uses the random/anvil_land sound file, which is a much more distinctive "clang" sound. Vanilla plays this sound event when a falling anvil lands. Is this the sound you meant to use?
0
The World#playSound overloads with an EntityPlayer argument do the following:
If you pass a player argument, you need to call the method on both sides. If you pass null as the player argument, you only need to call it on the logical server.
You can't assume that the thrower will always be a player and you're only calling the method on the logical server, so just pass null as the player argument.
0
Are they not being rendered or are they actually despawning?
You can enable rendering of entity bounding boxes with F3 + B, this should show you whether the entities are still there even if they're not visible.
0
Did you try looking at the World class or anywhere that previously used the method?
BiomeGenBase was renamed to Biome, World#getBiomeGenForCoords was renamed to World#getBiome.
0
IRenderFactory is a generic class, you should never use it without specifying its type argument.
Aside from that, your code looks correct. When are you calling RenderingRegistry.registerEntityRenderingHandler? It needs to be done in preInit.
0
You need at least one IRenderFactory implementation for each Render type. I recommend using a lamda/method reference (if you're targeting Java 8) or an anonymous class (if you're targeting Java 6/7) to implement IRenderFactory.
The RenderManager instance is passed to the IRenderFactory#createRenderFor method by Forge.
0
The whole point of IRenderFactory is that the Render instance isn't created until the RenderManager instance is created. Implementing IRenderFactory on your Render class defeats this.
You need to use a completely separate class to implement IRenderFactory.
0
The RenderManager you pass to the RenderGargoyleFire constructor was null, probably because you called it at the wrong time.
The correct way to register a Render is to call RenderingRegistry.registerEntityRenderingHandler(Class<T>, IRenderFactory<? super T>) with an IRenderFactory implementation that creates and returns your Render instance. Use the RenderManager argument passed to the IRenderFactory rather than getting it from Minecraft.
If you look at the class, you'll see that it's assigned to the EntityAIAttackMelee#speedTowardsTarget field, which has the following doc comment:
Again, look at the field that it's assigned to:
It is. This is now handled in the appropriate loot tables instead.