Created
September 15, 2020 02:53
-
-
Save AzureDoom/9264c2c6328bfe134b4a5663c0f3d21a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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