2018-07-15 02:00:00 +02:00
|
|
|
--- a/net/minecraft/server/FurnaceRecipe.java
|
|
|
|
+++ b/net/minecraft/server/FurnaceRecipe.java
|
|
|
|
@@ -2,6 +2,10 @@
|
|
|
|
|
|
|
|
import com.google.gson.JsonElement;
|
|
|
|
import com.google.gson.JsonObject;
|
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftFurnaceRecipe;
|
|
|
|
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
|
|
|
+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
|
|
|
+import org.bukkit.inventory.Recipe;
|
|
|
|
|
|
|
|
public class FurnaceRecipe implements IRecipe {
|
|
|
|
|
2018-08-17 12:40:54 +02:00
|
|
|
@@ -56,6 +60,19 @@
|
2018-07-15 02:00:00 +02:00
|
|
|
return this.key;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public Recipe toBukkitRecipe() {
|
|
|
|
+ CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
|
|
|
|
+ RecipeItemStack list = this.ingredient;
|
|
|
|
+ list.buildChoices();
|
|
|
|
+ net.minecraft.server.ItemStack stack = list.choices[0];
|
|
|
|
+
|
2018-08-17 12:40:54 +02:00
|
|
|
+ CraftFurnaceRecipe recipe = new CraftFurnaceRecipe(CraftNamespacedKey.fromMinecraft(this.key), result, CraftItemStack.asCraftMirror(stack), this.experience, this.cookingTime);
|
|
|
|
+ recipe.setGroup(this.group);
|
|
|
|
+
|
|
|
|
+ return recipe;
|
2018-07-15 02:00:00 +02:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
public static class a implements RecipeSerializer<FurnaceRecipe> {
|
|
|
|
|
|
|
|
public a() {}
|
2018-08-17 12:40:54 +02:00
|
|
|
@@ -106,11 +123,11 @@
|
2018-07-15 02:00:00 +02:00
|
|
|
return "smelting";
|
|
|
|
}
|
|
|
|
|
|
|
|
- public IRecipe a(MinecraftKey minecraftkey, PacketDataSerializer packetdataserializer) {
|
|
|
|
+ public FurnaceRecipe a(MinecraftKey minecraftkey, PacketDataSerializer packetdataserializer) { // CraftBukkit - decompile error
|
|
|
|
return this.b(minecraftkey, packetdataserializer);
|
|
|
|
}
|
|
|
|
|
|
|
|
- public IRecipe a(MinecraftKey minecraftkey, JsonObject jsonobject) {
|
|
|
|
+ public FurnaceRecipe a(MinecraftKey minecraftkey, JsonObject jsonobject) { // CraftBukkit - decompile error
|
|
|
|
return this.b(minecraftkey, jsonobject);
|
|
|
|
}
|
|
|
|
}
|