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

26 lines
1 KiB
Java

package net.minecraft.client.renderer.entity;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.model.DolphinModel;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.client.renderer.entity.layers.DolphinCarryingItemLayer;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.animal.Dolphin;
@Environment(EnvType.CLIENT)
public class DolphinRenderer extends MobRenderer<Dolphin, DolphinModel<Dolphin>> {
private static final ResourceLocation DOLPHIN_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/dolphin.png");
public DolphinRenderer(EntityRendererProvider.Context context) {
super(context, new DolphinModel<>(context.bakeLayer(ModelLayers.DOLPHIN)), 0.7F);
this.addLayer(new DolphinCarryingItemLayer(this, context.getItemInHandRenderer()));
}
/**
* Returns the location of an entity's texture.
*/
public ResourceLocation getTextureLocation(Dolphin entity) {
return DOLPHIN_LOCATION;
}
}