Posted April 9, 201312 yr I hope you understand what they have togehter. The save their energie in the items to. How are they doing that? Meta could not possible (at blockside)
April 9, 201312 yr I believe in the inventory it uses the meta-data and once placed it uses a TileEntity. I am the current head modder for the Metroid Prime Suits mod. I have no other staff members, so I'm hiring! I also co-own the SkyTekkit server. http://i1276.photobucket.com/albums/y480/Sypher40/MPSbanner_zps9d50d86a.png[/img]
April 9, 201312 yr Author I believe in the inventory it uses the meta-data and once placed it uses a TileEntity. how to store the storage is not my problem. My problem is how to transfer it between Item and block. (Both ways).
April 10, 201312 yr I believe Tile Entities can be used both in inventory and after being placed. Have your energy level set to a variable and store it in the Tile Entity, theoretically. I'm unsure of exactly how you would do this, but a good example would be the Redpower Batboxies. They store some of their energy even after being picked up, so I suggest looking at the Redpower source code if it's available. I am the current head modder for the Metroid Prime Suits mod. I have no other staff members, so I'm hiring! I also co-own the SkyTekkit server. http://i1276.photobucket.com/albums/y480/Sypher40/MPSbanner_zps9d50d86a.png[/img]
April 10, 201312 yr *laughs* Red Power 2 source code, available? *laughs a lot more* But seriously, I'm not guaranteeing the code quality, but Mekanism is an Open Source mod that has blocks that do what you want. Look at Energy cubes in here. But that is for 1.5.1... If you really want 1.4.7, just backtrack through the commits...
April 10, 201312 yr I believe Tile Entities can be used both in inventory and after being placed. Have your energy level set to a variable and store it in the Tile Entity, theoretically. I'm unsure of exactly how you would do this, but a good example would be the Redpower Batboxies. They store some of their energy even after being picked up, so I suggest looking at the Redpower source code if it's available. Nope, TileEntities are only "accessible" after placing a block. If you want to store TE data into an item (block in your inventory), then you have to use the NBTTagCompound of your ItemStack. Write the data into that NBTTag and if you place the block again, write the NBT data into the new TileEntity. Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
April 10, 201312 yr Author Ok. thanks you two for answering. That things store their information in NTB is not my problem i do want to know how to transver it. But that shouln't be to hard to find out. I' ll look at the source at mecanism. Also A quote *laughs* Red Power 2 source code, available? *laughs a lot more* For myself its no problem to get the sourcecode out of redpower . And every sourcecode free
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.