Created
May 25, 2015 11:08
-
-
Save bdew/94fcbea487bf49b7900d to your computer and use it in GitHub Desktop.
Carbon value registration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NBTTagCompound tag = new NBTTagCompound(); | |
ItemStack item = new ItemStack(Items.diamond); | |
// This is the item that will be registered | |
tag.setTag("item", item.writeToNBT(new NBTTagCompound())); | |
// Carbon value | |
tag.setInteger("value", 10000); | |
// Send message | |
FMLInterModComms.sendMessage("advgenerators", "AddCarbonValue", tag); | |
NBTTagCompound tag2 = new NBTTagCompound(); | |
ItemStack item2 = new ItemStack(Blocks.cactus); | |
// Another item | |
tag2.setTag("item", item2.writeToNBT(new NBTTagCompound())); | |
// This will use burn time in vanilla furnace as carbon value | |
tag2.setBoolean("useBurnTime", true); | |
// Send second message | |
FMLInterModComms.sendMessage("advgenerators", "AddCarbonValue", tag2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment