Fix miscoloured fire on burning minions

This commit is contained in:
Sollace 2023-09-03 21:17:46 +01:00
parent 9f791b9692
commit 849e47b905
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -28,6 +28,7 @@ import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.*; import net.minecraft.entity.*;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.vehicle.BoatEntity; import net.minecraft.entity.vehicle.BoatEntity;
import net.minecraft.screen.PlayerScreenHandler;
import net.minecraft.state.property.Properties; import net.minecraft.state.property.Properties;
import net.minecraft.util.Identifier; import net.minecraft.util.Identifier;
import net.minecraft.util.math.*; import net.minecraft.util.math.*;
@ -73,13 +74,14 @@ public class WorldRenderDelegate {
try { try {
recurseMinion = true; recurseMinion = true;
dispatcher.render(creature.asEntity(), x, y, z, yaw, tickDelta, matrices, layer -> { dispatcher.render(creature.asEntity(), x, y, z, yaw, tickDelta, matrices, layer -> {
var buffer = vertices.getBuffer(layer); return RenderLayerUtil.getTexture(layer)
return RenderLayerUtil.getTexture(layer).map(texture -> { .filter(texture -> texture != PlayerScreenHandler.BLOCK_ATLAS_TEXTURE)
.map(texture -> {
return VertexConsumers.union( 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); }, light);
return true; return true;
} catch (Throwable t) { } catch (Throwable t) {