Skip to content

Instantly share code, notes, and snippets.

Created February 8, 2014 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8889274 to your computer and use it in GitHub Desktop.
Save anonymous/8889274 to your computer and use it in GitHub Desktop.
package amw.witchcraft;
import java.util.List;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class bookOfShadows extends Item
{
public static ItemStack reading;
static
{
NBTTagCompound nbt = new NBTTagCompound();
nbt.setString("author", "TheGoddess");
nbt.setString("title", "Book Of Shadows");
NBTTagList pages = new NBTTagList();
pages.appendTag(new NBTTagString("1", "Book Of Shadows"));
pages.appendTag(new NBTTagString("2", "Sources Of Power Flowers hold the most powerful magick, and to be able to harness magick, you have to understand them."));
pages.appendTag(new NBTTagString("3", "Soul Bush The Soul Bush can be found deep underground, where an ancient flower is trapped inside stone. It gives off light, even through the stone. If you smelt it, you'll find a soul fragment inside. This is what's left of the flower that once graced our lands."));
pages.appendTag(new NBTTagString("4", "Combine a wooden stick, vines and a soul fragment and the soul fragment will attach to these, and the long lost flower will be in your hand."));
pages.appendTag(new NBTTagString("5", "Shadow Bush This bush is more common than the Soul Bush, but it's nature is decieving. Don't try to walk on it, as you will fall straight through."));
nbt.setTag("pages", pages);
reading = new ItemStack(Item.writtenBook);
reading.setTagCompound(nbt);
}
public bookOfShadows(int id)
{
super(id);
setContainerItem(this);
setMaxStackSize(1);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(int itemId, CreativeTabs creativeTab, List subTypes)
{
subTypes.add(reading);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment