mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fix miscoloured fire on burning minions
This commit is contained in:
parent
9f791b9692
commit
849e47b905
1 changed files with 7 additions and 5 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue