Add missing book cloning recipe info. Fix slimefun compatibility.
This commit is contained in:
parent
3c4f2ba31b
commit
6ef0add1c7
@ -0,0 +1,21 @@
|
||||
package io.izzel.arclight.mixin.core.item.crafting;
|
||||
|
||||
import io.izzel.arclight.bridge.item.crafting.IRecipeBridge;
|
||||
import io.izzel.arclight.mod.util.ArclightSpecialRecipe;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.crafting.BookCloningRecipe;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.Recipe;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
@Mixin(BookCloningRecipe.class)
|
||||
public class BookCloningRecipeMixin implements IRecipeBridge {
|
||||
|
||||
@Override
|
||||
public Recipe bridge$toBukkitRecipe() {
|
||||
return ArclightSpecialRecipe.shapeless(new ItemStack(Material.WRITTEN_BOOK), (IRecipe<?>) this, Ingredient.fromItems(Items.WRITTEN_BOOK));
|
||||
}
|
||||
}
|
||||
@ -1,22 +1,27 @@
|
||||
package io.izzel.arclight.mixin.core.item.crafting;
|
||||
|
||||
import io.izzel.arclight.bridge.item.crafting.IRecipeBridge;
|
||||
import io.izzel.arclight.mod.util.ArclightSpecialRecipe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.inventory.CraftItemStack;
|
||||
import org.bukkit.inventory.Recipe;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import io.izzel.arclight.mod.util.ArclightSpecialRecipe;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@Mixin(IRecipe.class)
|
||||
public interface IRecipeMixin extends IRecipeBridge {
|
||||
|
||||
// @formatter:off
|
||||
@Shadow ItemStack getRecipeOutput();
|
||||
// @formatter:on
|
||||
|
||||
default Recipe toBukkitRecipe() {
|
||||
return bridge$toBukkitRecipe();
|
||||
}
|
||||
|
||||
@Override
|
||||
default Recipe bridge$toBukkitRecipe() {
|
||||
return ArclightSpecialRecipe.shapeless(new ItemStack(Material.AIR), (IRecipe<?>) this);
|
||||
return ArclightSpecialRecipe.shapeless(CraftItemStack.asCraftMirror(getRecipeOutput()), (IRecipe<?>) this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,6 +287,7 @@
|
||||
"item.crafting.ArmorDyeRecipeMixin",
|
||||
"item.crafting.BannerDuplicateRecipeMixin",
|
||||
"item.crafting.BlastingRecipeMixin",
|
||||
"item.crafting.BookCloningRecipeMixin",
|
||||
"item.crafting.CampfireCookingRecipeMixin",
|
||||
"item.crafting.FireworkRocketRecipeMixin",
|
||||
"item.crafting.FireworkStarFadeRecipeMixin",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user