Completed Unsafe Exit Teleportation
Completed the code in yCoordHelper for choosing a point to drop the player when using a Transdimensional Trapdoor. Made changes to DDTeleporter so that the player can be dropped at the specific point we want. This needs further testing, though, since I'm not completely sure it's working right.
This commit is contained in:
@@ -75,7 +75,7 @@ public class DDTeleporter
|
||||
player.setPositionAndUpdate(x + 0.5, y - 1, z + 1.5);
|
||||
break;
|
||||
default:
|
||||
player.setPositionAndUpdate(x, y - 1, z);
|
||||
player.setPositionAndUpdate(x + 0.5, y - 1, z + 0.5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -108,7 +108,8 @@ public class DDTeleporter
|
||||
entity.worldObj.updateEntityWithOptionalForce(entity, false);
|
||||
break;
|
||||
default:
|
||||
DDTeleporter.setEntityPosition(entity, x, y, z);
|
||||
DDTeleporter.setEntityPosition(entity, x + 0.5, y, z + 0.5);
|
||||
entity.worldObj.updateEntityWithOptionalForce(entity, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -129,7 +130,7 @@ public class DDTeleporter
|
||||
setEntityPosition(entity, x + 0.5, y, z + 1.5);
|
||||
break;
|
||||
default:
|
||||
setEntityPosition(entity, x, y, z);
|
||||
setEntityPosition(entity, x + 0.5, y, z + 0.5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -455,10 +456,10 @@ public class DDTeleporter
|
||||
return false;
|
||||
}
|
||||
|
||||
Point3D destination = yCoordHelper.findDropPoint(world, source.getX(), source.getY(), source.getZ());
|
||||
Point3D destination = yCoordHelper.findDropPoint(world, source.getX(), source.getY() + 1, source.getZ());
|
||||
if (destination != null)
|
||||
{
|
||||
current.root().setDestination(link, source.getX(), source.getY(), source.getZ());
|
||||
current.root().setDestination(link, destination.getX(), destination.getY(), destination.getZ());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user