Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.