org.bukkit.craftbukkit.inventory.CraftFurnaceRecipe Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chest-server Show documentation
Show all versions of chest-server Show documentation
A spigot fork to kotlin structure and news.
The newest version!
package org.bukkit.craftbukkit.inventory;
import net.minecraft.server.RecipesFurnace;
import org.bukkit.inventory.FurnaceRecipe;
import org.bukkit.inventory.ItemStack;
public class CraftFurnaceRecipe extends FurnaceRecipe implements CraftRecipe {
public CraftFurnaceRecipe(ItemStack result, ItemStack source) {
super(result, source.getType(), source.getDurability());
}
public static CraftFurnaceRecipe fromBukkitRecipe(FurnaceRecipe recipe) {
if (recipe instanceof CraftFurnaceRecipe) {
return (CraftFurnaceRecipe) recipe;
}
return new CraftFurnaceRecipe(recipe.getResult(), recipe.getInput());
}
@Override
public void addToCraftingManager() {
ItemStack result = this.getResult();
ItemStack input = this.getInput();
RecipesFurnace.getInstance().registerRecipe(CraftItemStack.asNMSCopy(input), CraftItemStack.asNMSCopy(result));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy