summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemRedstone.patch
blob: 62cf2e3555be22fb93844b1d17179eb822537bcd (plain)
1
2
3
4
5
6
7
8
9
10
11
--- a/net/minecraft/server/ItemRedstone.java
+++ b/net/minecraft/server/ItemRedstone.java
@@ -11,7 +11,7 @@
         BlockPosition blockposition1 = flag ? blockposition : blockposition.shift(enumdirection);
         ItemStack itemstack = entityhuman.b(enumhand);
 
-        if (entityhuman.a(blockposition1, enumdirection, itemstack) && world.a(world.getType(blockposition1).getBlock(), blockposition1, false, enumdirection, (Entity) null) && Blocks.REDSTONE_WIRE.canPlace(world, blockposition1)) {
+        if (!itemstack.isEmpty() && entityhuman.a(blockposition1, enumdirection, itemstack) && world.a(world.getType(blockposition1).getBlock(), blockposition1, false, enumdirection, (Entity) null) && Blocks.REDSTONE_WIRE.canPlace(world, blockposition1)) { // CraftBukkit
             world.setTypeUpdate(blockposition1, Blocks.REDSTONE_WIRE.getBlockData());
             if (entityhuman instanceof EntityPlayer) {
                 CriterionTriggers.x.a((EntityPlayer) entityhuman, blockposition1, itemstack);