mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-31 03:50:36 +01:00
Add config setting for grindstone overstacking (#8156)
This commit is contained in:
parent
201ba4d328
commit
9e743bccff
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue