Jump to content

[1.6.4]getBlockDropped...called after tile entity removed?


skullywag

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.