aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/SignItem.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/item/SignItem.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/world/item/SignItem.java.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/SignItem.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/SignItem.java.patch
new file mode 100644
index 0000000000..686ee12c1c
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/SignItem.java.patch
@@ -0,0 +1,42 @@
+--- a/net/minecraft/world/item/SignItem.java
++++ b/net/minecraft/world/item/SignItem.java
+@@ -11,6 +12,9 @@
+ import net.minecraft.world.level.block.state.BlockState;
+
+ public class SignItem extends StandingAndWallBlockItem {
++
++ public static BlockPos openSign; // CraftBukkit
++
+ public SignItem(Item.Properties properties, Block standingBlock, Block wallBlock) {
+ super(standingBlock, wallBlock, properties, Direction.DOWN);
+ }
+@@ -22,12 +26,23 @@
+ @Override
+ protected boolean updateCustomBlockEntityTag(BlockPos pos, Level level, @Nullable Player player, ItemStack stack, BlockState state) {
+ boolean flag = super.updateCustomBlockEntityTag(pos, level, player, stack, state);
+- if (!level.isClientSide
+- && !flag
+- && player != null
+- && level.getBlockEntity(pos) instanceof SignBlockEntity signBlockEntity
+- && level.getBlockState(pos).getBlock() instanceof SignBlock signBlock) {
+- signBlock.openTextEdit(player, signBlockEntity, true);
++
++ if (!level.isClientSide && !flag && player != null) {
++ BlockEntity tileentity = level.getBlockEntity(pos);
++
++ if (tileentity instanceof SignBlockEntity) {
++ SignBlockEntity tileentitysign = (SignBlockEntity) tileentity;
++ Block block = level.getBlockState(pos).getBlock();
++
++ if (block instanceof SignBlock) {
++ SignBlock blocksign = (SignBlock) block;
++
++ // CraftBukkit start - SPIGOT-4678
++ // blocksign.openTextEdit(entityhuman, tileentitysign, true);
++ SignItem.openSign = pos;
++ // CraftBukkit end
++ }
++ }
+ }
+
+ return flag;