9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-23 08:59:31 +00:00

Look, A Baka... FIX CCE

This commit is contained in:
violetc
2023-12-12 13:09:17 +08:00
parent 6650bccd95
commit f0dba9bfad

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] CCE update suppression
diff --git a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
index dd40b975b72f7bd16f2c491a36c39b7098c66f2b..b312d46de96ac63d6ff4b7e82eae01d5cb92a843 100644 index dd40b975b72f7bd16f2c491a36c39b7098c66f2b..bb9ac66ab47cb37f545d319630ff28e600c8a038 100644
--- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java --- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
@@ -265,17 +265,21 @@ public class ShulkerBoxBlock extends BaseEntityBlock { @@ -265,17 +265,21 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
@@ -18,7 +18,7 @@ index dd40b975b72f7bd16f2c491a36c39b7098c66f2b..b312d46de96ac63d6ff4b7e82eae01d5
try { try {
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos)); - return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
+ return top.leavesmc.leaves.LeavesConfig.cceUpdateSuppression ? + return top.leavesmc.leaves.LeavesConfig.cceUpdateSuppression ?
+ AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container) world) : + AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container) world.getBlockEntity(pos)) :
+ AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos)); + AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
} catch (ClassCastException ex) { } catch (ClassCastException ex) {
throw new top.leavesmc.leaves.util.UpdateSuppressionException(null, pos); throw new top.leavesmc.leaves.util.UpdateSuppressionException(null, pos);
@@ -26,7 +26,7 @@ index dd40b975b72f7bd16f2c491a36c39b7098c66f2b..b312d46de96ac63d6ff4b7e82eae01d5
} else { } else {
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos)); - return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
+ return top.leavesmc.leaves.LeavesConfig.cceUpdateSuppression ? + return top.leavesmc.leaves.LeavesConfig.cceUpdateSuppression ?
+ AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container) world) : + AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container) world.getBlockEntity(pos)) :
+ AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos)); + AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
} }
- // Leaves end - fix update suppression crash - // Leaves end - fix update suppression crash