Locks

Locks

8M Downloads

Store locked blocks inside of a saved structure

Revvilo opened this issue · 4 comments

commented

It would be great to be able to save locked blocks to structures via Minecraft's "Structure block" system since I would like to garantee that the block will be locked, but also allow all the other chests in the world to be non-padlocked by default.
(I am saving structures to be loaded in world-gen via another mod)
Having looked through the data, I do understand if it will be difficult (or flat out too hard) to implement since you've gotta store the cube that contains the locked blocks and all that. Maybe this could just be a long-term suggestion...

Although, as a quick off the top of the head suggestion/workaround-for-now, perhaps just adding a padlock to a chest that contains the NBT tag {Lock:""} would suffice... but then again, how would you deal with double chests in generated structures...?

commented

I definitely try to look into adding this feature. I haven’t dealt with structures yet, but afaik they can’t store extra data like my lockable data. I’m not sure if forge provides extra features for structures like capabilities or some such which would make it possible, but as I said, I’ll look into it.

commented

Lots and lots of headache and coremod hacks later I got this to work! Expect in the next update!

commented

There are limitations, however. This only works for structure files saved by vanilla structure blocks, so other mods or tools like world edit or mcedit will not work. Also you must load the structure via a structure block or the mod you're using must utilize the vanilla Template class to load and place structures. Otherwise it's up to the mod or tool to handle compatibility with my mod.

commented

Heck yeah man! Sorry, didn't mean to cause you headache. I hope it was the kinda fun programming headache, though, hehe.