|
16 | 16 | import net.minecraft.block.Block;
|
17 | 17 | import net.minecraft.client.Minecraft;
|
18 | 18 | import net.minecraft.client.renderer.RenderBlocks;
|
19 |
| -import net.minecraft.tileentity.TileEntity; |
20 | 19 | import net.minecraft.world.IBlockAccess;
|
21 | 20 |
|
22 | 21 | import lombok.val;
|
@@ -128,7 +127,7 @@ public boolean renderWorldBlock(IBlockAccess world,
|
128 | 127 | val renderPass = ForgeHooksClient.getWorldRenderPass();
|
129 | 128 | if (renderPass == 0) {
|
130 | 129 | isTranslucentPass = false;
|
131 |
| - } else if(renderPass == 1) { |
| 130 | + } else if (renderPass == 1) { |
132 | 131 | isTranslucentPass = true;
|
133 | 132 | } else {
|
134 | 133 | return false; // Don't render anything, something went wrong! Can't log either because it would do another A2 fr fr...
|
@@ -200,22 +199,22 @@ public static boolean renderStandardBlock(IBlockAccess world, int posX, int posY
|
200 | 199 | val te = world.getTileEntity(posX, posY, posZ);
|
201 | 200 | if ((te instanceof IPipeRenderedTileEntity pipeTile)) {
|
202 | 201 | return renderStandardBlock(world, posX, posY, posZ, block, renderBlocks, new ITexture[][]{
|
203 |
| - pipeTile.getTextureCovered(DOWN), |
204 |
| - pipeTile.getTextureCovered(UP), |
205 |
| - pipeTile.getTextureCovered(NORTH), |
206 |
| - pipeTile.getTextureCovered(SOUTH), |
207 |
| - pipeTile.getTextureCovered(WEST), |
208 |
| - pipeTile.getTextureCovered(EAST)}, |
| 202 | + pipeTile.getTextureCovered(DOWN), |
| 203 | + pipeTile.getTextureCovered(UP), |
| 204 | + pipeTile.getTextureCovered(NORTH), |
| 205 | + pipeTile.getTextureCovered(SOUTH), |
| 206 | + pipeTile.getTextureCovered(WEST), |
| 207 | + pipeTile.getTextureCovered(EAST)}, |
209 | 208 | isTranslucentPass);
|
210 | 209 | }
|
211 | 210 | if (te instanceof ITexturedTileEntity texturedTile) {
|
212 | 211 | return renderStandardBlock(world, posX, posY, posZ, block, renderBlocks, new ITexture[][]{
|
213 |
| - texturedTile.getTexture(block, DOWN), |
214 |
| - texturedTile.getTexture(block, UP), |
215 |
| - texturedTile.getTexture(block, NORTH), |
216 |
| - texturedTile.getTexture(block, SOUTH), |
217 |
| - texturedTile.getTexture(block, WEST), |
218 |
| - texturedTile.getTexture(block, EAST)}, |
| 212 | + texturedTile.getTexture(block, DOWN), |
| 213 | + texturedTile.getTexture(block, UP), |
| 214 | + texturedTile.getTexture(block, NORTH), |
| 215 | + texturedTile.getTexture(block, SOUTH), |
| 216 | + texturedTile.getTexture(block, WEST), |
| 217 | + texturedTile.getTexture(block, EAST)}, |
219 | 218 | isTranslucentPass);
|
220 | 219 | }
|
221 | 220 | return false;
|
@@ -656,12 +655,18 @@ public static boolean renderFacing(IBlockAccess world,
|
656 | 655 | byte side,
|
657 | 656 | boolean isTranslucentPass) {
|
658 | 657 | return switch (side) {
|
659 |
| - case 0 -> renderNegativeYFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
660 |
| - case 1 -> renderPositiveYFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
661 |
| - case 2 -> renderNegativeZFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
662 |
| - case 3 -> renderPositiveZFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
663 |
| - case 4 -> renderNegativeXFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
664 |
| - case 5 -> renderPositiveXFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
| 658 | + case 0 -> |
| 659 | + renderNegativeYFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
| 660 | + case 1 -> |
| 661 | + renderPositiveYFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
| 662 | + case 2 -> |
| 663 | + renderNegativeZFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
| 664 | + case 3 -> |
| 665 | + renderPositiveZFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
| 666 | + case 4 -> |
| 667 | + renderNegativeXFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
| 668 | + case 5 -> |
| 669 | + renderPositiveXFacing(world, render, block, posX, posY, posZ, textures, isFullBlock, isTranslucentPass); |
665 | 670 | default -> false;
|
666 | 671 | };
|
667 | 672 | }
|
|
0 commit comments