Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
Fixed #283, the gate leaves snow layers inside the Gate intact while …
Browse files Browse the repository at this point in the history
…opening
  • Loading branch information
MrJake222 committed Feb 10, 2021
1 parent e9958bb commit da020fe
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit da020fe

Please sign in to comment.