skullywag Posted February 1, 2014 Posted February 1, 2014 Hi all, Me again. One of those nights. So im trying to add some meta items to the drop array of a block using getBlockDropped, the issue is that I cannot get a the tile entity for said block inside this method which I need to do as it contains data i need to decide what item to drop, im guessing its called after the tile entity is removed however if i remove the block under my block (my block has a canStay method) it gets the TE and drops the right item. So for actual block breakage should I be doing this higher up the chain somewhere and if so where? just to confirm the process i want, my block when in meta 0,1,2 and 3 if destroyed will drop an item of metas 0-15 based on an NBT tag value on the TE. If its meta is 4 it drops a different item (with meta 0) so no problems there this works. Quote
Jdb100 Posted February 1, 2014 Posted February 1, 2014 Why not just use onBlockBroken or something like that I forget the name but that's what I use for all my blocks with GUIs and it works. Quote Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
skullywag Posted February 1, 2014 Author Posted February 1, 2014 ah probably should have posted that I already figured this out, its in breakBlock, but thanks for the reply. But o do have another problem related to this, my blocks change meta IDS on update so the blockBreak fires even though the block hasnt been "broken" how would I get around this...my initial question in OP still stands Quote
Jdb100 Posted February 1, 2014 Posted February 1, 2014 Can we see the code please otherwise we can't help much. Quote Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
Recommended Posts
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.