From 5da21f87d6b0953f73941e68f5a09dc473d7cd5e Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 30 Sep 2020 08:58:36 +1000 Subject: [PATCH] SPIGOT-6152: End exit gates in custom ends do not send back to overworld --- nms-patches/BlockEnderPortal.patch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nms-patches/BlockEnderPortal.patch b/nms-patches/BlockEnderPortal.patch index b70bbb2595..3ec8cf18c3 100644 --- a/nms-patches/BlockEnderPortal.patch +++ b/nms-patches/BlockEnderPortal.patch @@ -11,7 +11,12 @@ public class BlockEnderPortal extends BlockTileEntity { protected static final VoxelShape a = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 12.0D, 16.0D); -@@ -25,9 +30,18 @@ +@@ -21,13 +26,22 @@ + @Override + public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { + if (world instanceof WorldServer && !entity.isPassenger() && !entity.isVehicle() && entity.canPortal() && VoxelShapes.c(VoxelShapes.a(entity.getBoundingBox().d((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), iblockdata.getShape(world, blockposition), OperatorBoolean.AND)) { +- ResourceKey resourcekey = world.getDimensionKey() == World.THE_END ? World.OVERWORLD : World.THE_END; ++ ResourceKey resourcekey = world.getTypeKey() == DimensionManager.THE_END ? World.OVERWORLD : World.THE_END; // CraftBukkit - SPIGOT-6152: send back to main overworld in custom ends WorldServer worldserver = ((WorldServer) world).getMinecraftServer().getWorldServer(resourcekey); if (worldserver == null) {