Paper/nms-patches/RecipeFireworksStar.patch
2019-04-23 12:00:00 +10:00

31 lines
1.8 KiB
Diff

--- a/net/minecraft/server/RecipeFireworksStar.java
+++ b/net/minecraft/server/RecipeFireworksStar.java
@@ -6,12 +6,12 @@
import java.util.List;
import java.util.Map;
-public class RecipeFireworksStar extends IRecipeComplex {
+public class RecipeFireworksStar extends ShapelessRecipes { // CraftBukkit - added extends
private static final RecipeItemStack a = RecipeItemStack.a(Items.FIRE_CHARGE, Items.FEATHER, Items.GOLD_NUGGET, Items.SKELETON_SKULL, Items.WITHER_SKELETON_SKULL, Items.CREEPER_HEAD, Items.PLAYER_HEAD, Items.DRAGON_HEAD, Items.ZOMBIE_HEAD);
private static final RecipeItemStack b = RecipeItemStack.a(Items.DIAMOND);
private static final RecipeItemStack c = RecipeItemStack.a(Items.GLOWSTONE_DUST);
- private static final Map<Item, ItemFireworks.EffectType> d = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
+ private static final Map<Item, ItemFireworks.EffectType> d = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error
hashmap.put(Items.FIRE_CHARGE, ItemFireworks.EffectType.LARGE_BALL);
hashmap.put(Items.FEATHER, ItemFireworks.EffectType.BURST);
hashmap.put(Items.GOLD_NUGGET, ItemFireworks.EffectType.STAR);
@@ -24,9 +24,11 @@
});
private static final RecipeItemStack e = RecipeItemStack.a(Items.GUNPOWDER);
+ // CraftBukkit start - Delegate to new parent class with bogus info
public RecipeFireworksStar(MinecraftKey minecraftkey) {
- super(minecraftkey);
+ super(minecraftkey, "", new ItemStack(Items.FIREWORK_STAR, 0), NonNullList.a(RecipeItemStack.a, RecipeItemStack.a(Items.GUNPOWDER)));
}
+ // CraftBukkit end
public boolean a(InventoryCrafting inventorycrafting, World world) {
boolean flag = false;