Posted February 18, 20205 yr Hey, I am trying to follow a tutorial to make custom entities in Minecraft. The tutorial I am following was written in 1.14.4 and entity registering seems to have been updated. When following the tutorial, I get the error The method registerEntityRenderingHandler(EntityType<T>, IRenderFactory<? super T>) in the type RenderingRegistry is not applicable for the arguments (Class<TutorialEntity>, TutorialEntityRender.RenderFactory) from public class TutorialRenderRegistry { public static void registryEntityRenders() { RenderingRegistry.registerEntityRenderingHandler(TutorialEntity.class, new TutorialEntityRender.RenderFactory()); } } TutorialEntity: public class TutorialEntity extends CreatureEntity { public TutorialEntity(EntityType<? extends CreatureEntity> type, World world) { super((EntityType<? extends CreatureEntity>) TutorialEntities.TUTORIAL_ENTITY, world); } @Override protected void registerGoals() { this.goalSelector.addGoal(0, new SwimGoal(this)); this.goalSelector.addGoal(1, new RandomWalkingGoal(this, 1.2d)); this.goalSelector.addGoal(2, new LookRandomlyGoal(this)); } @Override protected void registerAttributes() { // TODO Auto-generated method stub super.registerAttributes(); this.getAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0d); this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(1.2d); } } TutorialEntityRenderer: public class TutorialEntityRender extends LivingRenderer<TutorialEntity, TutorialEntityModel> { public TutorialEntityRender(EntityRendererManager manager) { super(manager, new TutorialEntityModel(), 0F); // TODO Auto-generated constructor stub } @Override public ResourceLocation getEntityTexture(TutorialEntity entity) { // TODO Auto-generated method stub return TutorialModRegistries.location("textures/entity/tutorial_entity.png"); } public static class RenderFactory implements IRenderFactory<TutorialEntity> { @Override public EntityRenderer<? super TutorialEntity> createRenderFor(EntityRendererManager manager) { // TODO Auto-generated method stub return new TutorialEntityRender(manager); } } } Thanks for any help provided!
February 18, 20205 yr 8 hours ago, TeknoServal said: Hey, I am trying to follow a tutorial to make custom entities in Minecraft. The tutorial I am following was written in 1.14.4 and entity registering seems to have been updated. When following the tutorial, I get the error The method registerEntityRenderingHandler(EntityType<T>, IRenderFactory<? super T>) in the type RenderingRegistry is not applicable for the arguments (Class<TutorialEntity>, TutorialEntityRender.RenderFactory) from public class TutorialRenderRegistry { public static void registryEntityRenders() { RenderingRegistry.registerEntityRenderingHandler(TutorialEntity.class, new TutorialEntityRender.RenderFactory()); } } TutorialEntity: public class TutorialEntity extends CreatureEntity { public TutorialEntity(EntityType<? extends CreatureEntity> type, World world) { super((EntityType<? extends CreatureEntity>) TutorialEntities.TUTORIAL_ENTITY, world); } @Override protected void registerGoals() { this.goalSelector.addGoal(0, new SwimGoal(this)); this.goalSelector.addGoal(1, new RandomWalkingGoal(this, 1.2d)); this.goalSelector.addGoal(2, new LookRandomlyGoal(this)); } @Override protected void registerAttributes() { // TODO Auto-generated method stub super.registerAttributes(); this.getAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(20.0d); this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(1.2d); } } TutorialEntityRenderer: public class TutorialEntityRender extends LivingRenderer<TutorialEntity, TutorialEntityModel> { public TutorialEntityRender(EntityRendererManager manager) { super(manager, new TutorialEntityModel(), 0F); // TODO Auto-generated constructor stub } @Override public ResourceLocation getEntityTexture(TutorialEntity entity) { // TODO Auto-generated method stub return TutorialModRegistries.location("textures/entity/tutorial_entity.png"); } public static class RenderFactory implements IRenderFactory<TutorialEntity> { @Override public EntityRenderer<? super TutorialEntity> createRenderFor(EntityRendererManager manager) { // TODO Auto-generated method stub return new TutorialEntityRender(manager); } } } Thanks for any help provided! If you are using a Tutorial of Harry Talks, then your EntityType is in the same location as you make your spawnegg and the Loop for making spawn the entities in the World. New in Modding? == Still learning!
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.