From af7bb05042401348e3742abc23e8e7eecb83fc54 Mon Sep 17 00:00:00 2001 From: StevenRS11 Date: Sun, 1 Sep 2013 23:27:30 -0400 Subject: [PATCH 1/2] Chunk leak patched Not checking if a chunk existed before we placed a rift block could cause the MC server to generate chunks in unloaded terrain. Bad things commence. Possible world leak canidate. --- StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java b/StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java index 950c505..77f088c 100644 --- a/StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java +++ b/StevenDimDoors/mod_pocketDim/ticking/RiftRegenerator.java @@ -48,7 +48,7 @@ public class RiftRegenerator implements IRegularTickReceiver { { IDimLink link = dimension.getRandomLink(); Point4D source = link.source(); - if (!mod_pocketDim.blockRift.isBlockImmune(world, source.getX(), source.getY(), source.getZ())) + if (!mod_pocketDim.blockRift.isBlockImmune(world, source.getX(), source.getY(), source.getZ())&& world.getChunkProvider().chunkExists(source.getX() >> 4, source.getZ() >> 4)) { world.setBlock(source.getX(), source.getY(), source.getZ(), properties.RiftBlockID); } -- 2.39.5 From b9fcfea877da4c5cb10e07c91bcbeff996dad105 Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Wed, 4 Sep 2013 00:34:11 -0400 Subject: [PATCH 2/2] Fixed Various Bugs Fixed various minor bugs affecting transient doors and teleportation. --- StevenDimDoors/mod_pocketDim/DDTeleporter.java | 4 ++-- StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java | 5 +---- StevenDimDoors/mod_pocketDim/world/GatewayGenerator.java | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/DDTeleporter.java b/StevenDimDoors/mod_pocketDim/DDTeleporter.java index 06b7289..bb9ca30 100644 --- a/StevenDimDoors/mod_pocketDim/DDTeleporter.java +++ b/StevenDimDoors/mod_pocketDim/DDTeleporter.java @@ -189,7 +189,7 @@ public class DDTeleporter } // Determine if our destination is in another realm. - boolean difDest = entity.dimension == destination.getDimension(); + boolean difDest = entity.dimension != destination.getDimension(); if (difDest) { // Destination isn't loaded? Then we need to load it. @@ -197,8 +197,8 @@ public class DDTeleporter if (newWorld == null) { DimensionManager.initDimension(destination.getDimension()); + newWorld = DimensionManager.getWorld(destination.getDimension()); } - newWorld = DimensionManager.getWorld(destination.getDimension()); } else { diff --git a/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java b/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java index 48ce75e..c1fe83c 100644 --- a/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java +++ b/StevenDimDoors/mod_pocketDim/blocks/TransientDoor.java @@ -61,11 +61,8 @@ public class TransientDoor extends WarpDoor int var12 = (int) (MathHelper.floor_double((double) ((entity.rotationYaw + 90) * 4.0F / 360.0F) + 0.5D) & 3); int orientation = world.getBlockMetadata(x, y - 1, z); - if (!world.isRemote && (orientation >= 4 && orientation <= 7) && (orientation - 4) == var12 && - world.getBlockId(x, y - 1, z) == this.blockID) + if (!world.isRemote && orientation == var12 && world.getBlockId(x, y - 1, z) == this.blockID) { - this.onPoweredBlockChange(world, x, y, z, false); - DimLink link = PocketManager.getLink(x, y, z, world.provider.dimensionId); if (link != null) { diff --git a/StevenDimDoors/mod_pocketDim/world/GatewayGenerator.java b/StevenDimDoors/mod_pocketDim/world/GatewayGenerator.java index bc52bf7..f7379d3 100644 --- a/StevenDimDoors/mod_pocketDim/world/GatewayGenerator.java +++ b/StevenDimDoors/mod_pocketDim/world/GatewayGenerator.java @@ -146,7 +146,7 @@ public class GatewayGenerator implements IWorldGenerator } //Place the shiny transient door into a dungeon - ItemDimensionalDoor.placeDoorBlock(world, x, y + 1, z, 0, mod_pocketDim.transientDoor); + ItemDimensionalDoor.placeDoorBlock(world, x, y, z, 0, mod_pocketDim.transientDoor); } } } -- 2.39.5