Skip to content

Instantly share code, notes, and snippets.

@cpw

cpw/Parts.java Secret

Last active August 29, 2015 14:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpw/9af398451a20459ac263 to your computer and use it in GitHub Desktop.
Save cpw/9af398451a20459ac263 to your computer and use it in GitHub Desktop.
public class Parts {
// Populate customDiamond with an ItemStack referring to the minecraft diamond item, with meta 1 and nbttag as specified
@ItemStackHolder(value="minecraft:diamond",meta=1,nbt="{\"my.nbttag\":1}")
public static final ItemStack customDiamond = null;
// Populate woodenshovel with an ItemStack referring to a wooden shovel
@ItemStackHolder("minecraft:wooden_shovel")
public static final ItemStack woodenshovel = null;
// Populate ironChest with an ItemStack referring to the iron_chest object from the mod IronChests, if it is loaded, otherwise
// the field will have a NULL value
@ItemStackHolder("IronChest:iron_chest")
public static final ItemStack ironChest = null;
// Populate enchantedAxe with an ItemStack referring to the diamond axe object, with a silk touch enchantment
@ItemStackHolder(value="minecraft:diamond_axe", nbt="{ench:[{id:33,lvl:1}]}")
public static final ItemStack enchantedAxe = null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment