From d08ebdcb955796e75fe5781b9056654f67718298 Mon Sep 17 00:00:00 2001 From: Bruce Yu Date: Sun, 14 Aug 2022 11:50:38 +0800 Subject: [PATCH] Update TileEntityCrate.java anti crash by dirty hack(issue#17) --- .../betterstorage/common/tileentity/TileEntityCrate.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/io/github/tehstoneman/betterstorage/common/tileentity/TileEntityCrate.java b/src/main/java/io/github/tehstoneman/betterstorage/common/tileentity/TileEntityCrate.java index 5a96af2d..251b06e6 100644 --- a/src/main/java/io/github/tehstoneman/betterstorage/common/tileentity/TileEntityCrate.java +++ b/src/main/java/io/github/tehstoneman/betterstorage/common/tileentity/TileEntityCrate.java @@ -227,7 +227,12 @@ private void checkConnections( int x, int y, int z, UUID pileID, HashSet< TileEn set.add( crate ); } for( final EnumFacing ndir : EnumFacing.HORIZONTALS ) + { + try{ checkConnections( x + ndir.getFrontOffsetX(), y, z + ndir.getFrontOffsetZ(), pileID, set ); + } + catch(StackOverflowError e){} + } } /** Tries to connect a crate to the given side */