Doortype-specific Teleportation

-Implemented different variations for determining where different doors
teleport the player, if they link at all, etc.
-Implemented different variations for determining the teleport location
in case of a player teleporting to a door, rift, trapdoor, etc.
-Rifts now unregister and unpair if the doors are broken.
-Players' UUIDs now get registered to a Pocket if a player enters them
via any rift.
-Riftblade now works instantaneously, instead of placing a transient
door.

TODO
-Maybe the Transient door does not work correctly right now
This commit is contained in:
Mathijs Riezebos 2017-03-03 15:25:10 +01:00
parent 4519886063
commit d6d8a2bb49
16 changed files with 168 additions and 94 deletions

View file

@ -12,6 +12,7 @@ import com.zixiken.dimdoors.shared.util.Location;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagInt;
@ -52,7 +53,7 @@ public class Pocket {
Location riftLocation = RiftRegistry.Instance.getRiftLocation(riftID);
WorldServer worldServer = DimDoors.proxy.getWorldServer(riftLocation.getDimensionID());
if (!worldServer.isRemote) {
DDTileEntityBase rift = (DDTileEntityBase) riftLocation.getTileEntity();
rift.setPocket(this.ID, this.typeID); //set the rift's pocket ID to this pocket's pocket ID;
@ -159,4 +160,14 @@ public class Pocket {
public Location getDepthZeroLocation() {
return depthZeroLocation;
}
public void validatePlayerEntry(EntityPlayer player) {
String playerUUID = player.getCachedUniqueIdString();
for (String allowedPlayerUUID : playerUUIDs) {
if (allowedPlayerUUID.equals(playerUUID)) {
return;
}
}
playerUUIDs.add(playerUUID);
}
}

View file

@ -16,6 +16,7 @@ import java.util.List;
import java.util.Map;
import java.util.Random;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
@ -103,6 +104,7 @@ public class RiftRegistry {
}
public void writeToNBT(NBTTagCompound nbt) {
lastBrokenRift = null; //@todo this really should not be a part of this method, but I do not know of a better way to guaranteedly dereference it once every so often.
nbt.setInteger("maximumDungeonDepth", maximumDungeonDepth);
nbt.setInteger("nextUnusedID", nextRiftID);
@ -155,15 +157,14 @@ public class RiftRegistry {
}
public void unregisterRift(int riftID) {
if (rifts.containsKey(riftID)) {
unpair(riftID);
DimDoors.log(this.getClass(), "unregistering rift " + riftID);
unpair(riftID);
unRegisterUnpairedRiftAtDepth(riftID); //@todo, will this crash if it doesn't find that value?
unpairedRifts.remove((Integer) riftID);
personalDoors.remove((Integer) riftID);
rifts.remove((Integer) riftID);
RiftSavedData.get(DimDoors.getDefWorld()).markDirty(); //Notify that this needs to be saved on world save
}
unRegisterUnpairedRiftAtDepth(riftID); //@todo, will this crash if it doesn't find that value?
unpairedRifts.remove((Integer) riftID);
personalDoors.remove((Integer) riftID);
rifts.remove((Integer) riftID);
RiftSavedData.get(DimDoors.getDefWorld()).markDirty(); //Notify that this needs to be saved on world save
}
void registerUnpairedRiftAtDepth(int riftID, int depth) {
@ -185,6 +186,14 @@ public class RiftRegistry {
}
}
void unRegisterUnpairedRiftAtDepth(DDTileEntityBase rift) {
int depth = rift.getDepth();
if (depth < maximumDungeonDepth) {
List<Integer> unpairedRiftListAtDepth = unpairedRiftsPerDepth.get(depth);
unpairedRiftListAtDepth.remove((Integer) rift.getRiftID());
}
}
public Location getRiftLocation(int ID) {
return rifts.get(ID);
}
@ -214,14 +223,15 @@ public class RiftRegistry {
Location location = rifts.get(riftID);
if (location == null) {
DimDoors.warn(this.getClass(), "RiftID with null location: rift " + riftID);
}
TileEntity tileEntity = location.getTileEntity();
if (tileEntity != null && tileEntity instanceof DDTileEntityBase) {
DDTileEntityBase rift = (DDTileEntityBase) tileEntity;
boolean alreadyUnPaired = rift.unpair();
if (!alreadyUnPaired) {
unpairedRifts.add(riftID);
registerUnpairedRiftAtDepth(riftID, rift.getDepth());
} else {
TileEntity tileEntity = location.getTileEntity();
if (tileEntity != null && tileEntity instanceof DDTileEntityBase) {
DDTileEntityBase rift = (DDTileEntityBase) tileEntity;
boolean alreadyUnPaired = rift.unpair();
if (!alreadyUnPaired) {
unpairedRifts.add(riftID);
registerUnpairedRiftAtDepth(riftID, rift.getDepth());
}
}
}
}
@ -270,7 +280,7 @@ public class RiftRegistry {
if (unpairedRiftsPerDepth.size() > depth) {
List<Integer> rifts = unpairedRiftsPerDepth.get(depth);
int numberOfUnpairedRifts = rifts.size();
if (numberOfUnpairedRifts > 0) {
if (numberOfUnpairedRifts > 1) {
Random random = new Random();
int indexOforigRiftID = -1;
int randomRiftIDIndex;
@ -349,4 +359,41 @@ public class RiftRegistry {
}
return -1;
}
public Location getTeleportLocation(int riftId) {
if (riftId < 0) {
DimDoors.warn(this.getClass(), "RiftID of rift that entity is trying to teleport to seems to be lower than 0 and it shouldn't.");
return null;
}
Location destinationRiftLocation = getRiftLocation(riftId);
DDTileEntityBase destinationRift = (DDTileEntityBase) destinationRiftLocation.getTileEntity();
if (destinationRift == null) {
DimDoors.warn(this.getClass(), "The rift that an entity is trying to teleport to seems to be null.");
}
return destinationRift.getTeleportTargetLocation();
}
public void validatePlayerPocketEntry(Entity entity, int riftID) {
if (entity instanceof EntityPlayer && riftID >= 0) {
Location riftLocation = getRiftLocation(riftID);
if (riftLocation != null) {
TileEntity tileEntity = riftLocation.getTileEntity();
if (tileEntity != null && tileEntity instanceof DDTileEntityBase) {
DDTileEntityBase rift = (DDTileEntityBase) tileEntity;
EntityPlayer player = (EntityPlayer) entity;
rift.validatePlayerPocketEntry(player);
}
}
}
}
public void unregisterLastChangedRift() {
if (lastBrokenRift != null) {
RiftRegistry.Instance.unregisterRift(lastBrokenRift.getRiftID());
//@todo The rest is all pretty Crude. The only reason why this is needed, is because Vanilla Minecraft keeps destroying the rift blocks, before they can place down their TileEntities, if a player breaks them in creative.
RiftRegistry.Instance.unRegisterUnpairedRiftAtDepth(lastBrokenRift);
lastBrokenRift.unpair();
lastBrokenRift = null;
}
}
}

View file

@ -150,15 +150,21 @@ public abstract class BlockDimDoorBase extends BlockDoor implements IDimDoor, IT
public void breakBlock(World world, BlockPos pos, IBlockState state) {
DDTileEntityBase origRift = null;
boolean isTopHalf = state.getValue(BlockDoor.HALF) == EnumDoorHalf.UPPER;
boolean shouldPlaceRift = false;
if (isTopHalf) {
origRift = (DDTileEntityBase) world.getTileEntity(pos);
RiftRegistry.Instance.setLastChangedRift(origRift);
if (origRift.isPaired()) {
shouldPlaceRift = true;
RiftRegistry.Instance.setLastChangedRift(origRift); //@todo this is a crude workaround
} else {
RiftRegistry.Instance.unregisterRift(origRift.getRiftID());
}
}
super.breakBlock(world, pos, state);
if (isTopHalf) {
if (shouldPlaceRift) {
world.setBlockState(pos, ModBlocks.blockRift.getDefaultState());
DDTileEntityBase newRift = (DDTileEntityBase) world.getTileEntity(pos);
newRift.loadDataFrom(origRift);
newRift.loadDataFrom(origRift); //@todo this does not work here, or does it?
}
}

View file

@ -1,6 +1,7 @@
package com.zixiken.dimdoors.shared.blocks;
import com.zixiken.dimdoors.client.ClosingRiftFX;
import com.zixiken.dimdoors.shared.RiftRegistry;
import com.zixiken.dimdoors.shared.items.ModItems;
import com.zixiken.dimdoors.shared.tileentities.DDTileEntityBase;
import com.zixiken.dimdoors.shared.tileentities.TileEntityRift;
@ -147,14 +148,14 @@ public class BlockRift extends Block implements ITileEntityProvider {
x + .5, y + .5, z + .5,
rand.nextGaussian() * 0.01D, rand.nextGaussian() * 0.01D, rand.nextGaussian() * 0.01D));
*/
if (tile.shouldClose) //renders an opposite color effect if it is being closed by the rift remover{
if (tile.shouldClose) {//renders an opposite color effect if it is being closed by the rift remover
FMLClientHandler.instance().getClient().effectRenderer.addEffect(new ClosingRiftFX(
worldIn,
x + .5, y + .5, z + .5,
rand.nextGaussian() * 0.01D, rand.nextGaussian() * 0.01D, rand.nextGaussian() * 0.01D));
}
}
public boolean tryPlacingRift(World world, BlockPos pos) {
return world != null && !isBlockImmune(world, pos)
&& world.setBlockState(pos, getDefaultState()); //@todo This returns false, because this block does not have blockstates configured correctly. !isBlockImmune doesn't seem to be true either though...
@ -197,6 +198,7 @@ public class BlockRift extends Block implements ITileEntityProvider {
@Override
public void breakBlock(World world, BlockPos pos, IBlockState state) {
RiftRegistry.Instance.unregisterLastChangedRift();
world.removeTileEntity(pos);
}

View file

@ -1,39 +0,0 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.zixiken.dimdoors.shared.items;
import static com.zixiken.dimdoors.DimDoors.translateAndAdd;
import com.zixiken.dimdoors.shared.blocks.BlockDimDoorBase;
import com.zixiken.dimdoors.shared.blocks.ModBlocks;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
/**
*
* @author Robijnvogel
*/
public class ItemDimDoorTransient extends ItemDoorBase {
public static final String ID = "itemDimDoorTransient";
public ItemDimDoorTransient() {
super(ModBlocks.blockDimDoorTransient, ModItems.itemDimDoorTransient);
setUnlocalizedName(ID);
setRegistryName(ID);
}
@Override
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
translateAndAdd("info.transientDoor", tooltip);
}
@Override
protected BlockDimDoorBase getDoorBlock() {
return ModBlocks.blockDimDoorTransient;
}
}

View file

@ -4,6 +4,7 @@ import com.zixiken.dimdoors.DimDoors;
import com.zixiken.dimdoors.shared.util.Location;
import com.zixiken.dimdoors.shared.RayTraceHelper;
import com.zixiken.dimdoors.shared.TeleportHelper;
import com.zixiken.dimdoors.shared.tileentities.TileEntityRift;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
@ -53,17 +54,20 @@ public class ItemRiftBlade extends ItemSword {
//SchematicHandler.Instance.getPersonalPocketTemplate().place(0, 20, 0, 20, 0, 0, 1, EnumPocketType.DUNGEON); //this line can be activated for testing purposes
RayTraceResult hit = rayTrace(world, player, true);
if (RayTraceHelper.isRift(hit, world)) {
EnumActionResult canDoorBePlacedOnGroundBelowRift
= ItemDimDoorTransient.tryPlaceDoorOnTopOfBlock(new ItemStack(ModItems.itemDimDoorTransient, 1, 0), player, world, hit.getBlockPos().down(2), hand,
(float) hit.hitVec.xCoord, (float) hit.hitVec.yCoord, (float) hit.hitVec.zCoord); //stack may be changed by this method
if (canDoorBePlacedOnGroundBelowRift == EnumActionResult.SUCCESS) {
TileEntityRift rift = (TileEntityRift) world.getTileEntity(hit.getBlockPos());
EnumActionResult teleportResult = rift.tryTeleport(player) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
if (teleportResult == EnumActionResult.SUCCESS) {
stack.damageItem(1, player);
}
return new ActionResult(canDoorBePlacedOnGroundBelowRift, stack);
return new ActionResult(teleportResult, stack);
} else if (RayTraceHelper.isLivingEntity(hit)) {
TeleportHelper.teleport(player, new Location(world, hit.getBlockPos())); //@todo teleport to a location 1 or 2 blocks distance from the entity
return new ActionResult(EnumActionResult.PASS, stack);
EnumActionResult teleportResult = TeleportHelper.teleport(player, new Location(world, hit.getBlockPos())) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL; //@todo teleport to a location 1 or 2 blocks distance from the entity
if (teleportResult == EnumActionResult.SUCCESS) {
stack.damageItem(1, player);
}
return new ActionResult(teleportResult, stack);
}
return new ActionResult(EnumActionResult.FAIL, stack);

View file

@ -10,7 +10,6 @@ public class ModItems {
public static ItemDoorGold itemDoorGold;
public static ItemWorldThread itemWorldThread;
public static ItemDimDoor itemDimDoor;
public static ItemDimDoorTransient itemDimDoorTransient;
public static ItemDimDoorWarp itemDimDoorWarp;
public static ItemStableFabric itemStableFabric;
public static ItemDimDoorUnstable itemDimDoorChaos;
@ -26,7 +25,6 @@ public class ModItems {
GameRegistry.register(itemDoorGold = new ItemDoorGold());
GameRegistry.register(itemDimDoorGold = new ItemDimDoorGold());
GameRegistry.register(itemDimDoor = new ItemDimDoor());
GameRegistry.register(itemDimDoorTransient = new ItemDimDoorTransient());
GameRegistry.register(itemDimDoorWarp = new ItemDimDoorWarp());
GameRegistry.register(itemStableFabric = new ItemStableFabric());
GameRegistry.register(itemDimDoorChaos = new ItemDimDoorUnstable());

View file

@ -1,11 +1,14 @@
package com.zixiken.dimdoors.shared.tileentities;
import com.zixiken.dimdoors.shared.EnumPocketType;
import com.zixiken.dimdoors.shared.Pocket;
import com.zixiken.dimdoors.shared.PocketRegistry;
import com.zixiken.dimdoors.shared.util.Location;
import com.zixiken.dimdoors.shared.RiftRegistry;
import java.util.Random;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
@ -54,8 +57,8 @@ public abstract class DDTileEntityBase extends TileEntity {
} else {
isPaired = false;
RiftRegistry.Instance.unpair(pairedRiftID);
this.markDirty();
}
this.markDirty();
return false;
}
@ -139,8 +142,17 @@ public abstract class DDTileEntityBase extends TileEntity {
public void setIsInPocket() {
isInPocket = true;
}
protected EnumPocketType getPocketType() {
return pocketType;
}
public void validatePlayerPocketEntry(EntityPlayer player) {
if (!isInPocket || pocketType == EnumPocketType.PRIVATE) {
return;
} else {
Pocket pocket = PocketRegistry.Instance.getPocket(pocketID, pocketType);
pocket.validatePlayerEntry(player);
}
}
}

View file

@ -6,6 +6,7 @@ import com.zixiken.dimdoors.shared.PocketRegistry;
import com.zixiken.dimdoors.shared.blocks.BlockDimDoor;
import com.zixiken.dimdoors.shared.util.Location;
import com.zixiken.dimdoors.shared.RiftRegistry;
import com.zixiken.dimdoors.shared.TeleportHelper;
import com.zixiken.dimdoors.shared.world.DimDoorDimensions;
import java.util.Random;
import javax.annotation.Nullable;
@ -65,16 +66,15 @@ public class TileEntityDimDoor extends DDTileEntityBase {
@Override
public boolean tryTeleport(Entity entity) {
//DimDoors.log(this.getClass(), "Trying to teleport from rift " + getRiftID() + ".");
int otherRiftID = -1;
if (!isPaired()) {
otherRiftID = getNewTeleportDestination();
} else {
otherRiftID = getPairedRiftID();
//DimDoors.log(this.getClass(), "This rift was already paired correctly.");
}
//DimDoors.log(this.getClass(), "Starting teleportation.");
return RiftRegistry.Instance.teleportEntityToRift(entity, otherRiftID); //@todo this seems to return false?
Location tpLocation = RiftRegistry.Instance.getTeleportLocation(otherRiftID);
RiftRegistry.Instance.validatePlayerPocketEntry(entity, otherRiftID);
return TeleportHelper.teleport(entity, tpLocation); //@todo this seems to return false?
}
public void uponDoorPlacement(@Nullable TileEntity possibleOldRift) {

View file

@ -22,8 +22,9 @@ public class TileEntityDimDoorChaos extends TileEntityDimDoor {
@Override
public boolean tryTeleport(Entity entity) { //this door is never paired
Location tpLocation = RiftRegistry.Instance.getRiftLocation(RiftRegistry.Instance.getRandomNonPersonalRiftID());
//@todo, this teleports to the location of the rift, not in front of the rift, like it should
int otherRiftID = RiftRegistry.Instance.getRandomNonPersonalRiftID();
Location tpLocation = RiftRegistry.Instance.getTeleportLocation(otherRiftID);
RiftRegistry.Instance.validatePlayerPocketEntry(entity, otherRiftID);
return TeleportHelper.teleport(entity, tpLocation);
}
}

View file

@ -6,7 +6,6 @@ import com.zixiken.dimdoors.shared.IChunkLoader;
import com.zixiken.dimdoors.shared.PocketRegistry;
import com.zixiken.dimdoors.shared.RiftRegistry;
import com.zixiken.dimdoors.shared.util.Location;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.ForgeChunkManager;
import net.minecraftforge.common.ForgeChunkManager.Ticket;
@ -76,7 +75,6 @@ public class TileEntityDimDoorGold extends TileEntityDimDoor implements IChunkLo
if (otherRiftID < 0) {
DimDoors.warn(this.getClass(), "No suitable destination rift was found. This probably means that a pocket was created without any Doors.");
} else {
//@todo (should the other rift get loaded?)
RiftRegistry.Instance.pair(getRiftID(), otherRiftID);
}

View file

@ -27,18 +27,18 @@ public class TileEntityDimDoorPersonal extends TileEntityDimDoor {
@Override
public boolean tryTeleport(Entity entity) { //this door is never paired
Location locationOfThisRift = RiftRegistry.Instance.getRiftLocation(this.riftID);
Location tpLocation;
if (entity instanceof EntityPlayer) {
EntityPlayer entityPlayer = (EntityPlayer) entity;
if (locationOfThisRift.getDimensionID() == DimDoorDimensions.getPocketDimensionType(EnumPocketType.PRIVATE).getId()) {
return TeleportHelper.teleport(entity, PocketRegistry.Instance.getPocket(this.pocketID, EnumPocketType.PRIVATE).getDepthZeroLocation());
tpLocation = PocketRegistry.Instance.getPocket(this.pocketID, EnumPocketType.PRIVATE).getDepthZeroLocation();
} else {
Location tpLocation = RiftRegistry.Instance.getRiftLocation(PocketRegistry.Instance.getPrivateDimDoorID(entityPlayer.getCachedUniqueIdString()));
//@todo, this teleports to the location of the rift, not in front of the rift, like it should
return TeleportHelper.teleport(entity, tpLocation);
tpLocation = RiftRegistry.Instance.getTeleportLocation(PocketRegistry.Instance.getPrivateDimDoorID(entityPlayer.getCachedUniqueIdString()));
}
} else {
return false;
}
return TeleportHelper.teleport(entity, tpLocation);
}
}

View file

@ -4,20 +4,24 @@ import com.zixiken.dimdoors.shared.Pocket;
import com.zixiken.dimdoors.shared.PocketRegistry;
import com.zixiken.dimdoors.shared.RiftRegistry;
import com.zixiken.dimdoors.shared.TeleportHelper;
import com.zixiken.dimdoors.shared.util.Location;
import net.minecraft.entity.Entity;
public class TileEntityDimDoorWarp extends TileEntityDimDoor {
@Override
public boolean tryTeleport(Entity entity) {
Location teleportLocation;
if (isPaired()) {
return RiftRegistry.Instance.teleportEntityToRift(entity, getPairedRiftID());
}
if (!(this.isInPocket)) {
int otherRiftID = getPairedRiftID();
teleportLocation = RiftRegistry.Instance.getTeleportLocation(otherRiftID);
RiftRegistry.Instance.validatePlayerPocketEntry(entity, otherRiftID);
} else if (!(this.isInPocket)) {
return false;
} else {
Pocket pocket = PocketRegistry.Instance.getPocket(this.pocketID, this.getPocketType());
return TeleportHelper.teleport(entity, pocket.getDepthZeroLocation());
teleportLocation = pocket.getDepthZeroLocation();
}
return TeleportHelper.teleport(entity, teleportLocation);
}
}

View file

@ -1,7 +1,10 @@
package com.zixiken.dimdoors.shared.tileentities;
import com.zixiken.dimdoors.DimDoors;
import com.zixiken.dimdoors.shared.blocks.ModBlocks;
import com.zixiken.dimdoors.shared.RiftRegistry;
import com.zixiken.dimdoors.shared.TeleportHelper;
import com.zixiken.dimdoors.shared.util.Location;
import java.util.List;
import java.util.Random;
import net.minecraft.entity.Entity;
@ -145,6 +148,15 @@ public class TileEntityRift extends DDTileEntityBase implements ITickable {
@Override
public boolean tryTeleport(Entity entity) {
return false; //@todo, rift blade functionality?
int otherRiftID = -1;
if (!isPaired()) {
DimDoors.warn(this.getClass(), "Rift " + this.getRiftID() + " was not paired and thus, should not exist as a Rift, unless it was unpaired after the door was destroyed.");
return false;
} else {
otherRiftID = getPairedRiftID();
}
Location tpLocation = RiftRegistry.Instance.getTeleportLocation(otherRiftID);
RiftRegistry.Instance.validatePlayerPocketEntry(entity, otherRiftID);
return TeleportHelper.teleport(entity, tpLocation); //@todo this seems to return false?
}
}

View file

@ -1,5 +1,10 @@
package com.zixiken.dimdoors.shared.tileentities;
import com.zixiken.dimdoors.shared.Pocket;
import com.zixiken.dimdoors.shared.PocketRegistry;
import com.zixiken.dimdoors.shared.RiftRegistry;
import com.zixiken.dimdoors.shared.TeleportHelper;
import com.zixiken.dimdoors.shared.util.Location;
import java.util.Random;
import net.minecraft.entity.Entity;
@ -19,10 +24,25 @@ public class TileEntityTransTrapdoor extends DDTileEntityBase {
}
return rgbaColor;
}
@Override
public Location getTeleportTargetLocation() {
return new Location(this.getWorld().provider.getDimension(), this.getPos().up());
}
@Override
public boolean tryTeleport(Entity entity) {
//@todo teleport the player somewhere to the Overworld?
return false;
Location teleportLocation;
if (isPaired()) {
int otherRiftID = getPairedRiftID();
teleportLocation = RiftRegistry.Instance.getTeleportLocation(otherRiftID);
RiftRegistry.Instance.validatePlayerPocketEntry(entity, otherRiftID);
} else if (!(this.isInPocket)) {
return false;
} else {
Pocket pocket = PocketRegistry.Instance.getPocket(this.pocketID, this.getPocketType());
teleportLocation = pocket.getDepthZeroLocation();
}
return TeleportHelper.teleport(entity, teleportLocation);
}
}

View file

@ -6,9 +6,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldProvider;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.DimensionManager;
/**
*