Nether portals should now only work in the default world

This commit is contained in:
Nathan Adams 2011-11-25 20:54:29 +00:00
parent bb16e6c5c1
commit 197fdbd84c

View File

@ -320,7 +320,7 @@ public class ServerConfigurationManager {
Location toLocation = null;
if (toWorld != null) {
if ((dimension == -1) || (dimension == 0)) {
if (((dimension == -1) || (dimension == 0)) && ((entityplayer.dimension == -1) || (entityplayer.dimension == 0))) {
double blockRatio = dimension == 0 ? 8 : 0.125;
toLocation = toWorld == null ? null : new Location(toWorld.getWorld(), (entityplayer.locX * blockRatio), entityplayer.locY, (entityplayer.locZ * blockRatio), entityplayer.yaw, entityplayer.pitch);