From c980c797e8028a3398eed830d8ef08f4b9e6240a Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Tue, 18 Mar 2014 04:56:07 -0400 Subject: [PATCH] Fixed Limbo Gateways and Minor Change * Fixed Limbo gateways. I accidentally broke them while overhauling gateways in general. * Changed references to BaseItemDoor.placeDoorBlock() to use ItemDoor.placeDoorBlock() instead. We should refer to the original class that implements the function. --- .../mod_pocketDim/core/DDTeleporter.java | 7 ++----- .../world/fortresses/ComponentNetherGateway.java | 4 ++-- .../mod_pocketDim/world/gateways/GatewayLimbo.java | 12 ++++++------ 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java b/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java index bdb7fd71..7c7bb6ce 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/core/DDTeleporter.java @@ -9,8 +9,8 @@ import net.minecraft.entity.EntityList; import net.minecraft.entity.item.EntityMinecart; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemDoor; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.network.packet.Packet250CustomPayload; import net.minecraft.network.packet.Packet41EntityEffect; import net.minecraft.network.packet.Packet43Experience; import net.minecraft.network.packet.Packet9Respawn; @@ -20,14 +20,11 @@ import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraft.world.WorldServer; import net.minecraftforge.common.DimensionManager; -import net.minecraftforge.common.network.ForgePacket; -import net.minecraftforge.common.network.packet.DimensionRegisterPacket; import StevenDimDoors.mod_pocketDim.Point3D; import StevenDimDoors.mod_pocketDim.mod_pocketDim; import StevenDimDoors.mod_pocketDim.blocks.BaseDimDoor; import StevenDimDoors.mod_pocketDim.config.DDProperties; import StevenDimDoors.mod_pocketDim.helpers.yCoordHelper; -import StevenDimDoors.mod_pocketDim.items.BaseItemDoor; import StevenDimDoors.mod_pocketDim.items.ItemDimensionalDoor; import StevenDimDoors.mod_pocketDim.schematic.BlockRotator; import StevenDimDoors.mod_pocketDim.tileentities.TileEntityDimDoor; @@ -605,7 +602,7 @@ public class DDTeleporter } } - BaseItemDoor.placeDoorBlock(destWorld, link.destination().getX(), link.destination().getY()-1, link.destination().getZ(),link.getDestinationOrientation(), door); + ItemDoor.placeDoorBlock(destWorld, link.destination().getX(), link.destination().getY()-1, link.destination().getZ(),link.getDestinationOrientation(), door); TileEntity doorDestTE = ((BaseDimDoor)door).initDoorTE(destWorld, link.destination().getX(), link.destination().getY(), link.destination().getZ()); diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/world/fortresses/ComponentNetherGateway.java b/src/main/java/StevenDimDoors/mod_pocketDim/world/fortresses/ComponentNetherGateway.java index d8c149ef..8b05b399 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/world/fortresses/ComponentNetherGateway.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/world/fortresses/ComponentNetherGateway.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.Random; import net.minecraft.block.Block; +import net.minecraft.item.ItemDoor; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraft.world.gen.structure.StructureBoundingBox; @@ -13,7 +14,6 @@ import StevenDimDoors.mod_pocketDim.core.DimLink; import StevenDimDoors.mod_pocketDim.core.LinkTypes; import StevenDimDoors.mod_pocketDim.core.NewDimData; import StevenDimDoors.mod_pocketDim.core.PocketManager; -import StevenDimDoors.mod_pocketDim.items.BaseItemDoor; public class ComponentNetherGateway extends StructureComponent { @@ -159,7 +159,7 @@ public class ComponentNetherGateway extends StructureComponent { link = dimension.createLink(x, y + 1, z, LinkTypes.DUNGEON, orientation); } - BaseItemDoor.placeDoorBlock(world, x, y, z, orientation, mod_pocketDim.transientDoor); + ItemDoor.placeDoorBlock(world, x, y, z, orientation, mod_pocketDim.transientDoor); } for (x = 0; x <= 6; ++x) diff --git a/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/GatewayLimbo.java b/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/GatewayLimbo.java index c202fcdc..27448b3c 100644 --- a/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/GatewayLimbo.java +++ b/src/main/java/StevenDimDoors/mod_pocketDim/world/gateways/GatewayLimbo.java @@ -1,9 +1,9 @@ package StevenDimDoors.mod_pocketDim.world.gateways; +import net.minecraft.item.ItemDoor; import net.minecraft.world.World; import StevenDimDoors.mod_pocketDim.mod_pocketDim; import StevenDimDoors.mod_pocketDim.config.DDProperties; -import StevenDimDoors.mod_pocketDim.items.BaseItemDoor; import StevenDimDoors.mod_pocketDim.world.LimboProvider; public class GatewayLimbo extends BaseGateway @@ -19,16 +19,16 @@ public class GatewayLimbo extends BaseGateway int blockID = mod_pocketDim.blockLimbo.blockID; // Build the gateway out of Unraveled Fabric. Since nearly all the blocks in Limbo are of // that type, there is no point replacing the ground. - world.setBlock(x, y + 2, z + 1, blockID, 0, 3); - world.setBlock(x, y + 2, z - 1, blockID, 0, 3); + world.setBlock(x, y + 3, z + 1, blockID, 0, 3); + world.setBlock(x, y + 3, z - 1, blockID, 0, 3); // Build the columns around the door + world.setBlock(x, y + 2, z - 1, blockID, 0, 3); + world.setBlock(x, y + 2, z + 1, blockID, 0, 3); world.setBlock(x, y + 1, z - 1, blockID, 0, 3); world.setBlock(x, y + 1, z + 1, blockID, 0, 3); - world.setBlock(x, y, z - 1, blockID, 0, 3); - world.setBlock(x, y, z + 1, blockID, 0, 3); - BaseItemDoor.placeDoorBlock(world, x, y, z, 0, mod_pocketDim.transientDoor); + ItemDoor.placeDoorBlock(world, x, y + 1, z, 0, mod_pocketDim.transientDoor); return true; }