From 33b888c2d24ca08ac4070efdad2ac30a63b132d5 Mon Sep 17 00:00:00 2001 From: UselessBullets <80850784+UselessBullets@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:41:02 -0500 Subject: [PATCH] Fixed block build not properly checking if textures were null --- .../java/turniplabs/halplibe/helper/BlockBuilder.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java index b128dcb..7bcb072 100644 --- a/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java +++ b/src/main/java/turniplabs/halplibe/helper/BlockBuilder.java @@ -506,23 +506,23 @@ public T build(T block) { block.atlasIndices[Side.TOP.getId()] = Block.texCoordToIndex(topTexture[0], topTexture[1]); } - if (topTexture != null) { + if (bottomTexture != null) { block.atlasIndices[Side.BOTTOM.getId()] = Block.texCoordToIndex(bottomTexture[0], bottomTexture[1]); } - if (topTexture != null) { + if (northTexture != null) { block.atlasIndices[Side.NORTH.getId()] = Block.texCoordToIndex(northTexture[0], northTexture[1]); } - if (topTexture != null) { + if (eastTexture != null) { block.atlasIndices[Side.EAST.getId()] = Block.texCoordToIndex(eastTexture[0], eastTexture[1]); } - if (topTexture != null) { + if (southTexture != null) { block.atlasIndices[Side.SOUTH.getId()] = Block.texCoordToIndex(southTexture[0], southTexture[1]); } - if (topTexture != null) { + if (westTexture != null) { block.atlasIndices[Side.WEST.getId()] = Block.texCoordToIndex(westTexture[0], westTexture[1]); }