PaperMC/nms-patches/RecipeFireworks.patch

22 lines
1 KiB
Diff
Raw Normal View History

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/RecipeFireworks.java
+++ b/net/minecraft/server/RecipeFireworks.java
2018-07-15 02:00:00 +02:00
@@ -1,14 +1,16 @@
package net.minecraft.server;
2018-07-15 02:00:00 +02:00
-public class RecipeFireworks extends IRecipeComplex {
2017-05-30 13:25:59 +02:00
+public class RecipeFireworks extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
2018-07-15 02:00:00 +02:00
private static final RecipeItemStack a = RecipeItemStack.a(new IMaterial[] { Items.PAPER});
private static final RecipeItemStack b = RecipeItemStack.a(new IMaterial[] { Items.GUNPOWDER});
private static final RecipeItemStack c = RecipeItemStack.a(new IMaterial[] { Items.FIREWORK_STAR});
2015-02-26 23:41:06 +01:00
+ // CraftBukkit start - Delegate to new parent class with bogus info
2018-07-15 02:00:00 +02:00
public RecipeFireworks(MinecraftKey minecraftkey) {
- super(minecraftkey);
+ super(minecraftkey, "", new ItemStack(Items.FIREWORK_ROCKET, 0), NonNullList.a(RecipeItemStack.a, RecipeItemStack.a(Items.GUNPOWDER)));
2016-11-17 02:41:03 +01:00
}
+ // CraftBukkit end
2018-07-15 02:00:00 +02:00
public boolean a(IInventory iinventory, World world) {
if (!(iinventory instanceof InventoryCrafting)) {