mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-22 00:19:33 +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 66f652724d1a4a27d75cd2f15c0a50879d5bafc5..346c749aaf4cd8fad14b0813b516576023bf1ee1 100644
|
|
--- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
|
+++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
|
@@ -249,17 +249,21 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
|
|
|
@Override
|
|
public int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) {
|
|
- // Leaves start - fix update suppression crash
|
|
+ // Leaves start - fix update suppression crash - and cce fix
|
|
if (top.leavesmc.leaves.LeavesConfig.updateSuppressionCrashFix) {
|
|
try {
|
|
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
|
+ return top.leavesmc.leaves.LeavesConfig.cceUpdateSuppression ?
|
|
+ AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container) world) :
|
|
+ AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
|
} catch (ClassCastException ex) {
|
|
throw new top.leavesmc.leaves.util.UpdateSuppressionException(null, pos);
|
|
}
|
|
} else {
|
|
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
|
+ return top.leavesmc.leaves.LeavesConfig.cceUpdateSuppression ?
|
|
+ AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container) world) :
|
|
+ AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
|
}
|
|
- // Leaves end - fix update suppression crash
|
|
+ // Leaves end - fix update suppression crash - and cce fix
|
|
}
|
|
|
|
@Override
|