SPIGOT-4678: Fix placing signs in certain circumstances

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-03-24 21:34:57 +11:00
parent 48640d6365
commit 23997eddd5
2 changed files with 36 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
--- a/net/minecraft/server/ItemSign.java
+++ b/net/minecraft/server/ItemSign.java
@@ -4,6 +4,8 @@
public class ItemSign extends ItemBlockWallable {
+ public static boolean openSign; // CraftBukkit
+
public ItemSign(Item.Info item_info) {
super(Blocks.SIGN, Blocks.WALL_SIGN, item_info);
}
@@ -12,7 +14,10 @@
boolean flag = super.a(blockposition, world, entityhuman, itemstack, iblockdata);
if (!world.isClientSide && !flag && entityhuman != null) {
- entityhuman.openSign((TileEntitySign) world.getTileEntity(blockposition));
+ // CraftBukkit start - SPIGOT-4678
+ // entityhuman.openSign((TileEntitySign) world.getTileEntity(blockposition));
+ ItemSign.openSign = true;
+ // CraftBukkit end
}
return flag;