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

45 lines
1.3 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package net.minecraft.client.renderer.entity.layers;
import net.minecraft.client.model.CreeperModel;
import net.minecraft.client.model.geom.EntityModelSet;
import net.minecraft.client.model.geom.ModelLayers;
import net.minecraft.client.renderer.entity.RenderLayerParent;
import net.minecraft.client.renderer.entity.layers.EnergySwirlLayer;
import net.minecraft.client.renderer.entity.state.CreeperRenderState;
import net.minecraft.resources.Identifier;
public class CreeperPowerLayer
extends EnergySwirlLayer<CreeperRenderState, CreeperModel> {
private static final Identifier POWER_LOCATION = Identifier.withDefaultNamespace("textures/entity/creeper/creeper_armor.png");
private final CreeperModel model;
public CreeperPowerLayer(RenderLayerParent<CreeperRenderState, CreeperModel> renderer, EntityModelSet modelSet) {
super(renderer);
this.model = new CreeperModel(modelSet.bakeLayer(ModelLayers.CREEPER_ARMOR));
}
@Override
protected boolean isPowered(CreeperRenderState state) {
return state.isPowered;
}
@Override
protected float xOffset(float t) {
return t * 0.01f;
}
@Override
protected Identifier getTextureLocation() {
return POWER_LOCATION;
}
@Override
protected CreeperModel model() {
return this.model;
}
}