mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
This option is useless, especially provided as an config option, since the normal server owners have no reasons to use it. And even for developers, this option is still unnecessary to use. It's also a very simple toggle which can be done in local stage during debugging or fixing specific issue.
29 lines
1.7 KiB
Diff
29 lines
1.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Thu, 16 Oct 2025 18:47:38 -0400
|
|
Subject: [PATCH] Fix inverted disabled in CraftCrafter#setSlotDisabled
|
|
|
|
Paper pull request: https://github.com/PaperMC/Paper/pull/13195
|
|
|
|
To sync Spigot's fix in `CraftCrafterView#setSlotDisabled`. And also clarify the Javadoc comments.
|
|
The `disabled` boolean passed to `CrafterBlockEntity#setSlotState` should be inverted,
|
|
since the `CrafterBlockEntity #setSlotState(slot, true)` is to enable the slot instead of to disable it.
|
|
|
|
For reference, see:
|
|
Paper commit: https://github.com/PaperMC/Paper/commit/1a0dce328a377fb7c1636e02070f839dbfd9a992
|
|
Original Spigot commit: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/d53d0d0b1987545d64ef1de1e53403893ff684fc
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCrafter.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCrafter.java
|
|
index 0b194fcc20cac9df719e0da7bf4f275853858a60..313b561341a549e7a0764321785e42f28e6ac041 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCrafter.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCrafter.java
|
|
@@ -63,7 +63,7 @@ public class CraftCrafter extends CraftLootable<CrafterBlockEntity> implements C
|
|
public void setSlotDisabled(int slot, boolean disabled) {
|
|
Preconditions.checkArgument(slot >= 0 && slot < 9, "Invalid slot index %s for Crafter", slot);
|
|
|
|
- this.getSnapshot().setSlotState(slot, disabled);
|
|
+ this.getSnapshot().setSlotState(slot, !disabled); // Leaf - Fix inverted disabled in CraftCrafter#setSlotDisabled
|
|
}
|
|
|
|
@Override
|