mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 07:19:56 +03:00
46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/item/crafting/IRecipe.java
|
|
+++ ../src-work/minecraft/net/minecraft/item/crafting/IRecipe.java
|
|
@@ -3,22 +3,23 @@
|
|
import net.minecraft.inventory.InventoryCrafting;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.NonNullList;
|
|
+import net.minecraft.util.ResourceLocation;
|
|
import net.minecraft.world.World;
|
|
-import net.minecraftforge.fml.relauncher.Side;
|
|
-import net.minecraftforge.fml.relauncher.SideOnly;
|
|
|
|
-public interface IRecipe
|
|
+public interface IRecipe extends net.minecraftforge.registries.IForgeRegistryEntry<IRecipe>
|
|
{
|
|
boolean matches(InventoryCrafting inv, World worldIn);
|
|
|
|
ItemStack getCraftingResult(InventoryCrafting inv);
|
|
|
|
- @SideOnly(Side.CLIENT)
|
|
boolean canFit(int width, int height);
|
|
|
|
ItemStack getRecipeOutput();
|
|
|
|
- NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv);
|
|
+ default NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv)
|
|
+ {
|
|
+ return net.minecraftforge.common.ForgeHooks.defaultRecipeGetRemainingItems(inv);
|
|
+ }
|
|
|
|
default NonNullList<Ingredient> getIngredients()
|
|
{
|
|
@@ -30,9 +31,12 @@
|
|
return false;
|
|
}
|
|
|
|
- @SideOnly(Side.CLIENT)
|
|
default String getGroup()
|
|
{
|
|
return "";
|
|
}
|
|
+
|
|
+ default org.bukkit.inventory.Recipe toBukkitRecipe() { return new catserver.server.inventory.CustomModRecipe(this, this.getRegistryName()); }
|
|
+
|
|
+ default void setKey(ResourceLocation key) {}
|
|
}
|