Skip to content

Commit feee472

Browse files
committed
Fixed crash when trying to break blocks with covers on them.
1 parent dec2eae commit feee472

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/sunsetsatellite/signalindustries/blocks/models/BlockModelCoverable.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public BlockModelCoverable(Block block) {
1818
@Override
1919
public boolean render(Tessellator tessellator, int x, int y, int z) {
2020
TileEntity tile = renderBlocks.blockAccess.getBlockTileEntity(x, y, z);
21+
if(tile == null) return false;
2122
if (tile instanceof TileEntityCoverable) {
2223
TileEntityCoverable machine = (TileEntityCoverable) tile;
2324
for (Direction dir : machine.getCovers().keySet()) {
@@ -27,6 +28,7 @@ public boolean render(Tessellator tessellator, int x, int y, int z) {
2728
IconCoordinate tex = cover.getTexture();
2829
renderBlocks.overrideBlockTexture = cover.getTexture();
2930
renderBlocks.useInventoryTint = false;
31+
renderBlocks.enableAO = true;
3032
int side = dir.getSideNumber();
3133
if (side == 0) {
3234
this.renderBottomFace(tessellator, block, x + vec.x, y + vec.y, z + vec.z, tex);

0 commit comments

Comments
 (0)