Posted February 7, 20178 yr My custom entities are sometimes rendered correctly, but most of the time invisible. By this I mean: I can see them, they wander a bit, they are invisble and eventually they reappear. Im am sure that they're are still there in the meantime, because they still make sounds and some of my mobs which have AI to attack each other still do so and hence drop items. That is what I call in preInit of my ClientProxy: RenderingRegistry.registerEntityRenderingHandler(EntityGargoyle.class, new EntityGargoyleRF()); That's the implementation of IRenderFactory: Spoiler package anagkai.biodiversity.entities.renderer; import anagkai.biodiversity.entities.EntityGargoyle; import anagkai.biodiversity.entities.models.ModelGargoyle; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraftforge.fml.client.registry.IRenderFactory; public class EntityGargoyleRF implements IRenderFactory<EntityGargoyle>{ @Override public RenderGargoyle createRenderFor(RenderManager manager) { return new RenderGargoyle(manager, new ModelGargoyle(), 1F); } } That's my render class: Spoiler package anagkai.biodiversity.entities.renderer; import anagkai.biodiversity.entities.models.ModelAnt; import anagkai.biodiversity.entities.models.ModelGargoyle; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class RenderGargoyle extends RenderLiving { public RenderGargoyle(RenderManager manager, ModelGargoyle model, float size) { super(manager, model, size); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return new ResourceLocation("biodiversity:textures/gargoyle.png"); } } The only problem is that the entities are often invisible. When they aren't they're rendered correctly with model and texture. Any help is appreciated. EDIT: Strangely, I can "trap" the invisible entities in small holes so they become visible again or when I spawn them in a small hole they stay visible for a longer time. Edited February 7, 20178 yr by Anagkai
February 7, 20178 yr Author That is in a separate class for my entities, the static method inside is called in preInit of my main mode file. EntityRegistry.registerModEntity(EntityGargoyle.class, "biodiversityGargoyle", 0, Biodiversity.MODID, 1, 1, true, 0x262626, 0x666666);
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.