Paper/patches/server/0878-Fix-incorrect-crafting-result-amount-for-fireworks.patch
Owen 89d51d5f29
Allow enabling sand duping (#10191)
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable.

It should be noted that this decision does not promise all future exploits will be configurable.
2024-03-03 17:05:34 -05:00

21 Zeilen
1.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Redned <redned235@gmail.com>
Date: Mon, 12 Jun 2023 11:54:12 -0500
Subject: [PATCH] Fix incorrect crafting result amount for fireworks
Although vanilla does not specifically call this method anywhere, this fixes a bug where the result using the Bukkit API returns the wrong amount.
diff --git a/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java b/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
index af7e7a63eacad2367453924806ffb002c33db951..25405c8eb76e428e689b3afad2c00529f687f550 100644
--- a/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
+++ b/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
@@ -81,7 +81,7 @@ public class FireworkRocketRecipe extends CustomRecipe {
@Override
public ItemStack getResultItem(RegistryAccess registryManager) {
- return new ItemStack(Items.FIREWORK_ROCKET);
+ return new ItemStack(Items.FIREWORK_ROCKET, 3); // Paper - Fix incorrect crafting result amount
}
@Override