Skip to content

Instantly share code, notes, and snippets.

@AzureDoom
Created September 15, 2020 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AzureDoom/9264c2c6328bfe134b4a5663c0f3d21a to your computer and use it in GitHub Desktop.
Save AzureDoom/9264c2c6328bfe134b4a5663c0f3d21a to your computer and use it in GitHub Desktop.
public class LayerFlames extends FeatureRenderer<LostSoulEntity, LostSoulModel<LostSoulEntity>> {
private static final Identifier[] TEX = { new Identifier(DoomMod.MODID, "textures/entity/lost_soul_fire_1.png"),
new Identifier(DoomMod.MODID, "textures/entity/lost_soul_fire_2.png"),
new Identifier(DoomMod.MODID, "textures/entity/lost_soul_fire_3.png"),
new Identifier(DoomMod.MODID, "textures/entity/lost_soul_fire_4.png"),
new Identifier(DoomMod.MODID, "textures/entity/lost_soul_fire_5.png"),
new Identifier(DoomMod.MODID, "textures/entity/lost_soul_fire_6.png"),
new Identifier(DoomMod.MODID, "textures/entity/lost_soul_fire_7.png"),
new Identifier(DoomMod.MODID, "textures/entity/lost_soul_fire_8.png") };
public LayerFlames(FeatureRendererContext<LostSoulEntity, LostSoulModel<LostSoulEntity>> featureRendererContext) {
super(featureRendererContext);
}
@Override
public void render(MatrixStack matrixStackIn, VertexConsumerProvider bufferIn, int packedLightIn,
LostSoulEntity entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks,
float ageInTicks, float netHeadYaw, float headPitch) {
MinecraftClient.getInstance().getEntityRenderDispatcher().textureManager
.bindTexture(TEX[(entitylivingbaseIn.getFlameTimer())]);
matrixStackIn.push();
matrixStackIn.translate(0.0D, 1.034D, 0.05D);
VertexConsumer ivertexbuilder = bufferIn
.getBuffer(RenderLayer.getEntityCutoutNoCull(TEX[(entitylivingbaseIn.getFlameTimer())]));
this.getContextModel().renderFlame(matrixStackIn, ivertexbuilder, 100, 1);
matrixStackIn.pop();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment