Commits

Parker Hawke authored 7029c0a8f3e
SPIGOT-6311: Don't calculate portal shapes for up/down directions
No tags
master

nms-patches/BlockFireAbstract.patch

Modified
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 -@@ -103,4 +110,12 @@
36 +@@ -83,6 +90,12 @@
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 +@@ -103,4 +116,12 @@
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 + }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut