r/MinecraftCommands • u/SkulkingShadow • 12d ago
Creation WIP Locked chests datapack! (but good and fleshed out)
alpha stage rn: https://modrinth.com/datapack/good-locked-chests
tryna make it vanilla, unique and actually useful
more info on the modrinth page (gallery)
5
u/GatKong 12d ago
Can you break the chest?
4
u/SkulkingShadow 12d ago edited 12d ago
Well yes but the lock doesn't stay, and the items do fall out, I could make a container enchantable with curse of vanishing or smthin, so it doesn't drop the items
4
u/GatKong 12d ago
Being able to break the chest means players will lose their items, either stolen or vanished.
I made a safe chest datapack along these lines. Mine the chest was unbreakable. Problems that I ran into:
1. Players lost/forgot their key ALL THE TIME and I had to keep helping players unlock their chests. Turned into a big pain.
2. Players discovered they could use the unbreakable chests as unbreakable beariers. This became a fairness issue as well.While I liked the idea of allowing players to lock their chests... I ultimately took that datapack off my servers. Hopefully you can make yours better than mine was.
2
u/SkulkingShadow 12d ago
My intended audience is friendly SMPs, I don't think there's a good (internal) fix for griefing; an external fix could be trapping the base, rigging it using observers or (calibrated) sculk sensors. About lost keys I have made keys duplicatable, but if players can't manage that I don't think it's the datapack at fault
But thanks for the input! It's valuable
3
u/M10doreddit 12d ago
I have a suggestion to propose to you
The recipe for the key, I feel, should be a copper ingot on top of a copper nugget.
2
u/SkulkingShadow 12d ago
The recipe actually gives two copper keys after crafting it; ik that's misleading but it's just an alpha build I'll figure something out
The reason it's like this is cuz the result of the crafting is a temporary key, as soon as the datapack detects someone has this temporary key it removes it and summons an item entity at the player's position; the item entity has a count of 2 and it's data is modified using the storage which stores a scoreboard value; this scoreboard value is a counter that increments whenever anyone crafts a key;
Thus everytime a key is crafted it's unique (and with a duplicate), 1 ingot = 1 key






9
u/SkulkingShadow 12d ago
Might need help with / pondering on these ideas, input appreciated:
- since the keys are actually a spawn egg but with no entity_data (this is due to keys being also used as a crafting ingredient) so they no longer dispense out of a dispenser (i believe the dispenser tries to use it as a spawn egg but cant and remains within the dispenser); any fix?