Posted January 22, 201510 yr I currently have 2 throwable entities made, but for some reason I cannot render both at once. For some reason, the one RenderSnowball I have renders for all entity throwable. Although, when I spawn multiple of the entities at once, it is half correct, half incorrect textures. Here is how I register them RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderSnowball(ItemManager.grenade)); RenderingRegistry.registerEntityRenderingHandler(Caterpillar.class, new RenderCaterpillar(new ModelCaterpillar(), 0)); RenderingRegistry.registerEntityRenderingHandler(Coyote.class, new RenderCoyote(new ModelCoyote(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityPepperSpray.class, new RenderSpray()); Is there any way I can fix this problem? If I can't fix it using RenderSnowball, is there any way I can make a 2D model? Thanks for your help.
January 22, 201510 yr Have you registered the entities? You should register them with EntityRegistry.registerModEntity and EntityList.addMapping Romejanic Creator of Witch Hats, Explosive Chickens and Battlefield!
January 24, 201510 yr Author No matter what I try, it renders it as the grenade, and even does the particles of the grenade as well
January 24, 201510 yr Author This is how I register it public static void registerEntity() { createEntity(Caterpillar.class, "Caterpillar", 0x66FF00, 0x000000); createEntity(Coyote.class, "Coyote", 0x5E0F0F, 0 ); createEntity(EntityGrenade.class, "Grenade"); createEntity(EntityPepperLightning.class, "Peppa Lightning"); createEntity(EntityPepperSpray.class, "Pepper Spray"); }//end registerEntity public static void createEntity(Class entityClass, String entityName) { int entityId = EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerModEntity(entityClass, entityName, entityId, MainRegistry.modInstance, 64, 1, true); }
January 24, 201510 yr Author This is the one I use for Mob/Animal entities. Also, if I get rid of the findUniqueGlobalEntityID, It doesn't work public static void createEntity(Class entityClass, String entityName, int solidColor, int spotColor) { int entityId = EntityRegistry.findGlobalUniqueEntityId(); EntityRegistry.registerGlobalEntityID(entityClass, entityName, entityId); EntityList.entityEggs.put(Integer.valueOf(entityId), new EntityList.EntityEggInfo(entityId, solidColor, spotColor)); }
January 25, 201510 yr Author I was just saying the other method is for the animals, but I still changed it to 1 and its not working
January 25, 201510 yr Author Ok, thanks for helping. Maybe I will try changing it to a projectile, not entity throwable
January 25, 201510 yr Author Oh wow, it wasn't working because I didn't have a world method in the entity class
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.