Started by
Thermoza
on
Topic category: User side tutorials
This is a snippet of my renderer to allow my custom skeleton mob use the skeleton model with the armor rendered. The custom skeleton is called ArmoredSkeleton
package net.mcreator.earthdungeons.client.renderer; import net.minecraft.resources.ResourceLocation; import net.minecraft.client.renderer.entity.layers.HumanoidArmorLayer; import net.minecraft.client.renderer.entity.HumanoidMobRenderer; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.client.model.SkeletonModel; import net.mcreator.earthdungeons.entity.ArmoredSkeletonEntity; public class ArmoredSkeletonRenderer extends HumanoidMobRenderer<ArmoredSkeletonEntity, SkeletonModel<ArmoredSkeletonEntity>> { public ArmoredSkeletonRenderer(EntityRendererProvider.Context context) { super(context, new SkeletonModel(context.bakeLayer(ModelLayers.SKELETON)), 0.5f); this.addLayer(new HumanoidArmorLayer(this, new SkeletonModel(context.bakeLayer(ModelLayers.SKELETON_INNER_ARMOR)), new SkeletonModel(context.bakeLayer(ModelLayers.SKELETON_OUTER_ARMOR)))); } @Override public ResourceLocation getTextureLocation(ArmoredSkeletonEntity entity) { return new ResourceLocation("earth_dungeons:textures/skeleton.png"); } }
Can you do this with a different mob, like say Piglins?
How does it work?
I'm trying to replace some things in the code with values from my mod, but it don't work