mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-20 15:29:35 +00:00
37 lines
2.1 KiB
Diff
37 lines
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
Date: Thu, 28 Sep 2023 17:07:02 +0800
|
|
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
|
|
index 8e899549f09b8429cd63bd5c895253325f65ccab..7d88524eb5b193600c8985c68bb9ed10e3fe3c4d 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
|
@@ -243,17 +243,21 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
|
|
|
@Override
|
|
protected int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) {
|
|
- // Leaves start - fix update suppression crash
|
|
+ // Leaves start - fix update suppression crash - and cce fix
|
|
if (org.leavesmc.leaves.LeavesConfig.updateSuppressionCrashFix) {
|
|
try {
|
|
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
|
+ return org.leavesmc.leaves.LeavesConfig.cceUpdateSuppression ?
|
|
+ AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container) world.getBlockEntity(pos)) :
|
|
+ AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
|
} catch (ClassCastException ex) {
|
|
throw new org.leavesmc.leaves.util.UpdateSuppressionException(null, pos);
|
|
}
|
|
} else {
|
|
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
|
+ return org.leavesmc.leaves.LeavesConfig.cceUpdateSuppression ?
|
|
+ AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container) world.getBlockEntity(pos)) :
|
|
+ AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
|
}
|
|
- // Leaves end - fix update suppression crash
|
|
+ // Leaves end - fix update suppression crash - and cce fix
|
|
}
|
|
|
|
@Override
|