mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 07:19:56 +03:00
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraftforge/oredict/ShapelessOreRecipe.java
|
|
+++ ../src-work/minecraft/net/minecraftforge/oredict/ShapelessOreRecipe.java
|
|
@@ -32,11 +32,14 @@
|
|
import net.minecraft.item.crafting.ShapelessRecipes;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.common.ForgeHooks;
|
|
+import org.bukkit.inventory.Recipe;
|
|
+import luohuayu.CatServer.inventory.CustomModRecipe;
|
|
|
|
public class ShapelessOreRecipe implements IRecipe
|
|
{
|
|
protected ItemStack output = null;
|
|
protected ArrayList<Object> input = new ArrayList<Object>();
|
|
+ private ShapelessRecipes vanillaRecipe = null; //Svarka - bukkit compatibility
|
|
|
|
public ShapelessOreRecipe(Block result, Object... recipe){ this(new ItemStack(result), recipe); }
|
|
public ShapelessOreRecipe(Item result, Object... recipe){ this(new ItemStack(result), recipe); }
|
|
@@ -77,6 +80,7 @@
|
|
|
|
ShapelessOreRecipe(ShapelessRecipes recipe, Map<ItemStack, String> replacements)
|
|
{
|
|
+ vanillaRecipe = recipe;
|
|
output = recipe.getRecipeOutput();
|
|
|
|
for(ItemStack ingredient : recipe.recipeItems)
|
|
@@ -170,4 +174,13 @@
|
|
{
|
|
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
|
}
|
|
+
|
|
+ // Cauldron start - required for Bukkit API
|
|
+ @Override
|
|
+ public Recipe toBukkitRecipe() {
|
|
+ if (vanillaRecipe != null)
|
|
+ return vanillaRecipe.toBukkitRecipe();
|
|
+ return new CustomModRecipe(this);
|
|
+ }
|
|
+ // Cauldron end
|
|
}
|