mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
Handle server-side travelToLocation
This commit is contained in:
1 parent
5bd58bd981
commit
f1978a6a15
1 file changed
+16
-1
@@ -767,7 +767,22 @@ public class TravelController {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (doClientTeleport(player, destination, source, requiredPower, conserveMomentum)) {
|
||||
|
||||
boolean teleportSuccessful;
|
||||
if (player.worldObj.isRemote) {
|
||||
teleportSuccessful = doClientTeleport(player, destination, source, requiredPower, conserveMomentum);
|
||||
} else {
|
||||
teleportSuccessful = PacketTravelEvent.doServerTeleport(
|
||||
player,
|
||||
destination.x,
|
||||
destination.y,
|
||||
destination.z,
|
||||
requiredPower,
|
||||
conserveMomentum,
|
||||
source);
|
||||
}
|
||||
|
||||
if (teleportSuccessful) {
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
player.worldObj.spawnParticle(
|
||||
"portal",
|
||||
|
||||
Reference in new issue
Block a user