13
0
geforkt von Mirrors/Paper

Add config setting for grindstone overstacking (#8156)

Dieser Commit ist enthalten in:
uku 2022-10-23 01:25:17 +02:00
Ursprung 201ba4d328
Commit 9e743bccff
2 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -578,6 +578,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public boolean performUsernameValidation = true;
+ @Comment("This setting controls if players should be able to create headless pistons.")
+ public boolean allowHeadlessPistons = false;
+ @Comment("This setting controls if grindstones should be able to output overstacked items (such as cursed books).")
+ public boolean allowGrindstoneOverstacking = false;
+ }
+
+ public Commands commands;

Datei anzeigen

@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
itemstack2 = this.mergeEnchants(itemstack, itemstack1);
if (!itemstack2.isDamageableItem()) {
- if (!ItemStack.matches(itemstack, itemstack1)) {
+ if (!ItemStack.matches(itemstack, itemstack1) || itemstack2.getMaxStackSize() == 1) { // Paper - add max stack size check
+ if (!ItemStack.matches(itemstack, itemstack1) || (itemstack2.getMaxStackSize() == 1 && !io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowGrindstoneOverstacking)) { // Paper - add max stack size check & config value
this.resultSlots.setItem(0, ItemStack.EMPTY);
this.broadcastChanges();
return;