SPIGOT-6347: Nether Portals Default to Nether, even in Nether

This commit is contained in:
md_5 2021-02-13 10:31:49 +11:00
parent 8aa6a953fe
commit d97d91871d
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -500,8 +500,12 @@
} }
protected boolean q(Entity entity) { protected boolean q(Entity entity) {
@@ -1649,11 +1953,17 @@ @@ -1646,14 +1950,20 @@
ResourceKey<World> resourcekey = this.world.getDimensionKey() == World.THE_NETHER ? World.OVERWORLD : World.THE_NETHER;
if (this.inPortal) {
MinecraftServer minecraftserver = worldserver.getMinecraftServer();
- ResourceKey<World> resourcekey = this.world.getDimensionKey() == World.THE_NETHER ? World.OVERWORLD : World.THE_NETHER;
+ ResourceKey<World> resourcekey = this.world.getTypeKey() == DimensionManager.THE_NETHER ? World.OVERWORLD : World.THE_NETHER; // CraftBukkit
WorldServer worldserver1 = minecraftserver.getWorldServer(resourcekey); WorldServer worldserver1 = minecraftserver.getWorldServer(resourcekey);
- if (worldserver1 != null && minecraftserver.getAllowNether() && !this.isPassenger() && this.portalTicks++ >= i) { - if (worldserver1 != null && minecraftserver.getAllowNether() && !this.isPassenger() && this.portalTicks++ >= i) {