How to maintain NBT data when breaking a block?

Started by owslashbacon on Wed, 02/19/2020 - 00:49

Topic category: Help with modding

Last seen on 00:30, 25. Mar 2020
Joined Feb 2020
User points:

User statistics:

  • Modifications:
  • Mods of the week:
  • Forum topics:
  • Comments:
  • Wiki pages:
  • Tracker tickets:
  • Invalid tickets:
How to maintain NBT data when breaking a block?
Wed, 02/19/2020 - 00:49

I am trying to make a block that has generated data on it that I am saving into NBT number tags. However, I need that data to be saved when the block is broken and replaced. Is there a simpler way to do this without hard coding the item drop when the block is broken, applying the NBT data to the item, and then having the item create a new block with the items NBT data applied when placed?

1Upvote this forum topic