Jump to content

Issue with entity renderer, game crashes when I try spawning custom entity.


Recommended Posts

I have tried to add a custom entity to my mod but when I run the mod I get this error:

No renderer registered for bigbadboybob2:caveman_entity

When I then try to spawn this entity main game crashes.


Here is my code for the renderer:

package lucas.MoeMobsMod.client.render;

import lucas.MoeMobsMod.MainMod;
import lucas.MoeMobsMod.client.models.CavemanModel;
import lucas.MoeMobsMod.entities.Caveman;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.entity.LivingRenderer;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.client.registry.IRenderFactory;

public class CavemanEntityRender extends LivingRenderer<Caveman, CavemanModel> {
	public CavemanEntityRender(EntityRendererManager manager) {
		super(manager, new CavemanModel(), 0f);

	public ResourceLocation getEntityTexture(Caveman entity) {
		return MainMod.Location("textures/entity/caveman_entity.png");
	public static class RenderFactory implements IRenderFactory<Caveman> {

		public EntityRenderer<? super Caveman> createRenderFor(EntityRendererManager manager) {
			return new CavemanEntityRender(manager);



and here is my code for the render registry:

package lucas.MoeMobsMod.client.render;

import lucas.MoeMobsMod.lists.EntityList;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.fml.client.registry.RenderingRegistry;

public class CavemanEntityRenderRegistry {
	public static void registerEntityRenders() {
		RenderingRegistry.registerEntityRenderingHandler(EntityList.caveman_entity, new CavemanEntityRender.RenderFactory());



Link to comment
Share on other sites

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.

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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