}
public void travelToDimension(int par1, Entity e) {
if (!e.worldObj.isRemote && !e.isDead) {
e.worldObj.theProfiler.startSection("changeDimension");
MinecraftServer minecraftserver = MinecraftServer.getServer();
int j = e.dimension;
WorldServer worldserver = minecraftserver.worldServerForDimension(j);
WorldServer worldserver1 = minecraftserver.worldServerForDimension(par1);
e.dimension = par1;
if (j == 1 && par1 == 1) {
worldserver1 = minecraftserver.worldServerForDimension(0);
e.dimension = 0;
}
e.worldObj.removeEntity(e);
e.isDead = false;
e.worldObj.theProfiler.startSection("reposition");
minecraftserver.getConfigurationManager().transferEntityToWorld(e, j, worldserver, worldserver1, new TeleporterBedrock(worldserver));
e.worldObj.theProfiler.endStartSection("reloading");
Entity entity = EntityList.createEntityByName(EntityList.getEntityString(e), worldserver1);
if (entity != null) {
entity.copyDataFrom(e, true);