File tree Expand file tree Collapse file tree
src/main/java/com/ldtteam/structurize/client/gui Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333import net .minecraft .world .level .block .state .BlockState ;
3434import net .minecraft .world .level .levelgen .structure .BoundingBox ;
3535import net .minecraft .world .phys .AABB ;
36- import net .minecraft .world .phys .shapes .Shapes ;
3736import org .jetbrains .annotations .NotNull ;
3837import org .jetbrains .annotations .Nullable ;
3938
@@ -490,8 +489,9 @@ private void updateResources()
490489 for (final Direction dir : Direction .values ())
491490 {
492491 BlockPos offsetPos = here .relative (dir );
493- if (!boundingBox .isInside (offsetPos )
494- || world .getBlockState (offsetPos ).canOcclude () && world .getBlockState (offsetPos ).getShape (world , offsetPos ) != Shapes .block ())
492+ if (!(offsetPos .getX () >= minX && offsetPos .getX () <= maxX && offsetPos .getY () >= minY && offsetPos .getY () <= maxY && offsetPos .getZ () >= minZ
493+ && offsetPos .getZ () <= maxZ )
494+ || !world .getBlockState (offsetPos ).canOcclude ())
495495 {
496496 visible = true ;
497497 break ;
You can’t perform that action at this time.
0 commit comments