Skip to content

Commit 88fe9a2

Browse files
committed
Fix scantool window hidden block detection (#817)
1 parent b16c795 commit 88fe9a2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/com/ldtteam/structurize/client/gui/WindowScan.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import net.minecraft.world.level.block.state.BlockState;
3434
import net.minecraft.world.level.levelgen.structure.BoundingBox;
3535
import net.minecraft.world.phys.AABB;
36-
import net.minecraft.world.phys.shapes.Shapes;
3736
import org.jetbrains.annotations.NotNull;
3837
import 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;

0 commit comments

Comments
 (0)