mirror of
https://github.com/LeavesMC/Leaves.git
synced 2026-01-04 15:41:31 +00:00
Update 1.19.3 DEV
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Player can edit sign
|
||||
|
||||
|
||||
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 ed3d78494735ceda14ad0ea23adeadc374f3b35e..d0e9fd987687d6a0642a9e312668697f98106a0a 100644
|
||||
index aface9a9697095a29edaf73c9cdabc2c1414b9d7..c2053114c4e89418b9ae6e24a99d11a9542cd676 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SignBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.world.level.block;
|
||||
@@ -16,7 +16,7 @@ index ed3d78494735ceda14ad0ea23adeadc374f3b35e..d0e9fd987687d6a0642a9e312668697f
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
@@ -73,6 +74,7 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
@@ -73,15 +74,24 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
boolean bl2 = itemStack.is(Items.GLOW_INK_SAC);
|
||||
boolean bl3 = itemStack.is(Items.INK_SAC);
|
||||
boolean bl4 = (bl2 || bl || bl3) && player.getAbilities().mayBuild;
|
||||
@@ -24,9 +24,14 @@ index ed3d78494735ceda14ad0ea23adeadc374f3b35e..d0e9fd987687d6a0642a9e312668697f
|
||||
if (world.isClientSide) {
|
||||
return bl4 ? InteractionResult.SUCCESS : InteractionResult.CONSUME;
|
||||
} else {
|
||||
@@ -82,6 +84,14 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
|
||||
- BlockEntity bl5 = world.getBlockEntity(pos);
|
||||
- if (!(bl5 instanceof SignBlockEntity)) {
|
||||
+ BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
+ if (!(blockEntity instanceof SignBlockEntity)) {
|
||||
return InteractionResult.PASS;
|
||||
} else {
|
||||
SignBlockEntity signBlockEntity = (SignBlockEntity)blockEntity;
|
||||
- SignBlockEntity signBlockEntity = (SignBlockEntity)bl5;
|
||||
+ SignBlockEntity signBlockEntity = (SignBlockEntity)blockEntity;
|
||||
boolean bl5 = signBlockEntity.hasGlowingText();
|
||||
+ // Leaves start - Player can edit sign
|
||||
+ if (top.leavesmc.leaves.LeavesConfig.playerCanEditSign && bl7 && !signBlockEntity.isEditable) {
|
||||
|
||||
Reference in New Issue
Block a user