mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
SPIGOT-3486: Missing check in redstone placement
By: md_5 <git@md-5.net>
This commit is contained in:
parent
cdeade672d
commit
19850b49b5
1 changed files with 11 additions and 0 deletions
11
paper-server/nms-patches/ItemRedstone.patch
Normal file
11
paper-server/nms-patches/ItemRedstone.patch
Normal file
|
@ -0,0 +1,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);
|
Loading…
Add table
Reference in a new issue