2025-11-24 22:52:51 +03:00

50 lines
1.7 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.client.renderer.entity;
import net.minecraft.client.model.SpiderModel;
import net.minecraft.client.model.geom.ModelLayerLocation;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.MobRenderer;
import net.minecraft.client.renderer.entity.layers.SpiderEyesLayer;
import net.minecraft.client.renderer.entity.state.LivingEntityRenderState;
import net.minecraft.resources.Identifier;
import net.minecraft.world.entity.monster.Spider;
public class SpiderRenderer<T extends Spider>
extends MobRenderer<T, LivingEntityRenderState, SpiderModel> {
private static final Identifier SPIDER_LOCATION = Identifier.withDefaultNamespace("textures/entity/spider/spider.png");
public SpiderRenderer(EntityRendererProvider.Context context) {
this(context, ModelLayers.SPIDER);
}
public SpiderRenderer(EntityRendererProvider.Context context, ModelLayerLocation model) {
super(context, new SpiderModel(context.bakeLayer(model)), 0.8f);
this.addLayer(new SpiderEyesLayer<SpiderModel>(this));
}
@Override
protected float getFlipDegrees() {
return 180.0f;
}
@Override
public Identifier getTextureLocation(LivingEntityRenderState state) {
return SPIDER_LOCATION;
}
@Override
public LivingEntityRenderState createRenderState() {
return new LivingEntityRenderState();
}
@Override
public void extractRenderState(T entity, LivingEntityRenderState state, float partialTicks) {
super.extractRenderState(entity, state, partialTicks);
}
}