From 849e47b9052bca4e7a1b859cb2bbd030114e75a4 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 3 Sep 2023 21:17:46 +0100 Subject: [PATCH] Fix miscoloured fire on burning minions --- .../unicopia/client/render/WorldRenderDelegate.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/client/render/WorldRenderDelegate.java b/src/main/java/com/minelittlepony/unicopia/client/render/WorldRenderDelegate.java index 0ccab553..1789a462 100644 --- a/src/main/java/com/minelittlepony/unicopia/client/render/WorldRenderDelegate.java +++ b/src/main/java/com/minelittlepony/unicopia/client/render/WorldRenderDelegate.java @@ -28,6 +28,7 @@ import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.*; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.vehicle.BoatEntity; +import net.minecraft.screen.PlayerScreenHandler; import net.minecraft.state.property.Properties; import net.minecraft.util.Identifier; import net.minecraft.util.math.*; @@ -73,13 +74,14 @@ public class WorldRenderDelegate { try { recurseMinion = true; dispatcher.render(creature.asEntity(), x, y, z, yaw, tickDelta, matrices, layer -> { - var buffer = vertices.getBuffer(layer); - return RenderLayerUtil.getTexture(layer).map(texture -> { + return RenderLayerUtil.getTexture(layer) + .filter(texture -> texture != PlayerScreenHandler.BLOCK_ATLAS_TEXTURE) + .map(texture -> { return VertexConsumers.union( - vertices.getBuffer(RenderLayers.getMagicColored(texture, creature.isDiscorded() ? 0xCCFF0000 : 0xCC0000FF)), - vertices.getBuffer(layer) + vertices.getBuffer(layer), + vertices.getBuffer(RenderLayers.getMagicColored(texture, creature.isDiscorded() ? 0xCCFF0000 : 0xCC0000FF)) ); - }).orElse(buffer); + }).orElseGet(() -> vertices.getBuffer(layer)); }, light); return true; } catch (Throwable t) {