summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockSkull.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2015-02-02 21:55:33 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2015-02-02 21:55:33 +0000
commit386dc55b83d6d8ea493613df21f155f37a761006 (patch)
tree902a8fd57822ec3da9f1b82e19dfad29fb69ed02 /nms-patches/BlockSkull.patch
parentd3d13610420cc3d9bd2a913436ecfd89fd23903d (diff)
downloadcraftbukkit-386dc55b83d6d8ea493613df21f155f37a761006.tar
craftbukkit-386dc55b83d6d8ea493613df21f155f37a761006.tar.gz
craftbukkit-386dc55b83d6d8ea493613df21f155f37a761006.tar.lz
craftbukkit-386dc55b83d6d8ea493613df21f155f37a761006.tar.xz
craftbukkit-386dc55b83d6d8ea493613df21f155f37a761006.zip
SPIGOT-465: Allow cancelling BlockPlaceEvent to preven wither spawns
Diffstat (limited to 'nms-patches/BlockSkull.patch')
-rw-r--r--nms-patches/BlockSkull.patch14
1 files changed, 10 insertions, 4 deletions
diff --git a/nms-patches/BlockSkull.patch b/nms-patches/BlockSkull.patch
index d5d7e4d2..ad1807ab 100644
--- a/nms-patches/BlockSkull.patch
+++ b/nms-patches/BlockSkull.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/BlockSkull.java 2014-11-28 17:43:42.961707438 +0000
-+++ src/main/java/net/minecraft/server/BlockSkull.java 2014-11-28 17:38:23.000000000 +0000
+--- ../work/decompile-8eb82bde//net/minecraft/server/BlockSkull.java 2015-02-02 21:55:13.808077826 +0000
++++ src/main/java/net/minecraft/server/BlockSkull.java 2015-02-02 21:55:13.808077826 +0000
@@ -4,6 +4,11 @@
import java.util.Iterator;
import java.util.Random;
@@ -51,7 +51,13 @@
TileEntity tileentity = world.getTileEntity(blockposition);
if (tileentity instanceof TileEntitySkull) {
-@@ -120,19 +145,30 @@
+@@ -115,24 +140,36 @@
+ }
+
+ public void a(World world, BlockPosition blockposition, TileEntitySkull tileentityskull) {
++ if (world.captureBlockStates) return; // CraftBukkit
+ if (tileentityskull.getSkullType() == 1 && blockposition.getY() >= 2 && world.getDifficulty() != EnumDifficulty.PEACEFUL && !world.isStatic) {
+ ShapeDetector shapedetector = this.l();
ShapeDetectorCollection shapedetectorcollection = shapedetector.a(world, blockposition);
if (shapedetectorcollection != null) {
@@ -84,7 +90,7 @@
}
}
-@@ -145,28 +181,31 @@
+@@ -145,28 +182,31 @@
entitywither.n();
Iterator iterator = world.a(EntityHuman.class, entitywither.getBoundingBox().grow(50.0D, 50.0D, 50.0D)).iterator();