aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0006-MC-Dev-fixes.patch
diff options
context:
space:
mode:
authorOwen <[email protected]>2023-07-22 17:00:50 -0400
committerGitHub <[email protected]>2023-07-22 17:00:50 -0400
commit383f0ed92421c4a04be7ba4c11067022cfd95928 (patch)
tree93f33488034e96aa335198355596b5768939aed3 /patches/server/0006-MC-Dev-fixes.patch
parent24d690fe7ee7b88ab6eeb968f2c61c889c9b373d (diff)
downloadPaper-383f0ed92421c4a04be7ba4c11067022cfd95928.tar.gz
Paper-383f0ed92421c4a04be7ba4c11067022cfd95928.zip
Remove sign ticking (#9478)
Minecraft now ticks signs in order to validate the playerWhoMayEdit field. This is a horrible idea, as this means that even waxed signs are ticked for essentially no reason. This moves the logic lazily onto the getter.
Diffstat (limited to 'patches/server/0006-MC-Dev-fixes.patch')
-rw-r--r--patches/server/0006-MC-Dev-fixes.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/patches/server/0006-MC-Dev-fixes.patch b/patches/server/0006-MC-Dev-fixes.patch
index 2af06b8e38..edb4a1d654 100644
--- a/patches/server/0006-MC-Dev-fixes.patch
+++ b/patches/server/0006-MC-Dev-fixes.patch
@@ -184,6 +184,23 @@ index 4d2d23ff118e9307d50ca2a5194b83450c91a752..ab6dc3449a1d3b7acf1d7bf5ac1c2422
}));
this.byName = Maps.newHashMap(builder.build()); // CraftBukkit
RecipeManager.LOGGER.info("Loaded {} recipes", map1.size());
+diff --git a/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java b/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java
+index 769614aeb4ca914abcf0f770240a3d4c916f08cd..6c9d163b9f857806461dc72e54713f1a4f3a5c31 100644
+--- a/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java
++++ b/src/main/java/net/minecraft/world/level/block/CeilingHangingSignBlock.java
+@@ -53,8 +53,10 @@ public class CeilingHangingSignBlock extends SignBlock {
+ public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
+ BlockEntity itemStack = world.getBlockEntity(pos);
+ if (itemStack instanceof SignBlockEntity signBlockEntity) {
+- ItemStack itemStack = player.getItemInHand(hand);
+- if (this.shouldTryToChainAnotherHangingSign(player, hit, signBlockEntity, itemStack)) {
++ // Paper start - decompile fixes
++ ItemStack itemStack0 = player.getItemInHand(hand);
++ if (this.shouldTryToChainAnotherHangingSign(player, hit, signBlockEntity, itemStack0)) {
++ // Paper end - decompile fixes
+ return InteractionResult.PASS;
+ }
+ }
diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java
index 91bb294be2cd8ab3467a62006a5a2751e0bec4ba..5ab7df0042391cb621ed78a187dc20333e344186 100644
--- a/src/main/java/net/minecraft/world/level/block/SignBlock.java
@@ -209,6 +226,23 @@ index 91bb294be2cd8ab3467a62006a5a2751e0bec4ba..5ab7df0042391cb621ed78a187dc2033
if (!world.isClientSide) {
boolean bl2 = signBlockEntity.isFacingFrontText(player);
SignText signText = signBlockEntity.getText(bl2);
+diff --git a/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java b/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java
+index db48010e633165972d2eac339dd7d1fd5a2f5bd8..d818d3ea6d28aa6ffb62127d4efd585d6f2935d1 100644
+--- a/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java
++++ b/src/main/java/net/minecraft/world/level/block/WallHangingSignBlock.java
+@@ -52,8 +52,10 @@ public class WallHangingSignBlock extends SignBlock {
+ public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
+ BlockEntity itemStack = world.getBlockEntity(pos);
+ if (itemStack instanceof SignBlockEntity signBlockEntity) {
+- ItemStack itemStack = player.getItemInHand(hand);
+- if (this.shouldTryToChainAnotherHangingSign(state, player, hit, signBlockEntity, itemStack)) {
++ // Paper start - decompile fixes
++ ItemStack itemStack0 = player.getItemInHand(hand);
++ if (this.shouldTryToChainAnotherHangingSign(state, player, hit, signBlockEntity, itemStack0)) {
++ // Paper end
+ return InteractionResult.PASS;
+ }
+ }
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
index b445f90b70d5a74f5bdc1b081500da4742e1c093..afba733824d84d650e669eda028bf4d28cf006b4 100644
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java