mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
* feat: enhance update suppression * fix: fix nest exception, better print * fix: bot update suppression catch * chore: format * feat: better performance * fix: fix build err * refactor * fix: throw IAE when call not from net.minecraft * format: use jbr annotation * fix: fix comment pos * chore: format * fix: fix comment * feat: add stacktrace to event
22 lines
1.5 KiB
Diff
22 lines
1.5 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/net/minecraft/world/level/block/ShulkerBoxBlock.java b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
|
index 787a4226789b0e6d35ef1a36601655b0a8666b6f..45e48e6d225a2741cd615345711072610d728474 100644
|
|
--- a/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
|
+++ b/net/minecraft/world/level/block/ShulkerBoxBlock.java
|
|
@@ -185,7 +185,9 @@ public class ShulkerBoxBlock extends BaseEntityBlock {
|
|
protected int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos pos) {
|
|
// Leaves start - update suppression crash fix
|
|
try {
|
|
- return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
|
+ return org.leavesmc.leaves.LeavesConfig.modify.oldMC.updater.cceUpdateSuppression ?
|
|
+ AbstractContainerMenu.getRedstoneSignalFromContainer((net.minecraft.world.Container) level.getBlockEntity(pos)) : // Leaves - make cce happy(?)
|
|
+ AbstractContainerMenu.getRedstoneSignalFromBlockEntity(level.getBlockEntity(pos));
|
|
} catch (ClassCastException ex) {
|
|
if (org.leavesmc.leaves.LeavesConfig.modify.updateSuppressionCrashFix) {
|
|
throw new org.leavesmc.leaves.util.UpdateSuppressionException(pos, null, this, null, ex);
|