From edcb0a4b6a213e33aa72b159783b1cf5f66c12fa Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 25 Dec 2019 10:09:20 +1100 Subject: [PATCH] SPIGOT-5482: Structure Block setUsageMode encounters NullpointerException --- nms-patches/TileEntityStructure.patch | 11 +++++++++++ .../bukkit/craftbukkit/block/CraftStructureBlock.java | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 nms-patches/TileEntityStructure.patch diff --git a/nms-patches/TileEntityStructure.patch b/nms-patches/TileEntityStructure.patch new file mode 100644 index 0000000000..9624af0d34 --- /dev/null +++ b/nms-patches/TileEntityStructure.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/TileEntityStructure.java ++++ b/net/minecraft/server/TileEntityStructure.java +@@ -18,7 +18,7 @@ + public BlockPosition size; + public EnumBlockMirror mirror; + public EnumBlockRotation rotation; +- private BlockPropertyStructureMode usageMode; ++ public BlockPropertyStructureMode usageMode; + public boolean ignoreEntities; + private boolean powered; + public boolean showAir; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java index 86095fbe7d..c3fa6e534b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java @@ -105,7 +105,7 @@ public class CraftStructureBlock extends CraftBlockEntityState= min && num <= max; }