Skip to content

Commit eb6c297

Browse files
committed
Disable advancement antispam
This can be trivially reenabled by using `-Dquickbench.advancementAntispam=true`, tho intentionally otherwise undocumented due to breaking vanilla behavior.
1 parent ad4bb6e commit eb6c297

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/tfar/fastbench/MixinHooks.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
import tfar.fastbench.mixin.ContainerAccessor;
4040

4141
public final class MixinHooks {
42+
// Allows enabling the antispam, if desired for some reason.
43+
// Will remain intentionally undocumented outside of source.
44+
private static final boolean advancementAntispam = Boolean.getBoolean("quickbench.advancmenetAntispam");
4245

4346
public static boolean hascachedrecipe = false;
4447

@@ -87,7 +90,7 @@ public static ItemStack handleShiftCraft(Player player, AbstractContainerMenu co
8790
return ItemStack.EMPTY;
8891
}
8992

90-
if (!firedCriterion) {
93+
if (!advancementAntispam || !firedCriterion) {
9194
// Award the player the recipe for using it. Mimics vanilla behaviour.
9295
craftResult.awardUsedRecipes(player, input.getItems());
9396
// Prevents duplication.

0 commit comments

Comments
 (0)