Jump to content

BlockEntity not gone when Block breaks


Recommended Posts

I've noticed that data that is on the BlockEntity remains if I break and place the block again.
However, if I place annother block that requires a block entity, break it, and place the original block back, it resets.
Also, if I place that block anywhere else the data does not reamin, but placing it on that position where it was changed keeps that data

I suspect that perhaps the BlockEntity is not "destroyed" when the block is, and actually remains there altho there's no air in there and not the block that previously was there...
I thought it is something MC is supposed to do on its own, I don't get any console errors or anything but when I checked I noticed there are some BlockEntites of my blocks that the block in their position is air, and those positions are ones my blocks were placed before...

Quitting and joining the world resets this.
Why does it happen and how can I fix this?

The BlockEntity only changes if I place another block in that position THAT ALSO HAS A BLOCK ENTITY!
If I place a block that does not implement EntityBlock, then that BlockEntity stays there

I have noticed Level#removeBlockEntity, but I assume I am not supposed to use that on every Block#onBreak... it just makes no sense.. does MC not supposed to do it on its own?

Edited by 1Mangomaster1
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.

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.

  • Create New...

Important Information

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