Posted October 26, 20213 yr Hi i'm trying to make a new entity in my mod however i can't find the class GlobalEntityTypeAttributes in 1.17.1. I think it got renamed but after hours of research i can't find it at all here is what i'm trying to do in my mod main class : private void setup(final FMLCommonSetupEvent event) { DeferredWorkQueue.runLater(() -> { GlobalEntityTypeAttributes.put(ModEntityType.ENTITY.get(), Entity.setCustomAttributes().create()); }); } Can someone help me ?
October 28, 20213 yr Author I did that @SubscribeEvent public static final void entityClientRederer(EntityRenderersEvent.RegisterRenderers event) { event.registerEntityRenderer(EntityInit.SLEEPING_PLAYER.get(), SleepingPlayerRenderer::new); } But it says that : The type SleepingPlayerRenderer does not define SleepingPlayerRenderer(EntityRendererProvider.Context) that is applicable here can you help me ? Thank you btw diesieben07
October 28, 20213 yr Author I know that the problem is here but i don't know what to change ... public class SleepingPlayerRenderer extends MobRenderer<SleepingPlayerEntity, SleepingPlayerModel<SleepingPlayerEntity>> { protected static final ResourceLocation Texture = new ResourceLocation(DreamyMain.MOD_ID, "textures/entity/sleeping_player.png"); public SleepingPlayerRenderer(Context p_174304_, SleepingPlayerModel<SleepingPlayerEntity> p_174305_) { super(p_174304_, p_174305_, 0.7f); } @Override public ResourceLocation getTextureLocation(SleepingPlayerEntity p_114482_) { // TODO Auto-generated method stub return Texture; } }
October 28, 20213 yr Author The tutorial i'm following has EntityRendererManager instead of context ( net.minecraft.client.renderer.entity.EntityRendererProvider.Context) but it doesn't exists anymore
October 28, 20213 yr Author The second parameter aka the problem is an entityRendererProvider The renderer provider, can be a lambda like MyRenderer::new. What i sent to him was a lambda. So i really don't know whats the problem.
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.