Started by
mobcrafter731
on
Topic category: Help with Minecraft modding (Java Edition)
I am trying to add a mechanic in the game where a block can generate "heat" and spread that heat to nearby blocks. Each block in the world would have a heat variable, and when the block isn't heated, would lose heat. The problem is, there is no way I could find to assign a variable to a non-tile entity block. Is there any ways I haven't checked, or any workarounds?
I've got an idea!
You can create a tile-entity block that stores all the BNBT tags
(Let's call this block "bnbt_storage1").
When Minecraft loads the world,
bnbt_storage1 is always placed at coordinate [0, 0, 0],
unless this block is already there.
Every time you interact with any block just like you set it up,
bnbt_storage1 will either set or return the BNBT tag specifically made for the block on this coordinate.
Every BNBT tag stored in bnbt_storage1 is named
after the coordinate (x, y, z) and a name for the variable (n)
BNBT tag name: x_y_z_n (For example: -2194_45_-109496_rightclicks)
Btw, I will give you the workspace I tested it on so you can play around with it.
mcr_ws_bnbt-storage1 (mediafire.com)
Oh, my bad!
Wrong link!
Here's the right one: [ Click here ]
I mean, that's how you can add BNBT to non-tile entity blocks,
►►► Use another block to store their BNBT! 😀👍
Wow, I wasn't expecting anyone to respond.
That sounds like a really interesting idea! I would have never thought of it.
I'll take a look at the workspace, and test it out in game.
Thank you!