More precise/extensive NBT management methods in procedures

Started by MeepJJ on

Topic category: Feature requests and ideas for MCreator

Last seen on 14:44, 25. May 2019
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
More precise/extensive NBT management methods in procedures

Hi! I've recently hit a roadblock because of MCreator's limited nbt functions. Here are some ideas that might be worth looking into:

  • All nbt created/modified inside procedures is automatically put inside {ForgeData:{here}}. Although this prevents accidental overwriting vanilla block data, in some cases it may be necessary. An option to read/write nbt data outside of ForgeData would be appreciated. This could come in handy if you were making a mod where you can lock/unlock chests with keys, etc.

 

  • String-type nbt would also be very helpful in cases like recording the name of the last player who opened a specific chest, maybe testing if an item's name changed, etc. This would open up many possibilities in retaining information.

 

Thanks for taking the time to read my suggestions. I am hopeful that these might be considered. :)

Last seen on 17:17, 10. Jan 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The reason why this happens…
Sun, 05/12/2019 - 11:53

The reason why this happens is that MCreator uses TileEntity#getTileData() that returns the ForgeData from the NBTTagCompound of the TileEntity. This is fine if you want to add your own data to an external TileEntity. If you want to override a vanilla tag, you could possibly force the TileEnttiy to read from a modified version of it own NBT.

Last seen on 14:44, 25. May 2019
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm very new to Java. Do you…
Sun, 05/12/2019 - 16:07

I'm very new to Java. Do you know of any sources that might help me figure out how to do what you suggested?