3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/nms-patches/RecipeFireworksStar.patch

31 Zeilen
1.8 KiB
Diff

2018-07-15 02:00:00 +02:00
--- a/net/minecraft/server/RecipeFireworksStar.java
+++ b/net/minecraft/server/RecipeFireworksStar.java
2018-12-25 22:00:00 +01:00
@@ -6,12 +6,12 @@
import java.util.List;
2018-07-15 02:00:00 +02:00
import java.util.Map;
-public class RecipeFireworksStar extends IRecipeComplex {
+public class RecipeFireworksStar extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
2018-12-06 00:00:00 +01:00
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);
2018-07-15 02:00:00 +02:00
- 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);
2018-12-25 22:00:00 +01:00
@@ -24,9 +24,11 @@
2018-07-15 02:00:00 +02:00
});
2018-12-06 00:00:00 +01:00
private static final RecipeItemStack e = RecipeItemStack.a(Items.GUNPOWDER);
2018-07-15 02:00:00 +02:00
+ // 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(IInventory iinventory, World world) {
if (!(iinventory instanceof InventoryCrafting)) {