Commits
26 26 | |
27 27 | } |
28 28 | } |
29 29 | |
30 30 | private static boolean a(World world) { |
31 31 | - return world.getDimensionKey() == World.OVERWORLD || world.getDimensionKey() == World.THE_NETHER; |
32 32 | + return world.getTypeKey() == DimensionManager.OVERWORLD || world.getTypeKey() == DimensionManager.THE_NETHER; // CraftBukkit - getTypeKey() |
33 33 | } |
34 34 | |
35 35 | @Override |
36 - | |
36 + | |
37 + | } |
38 + | |
39 + | private static boolean b(World world, BlockPosition blockposition, EnumDirection enumdirection) { |
40 + | + // CraftBukkit start - SPIGOT-6311: Do not calculate portals for up/down directions |
41 + | + if (enumdirection == EnumDirection.UP || enumdirection == EnumDirection.DOWN) { |
42 + | + return false; |
43 + | + } |
44 + | + // CraftBukkit end |
45 + | + |
46 + | if (!a(world)) { |
47 + | return false; |
48 + | } else { |
49 + | |
37 50 | return flag && BlockPortalShape.a((GeneratorAccess) world, blockposition, enumdirection.h().n()).isPresent(); |
38 51 | } |
39 52 | } |
40 53 | + |
41 54 | + // CraftBukkit start |
42 55 | + protected void fireExtinguished(GeneratorAccess world, BlockPosition position) { |
43 56 | + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, position, Blocks.AIR.getBlockData()).isCancelled()) { |
44 57 | + world.a(position, false); |
45 58 | + } |
46 59 | + } |