minecraft-src/net/minecraft/client/renderer/entity/StrayRenderer.java
2025-07-04 01:41:11 +03:00

26 lines
1.2 KiB
Java

package net.minecraft.client.renderer.entity;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.client.renderer.entity.layers.SkeletonClothingLayer;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.monster.Stray;
@Environment(EnvType.CLIENT)
public class StrayRenderer extends SkeletonRenderer<Stray> {
private static final ResourceLocation STRAY_SKELETON_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/skeleton/stray.png");
private static final ResourceLocation STRAY_CLOTHES_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/skeleton/stray_overlay.png");
public StrayRenderer(EntityRendererProvider.Context context) {
super(context, ModelLayers.STRAY, ModelLayers.STRAY_INNER_ARMOR, ModelLayers.STRAY_OUTER_ARMOR);
this.addLayer(new SkeletonClothingLayer<>(this, context.getModelSet(), ModelLayers.STRAY_OUTER_LAYER, STRAY_CLOTHES_LOCATION));
}
/**
* Returns the location of an entity's texture.
*/
public ResourceLocation getTextureLocation(Stray entity) {
return STRAY_SKELETON_LOCATION;
}
}