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!