• 0

    posted a message on Entity Renders Wrong Model Despite The Model Being Rendered

    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.

    Posted in: Modification Development
  • 0

    posted a message on What do people use to make models?

    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.

    Posted in: Modification Development
  • 0

    posted a message on Need info on rendering OBJ as a block

    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.

    Posted in: Modification Development
  • 0

    posted a message on RuntimeException: TileEntity is missing a mapping

    I can't pass a TileEntity that doesn't implement IInventory to the constructor for a slot, can I?


    Use SlotItemHandler for your IItemHandler inventories.

    Keep in mind that IItemHandler is a capability, you don't implement it on your TileEntity like IInventory.
    Posted in: Modification Development
  • 0

    posted a message on RuntimeException: TileEntity is missing a mapping

    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.

    Posted in: Modification Development
  • 0

    posted a message on RuntimeException: TileEntity is missing a mapping

    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

    Posted in: Modification Development
  • 0

    posted a message on Crash On Attempt to View Custom Creative Tab

    Always post the crash report or FML log when asking for help with a crash.

    Posted in: Modification Development
  • 0

    posted a message on The case of the missing ricochet effects.

    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?

    Posted in: Modification Development
  • 0

    posted a message on The case of the missing ricochet effects.

    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.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Questions on entity rendering, drops and AI

    I specified the type argument. It is called in preInit.


    Now the entities are visible part of the time? Like when I spawn them they are rendered correctly, then they move around a bit and disappear...


    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.
    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] How to get biome from coords?

    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.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Questions on entity rendering, drops and AI

    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.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Questions on entity rendering, drops and AI

    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.
    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Questions on entity rendering, drops and AI

    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.

    Posted in: Modification Development
  • 0

    posted a message on [SOLVED] Questions on entity rendering, drops and AI

    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


    log


    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.
    Posted in: Modification Development
  • To post a comment, please .