Posted July 18, 20169 yr So I've never really worked with Items in Minecraft before, and I'm pretty confused. I want to make an item where I right click on a Controller block and then right click on all the blocks the Controller will operate. This would require somehow storing a BlockPos in the item; and I'm not even sure if items get their own instances (like TileEntities), or if they're just designed to handle logic (like Blocks). Anyway, whats the simplest way I can do this? "you seem to be THE best modder I've seen imo." ~spynathan ლ(́◉◞౪◟◉‵ლ
July 18, 20169 yr Store the BlockPos in the item's NBT and read it when right-clicking. http://minecraft.curseforge.com/members/sblectric/projects
July 18, 20169 yr If using 1.9+, you should be using the Capability system instead of interacting with ItemStack NBT directly. The reason you need to use NBT / Capabilities is indeed that unlike TileEntities but similar to Blocks, Items do not have unique instances so you cannot store any mutable data in the class. http://i.imgur.com/NdrFdld.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.