46 lines
1.8 KiB
Java
46 lines
1.8 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package net.minecraft.client.renderer.entity;
|
|
|
|
import com.mojang.blaze3d.vertex.PoseStack;
|
|
import net.minecraft.client.model.IllagerModel;
|
|
import net.minecraft.client.model.geom.ModelLayers;
|
|
import net.minecraft.client.renderer.SubmitNodeCollector;
|
|
import net.minecraft.client.renderer.entity.EntityRendererProvider;
|
|
import net.minecraft.client.renderer.entity.IllagerRenderer;
|
|
import net.minecraft.client.renderer.entity.RenderLayerParent;
|
|
import net.minecraft.client.renderer.entity.layers.ItemInHandLayer;
|
|
import net.minecraft.client.renderer.entity.state.IllagerRenderState;
|
|
import net.minecraft.resources.Identifier;
|
|
import net.minecraft.world.entity.monster.Vindicator;
|
|
|
|
public class VindicatorRenderer
|
|
extends IllagerRenderer<Vindicator, IllagerRenderState> {
|
|
private static final Identifier VINDICATOR = Identifier.withDefaultNamespace("textures/entity/illager/vindicator.png");
|
|
|
|
public VindicatorRenderer(EntityRendererProvider.Context context) {
|
|
super(context, new IllagerModel(context.bakeLayer(ModelLayers.VINDICATOR)), 0.5f);
|
|
this.addLayer(new ItemInHandLayer<IllagerRenderState, IllagerModel<IllagerRenderState>>(this, (RenderLayerParent)this){
|
|
|
|
@Override
|
|
public void submit(PoseStack poseStack, SubmitNodeCollector submitNodeCollector, int lightCoords, IllagerRenderState state, float yRot, float xRot) {
|
|
if (state.isAggressive) {
|
|
super.submit(poseStack, submitNodeCollector, lightCoords, state, yRot, xRot);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override
|
|
public Identifier getTextureLocation(IllagerRenderState state) {
|
|
return VINDICATOR;
|
|
}
|
|
|
|
@Override
|
|
public IllagerRenderState createRenderState() {
|
|
return new IllagerRenderState();
|
|
}
|
|
}
|
|
|