Posted September 19, 20196 yr I'm having an interesting problem where a nameplate appears above my wyrmling mobs when they spawn and it says "Wyrmling" of course. I have no clue what I'm doing wrong. Has anyone had this problem before? What's the fix? I'll post my code later when I'm home.
September 20, 20196 yr Author 19 hours ago, diesieben07 said: Your code would be needed, especially your renderer class. Here is the EntityWyrmling Class: Quote public class EntityWyrmling extends EntityCaveSpider { public EntityWyrmling(World worldIn) { super(worldIn); } @Override protected SoundEvent getAmbientSound() { return SoundEvents.ENTITY_SILVERFISH_AMBIENT; } @Override protected SoundEvent getHurtSound(DamageSource damageSourceIn) { return SoundEvents.ENTITY_SILVERFISH_HURT; } @Override protected SoundEvent getDeathSound() { return SoundEvents.ENTITY_SILVERFISH_DEATH; } @Override protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.28D); this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(16.0D); this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(4.0D); } @Override public EnumCreatureAttribute getCreatureAttribute() { return EnumCreatureAttribute.ARTHROPOD; } @Override protected ResourceLocation getLootTable() { return LootTableHandler.ZOMBUG; } } and here is the render class: Quote public class RenderWyrmling extends RenderLivingBase<EntityWyrmling>{ public static final ResourceLocation TEXTURES = new ResourceLocation(Reference.MOD_ID + ":textures/entity/wyrmling.png"); public RenderWyrmling(RenderManager renderManagerIn) { super(renderManagerIn, new ModelWyrmling(), 0.5f); } @Override protected ResourceLocation getEntityTexture(EntityWyrmling entity) { return TEXTURES; } @Override protected void applyRotations(EntityWyrmling entityWyrmling, float p_77043_2_, float rotationYaw, float partialTicks) { super.applyRotations(entityWyrmling, p_77043_2_, rotationYaw, partialTicks); } } And if you need it, here is my init class for entities: Quote public class EntityInit { public static void registerEntities() { registerEntity("scaleton", EntityScaleton.class, Reference.ENTITY_SCALETON, 24, 8598175, 6346362); registerEntity("zombug", EntityZombug.class, Reference.ENTITY_ZOMBUG, 32, 8598175, 6346362); registerEntity("wyrmling", EntityWyrmling.class, Reference.ENTITY_WYRMLING, 24, 8598175, 6346362); } public static void registerEntity(String name, Class<? extends Entity> entity, int id, int range, int color1, int color2) { EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + name), entity, name, id, Main.instance, range, 1, true, color1, color2); } } And I call this in my main, like this: Quote @EventHandler public static void PreInit(FMLPreInitializationEvent event) { GameRegistry.registerWorldGenerator(new ModWorldGen(), 3); DimensionInit.registerDimensions(); GameRegistry.registerWorldGenerator(new GenerateCustomStructures(), 3); BiomeInit.registerBiomes(); EntityInit.registerEntities(); RenderHandler.registerEntityRenders(); } And here is my register class for the renders: Quote public class RenderHandler { public static void registerEntityRenders() { RenderingRegistry.registerEntityRenderingHandler(EntityScaleton.class, new IRenderFactory<EntityScaleton>() { @Override @SideOnly(Side.CLIENT) public Render<? super EntityScaleton> createRenderFor(RenderManager manager) { return new RenderScaleton(manager); } }); RenderingRegistry.registerEntityRenderingHandler(EntityZombug.class, new IRenderFactory<EntityZombug>() { @Override @SideOnly(Side.CLIENT) public Render<? super EntityZombug> createRenderFor(RenderManager manager) { return new RenderZombug(manager); } }); RenderingRegistry.registerEntityRenderingHandler(EntityWyrmling.class, new IRenderFactory<EntityWyrmling>() { @Override @SideOnly(Side.CLIENT) public Render<? super EntityWyrmling> createRenderFor(RenderManager manager) { return new RenderWyrmling(manager); } }); } } The most interesting part to me is that I have 3 mobs, and neither of the other two have this problem. Edited September 20, 20196 yr by JonIsPatented
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.