From da020fedd5241a89004fea78bb1f796eecb40234 Mon Sep 17 00:00:00 2001 From: MrJake222 Date: Wed, 10 Feb 2021 15:14:46 +0100 Subject: [PATCH] Fixed #283, the gate leaves snow layers inside the Gate intact while opening --- .../tileentity/stargate/StargateAbstractBaseTile.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/mrjake/aunis/tileentity/stargate/StargateAbstractBaseTile.java b/src/main/java/mrjake/aunis/tileentity/stargate/StargateAbstractBaseTile.java index 4cfac062..b574ff26 100644 --- a/src/main/java/mrjake/aunis/tileentity/stargate/StargateAbstractBaseTile.java +++ b/src/main/java/mrjake/aunis/tileentity/stargate/StargateAbstractBaseTile.java @@ -29,6 +29,7 @@ import mrjake.aunis.api.event.StargateOpenedEvent; import mrjake.aunis.api.event.StargateOpeningEvent; import mrjake.aunis.block.AunisBlocks; +import mrjake.aunis.block.DHDBlock; import mrjake.aunis.chunkloader.ChunkManager; import mrjake.aunis.config.AunisConfig; import mrjake.aunis.config.StargateDimensionConfig; @@ -754,8 +755,12 @@ public void update() { for (AunisAxisAlignedBB lBox : localInnerBlockBoxes) { AunisAxisAlignedBB gBox = lBox.offset(pos); - for (BlockPos bPos : BlockPos.getAllInBox((int)gBox.minX, (int)gBox.minY, (int)gBox.minZ, (int)gBox.maxX-1, (int)gBox.maxY-1, (int)gBox.maxZ-1)) - blocks.add(bPos); + for (BlockPos bPos : BlockPos.getAllInBox((int)gBox.minX, (int)gBox.minY, (int)gBox.minZ, (int)gBox.maxX-1, (int)gBox.maxY-1, (int)gBox.maxZ-1)) { + // If not snow layer + if (!DHDBlock.SNOW_MATCHER.apply(world.getBlockState(bPos))) { + blocks.add(bPos); + } + } } // Kill them