package net.minecraft.client.renderer.entity; import com.mojang.blaze3d.vertex.PoseStack; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.client.model.GhastModel; import net.minecraft.client.model.geom.ModelLayers; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.monster.Ghast; @Environment(EnvType.CLIENT) public class GhastRenderer extends MobRenderer> { private static final ResourceLocation GHAST_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/ghast/ghast.png"); private static final ResourceLocation GHAST_SHOOTING_LOCATION = ResourceLocation.withDefaultNamespace("textures/entity/ghast/ghast_shooting.png"); public GhastRenderer(EntityRendererProvider.Context context) { super(context, new GhastModel<>(context.bakeLayer(ModelLayers.GHAST)), 1.5F); } /** * Returns the location of an entity's texture. */ public ResourceLocation getTextureLocation(Ghast entity) { return entity.isCharging() ? GHAST_SHOOTING_LOCATION : GHAST_LOCATION; } protected void scale(Ghast livingEntity, PoseStack poseStack, float partialTickTime) { float f = 1.0F; float g = 4.5F; float h = 4.5F; poseStack.scale(4.5F, 4.5F, 4.5F); } }