mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 08:00:02 +03:00
42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
--- ../src-base/minecraft/net/minecraftforge/oredict/ShapedOreRecipe.java
|
|
+++ ../src-work/minecraft/net/minecraftforge/oredict/ShapedOreRecipe.java
|
|
@@ -32,6 +32,8 @@
|
|
import net.minecraft.item.crafting.ShapedRecipes;
|
|
import net.minecraft.world.World;
|
|
import net.minecraftforge.common.ForgeHooks;
|
|
+import org.bukkit.inventory.Recipe;
|
|
+import luohuayu.CatServer.inventory.CustomModRecipe;
|
|
|
|
public class ShapedOreRecipe implements IRecipe
|
|
{
|
|
@@ -44,7 +46,9 @@
|
|
protected int width = 0;
|
|
protected int height = 0;
|
|
protected boolean mirrored = true;
|
|
+ private ShapedRecipes vanillaRecipe = null; // Cauldron - bukkit compatibility
|
|
|
|
+
|
|
public ShapedOreRecipe(Block result, Object... recipe){ this(new ItemStack(result), recipe); }
|
|
public ShapedOreRecipe(Item result, Object... recipe){ this(new ItemStack(result), recipe); }
|
|
public ShapedOreRecipe(ItemStack result, Object... recipe)
|
|
@@ -146,6 +150,7 @@
|
|
|
|
ShapedOreRecipe(ShapedRecipes recipe, Map<ItemStack, String> replacements)
|
|
{
|
|
+ vanillaRecipe = recipe; // Cauldron - bukkit compatibility
|
|
output = recipe.getRecipeOutput();
|
|
width = recipe.recipeWidth;
|
|
height = recipe.recipeHeight;
|
|
@@ -280,4 +285,11 @@
|
|
{
|
|
return ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public Recipe toBukkitRecipe() {
|
|
+ if(vanillaRecipe != null)
|
|
+ return vanillaRecipe.toBukkitRecipe();
|
|
+ return new CustomModRecipe(this);
|
|
+ }
|
|
}
|