mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-24 22:14:45 +00:00
56 lines
1.5 KiB
Java
56 lines
1.5 KiB
Java
/**
|
|
* This class was created by <Vazkii>. It's distributed as
|
|
* part of the Botania Mod. Get the Source Code in github:
|
|
* https://github.com/Vazkii/Botania
|
|
*
|
|
* Botania is Open Source and distributed under the
|
|
* Botania License: http://botaniamod.net/license.php
|
|
*
|
|
* File Created @ [Jan 25, 2015, 6:14:13 PM (GMT)]
|
|
*/
|
|
package vazkii.botania.common.item;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
import net.minecraftforge.oredict.RecipeSorter;
|
|
import net.minecraftforge.oredict.RecipeSorter.Category;
|
|
import vazkii.botania.common.crafting.recipe.SpellClothRecipe;
|
|
import vazkii.botania.common.lib.LibItemNames;
|
|
|
|
import javax.annotation.Nonnull;
|
|
import java.awt.*;
|
|
|
|
public class ItemSpellCloth extends ItemMod {
|
|
|
|
public ItemSpellCloth() {
|
|
super(LibItemNames.SPELL_CLOTH);
|
|
setMaxDamage(35);
|
|
setMaxStackSize(1);
|
|
setNoRepair();
|
|
|
|
GameRegistry.addRecipe(new SpellClothRecipe());
|
|
RecipeSorter.register("botania:spellCloth", SpellClothRecipe.class, Category.SHAPELESS, "");
|
|
}
|
|
|
|
@Override
|
|
public boolean isBookEnchantable(ItemStack stack, ItemStack book) {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public boolean hasContainerItem(ItemStack stack) {
|
|
return true;
|
|
}
|
|
|
|
@Nonnull
|
|
@Override
|
|
public ItemStack getContainerItem(@Nonnull ItemStack itemStack) {
|
|
ItemStack stack = itemStack.copy();
|
|
stack.setItemDamage(stack.getItemDamage() + 1);
|
|
return stack;
|
|
}
|
|
|
|
}
|