Fix sneak-to-bulk-process (#1787)

This commit is contained in:
Amine Kacimi
2026-06-19 17:11:28 +01:00
committed by GitHub
parent 252b5adf97
commit 1484e4ad11

View File

@@ -20,7 +20,7 @@
+ if (newState == null) { + if (newState == null) {
+ return InteractionResult.PASS; + return InteractionResult.PASS;
+ } + }
+ if (level.purpurConfig.composterBulkProcess && player.isShiftKeyDown() && newState != state) { + if (level.purpurConfig.composterBulkProcess && player.isShiftKeyDown()) {
+ BlockState oldState; + BlockState oldState;
+ int oldCount, newCount, oldLevel, newLevel; + int oldCount, newCount, oldLevel, newLevel;
+ do { + do {
@@ -33,7 +33,7 @@
+ } + }
+ newCount = itemStack.getCount(); + newCount = itemStack.getCount();
+ newLevel = newState.getValue(ComposterBlock.LEVEL); + newLevel = newState.getValue(ComposterBlock.LEVEL);
+ } while (newCount > 0 && (newCount != oldCount || newLevel != oldLevel || newState != oldState)); + } while (newCount > 0 && (newCount != oldCount || newLevel != oldLevel));
+ } + }
+ // Purpur end - Sneak to bulk process composter + // Purpur end - Sneak to bulk process composter