Open sshipway opened 10 years ago
Sounds good!
Worth noting though: locked chests can still be mined (and drop their contents) in survival mode. So you'd want to put a note near the setting that this feature is mostly for adventure mode.
As for using an anvil to duplicate the key, you could put a formatting code at the start of the item name (and key). Since these can't be entered with an anvil, that would prevent someone from forging it.
The traditional trope of naming keys after colours could work well here.
Is there any way to make a chest unminable -- such as setting some tag on it to make it unbreakable, or give it an unfeasibly large number of hitpoints, or something?
Possibly the "Invulnerable":1 tag will achieve this? I'm not currently able to test this though
The colour tag in the keyname to prevent cheating with an anvil is a good idea; so naming the key"$owner's $colourcode$colour$resetcode key" to get a good keyname would work (I like using a named stick as the key object but anything would work I guess). You could even create several different colour keys all over the dungeon, but only the correct one would open the final chest...
Plus add books that give clues. Add these things using dungeon.addplaceditem() and they will be put into random chests throughout the dungeon with level restrictions. This is how maps work.
Is there any way to make a chest unminable ...
Possibly the "Invulnerable":1 tag will achieve this? I'm not currently able to test this though
I believe that will only work on entities and not tile entities.
I don't think this is currently possible. Though you might be able to rig some sort of command-block contraption to prevent the chest dropping loot if mined.
Done some testing and looks like you're right; Invulnerable tag has no effect on chest breakability in current 1.8 snapshot at least.
Here's a possibility: Minecart Chests can have the Invulnerable tag. But I am not sure if they can use the Lock tag...
I don't think you can lock Minecart chests (yet). This wouldn't look very good anyway.
I also notice that, in V1.8, droppers and dispensers can also be locked. So, you can make an unlootable dispenser trap simply by locking it with a random string of characters (though it can still be destroyed, I guess)
It would be VERY useful if destroying a LOCKED block entity did NOT drop the contents. I wonder if this is the case, or if it will be the case?
Locked chests still drop their contents when destroyed, at least in the current snapshot.
You're right, that doesn't work. Shame, I'd take functionality over looks any day!
It would be VERY useful if destroying a LOCKED block entity did NOT drop the contents. I wonder if this is the case, or if it will be the case?
I'm not saying this won't happen, but I wouldn't hold my breath. This has been marked as works as intended on the official tracker with similar issues merged in to it. Their stance is the tag is designed purely for adventure mode and this behaviour is not a bug. Much as I's like to see it, Mojang is very unlikely to change this for 1.8.
I still like the idea of an option in the cfg file to lock the final chest with a key hidden in the dungeon (or in the top chest); although the chests are still breakable, it would be of use to people intending to play the dungeon in Adventure mode, at least. The key-name-creation function and lock parameter to creat_chest are present now (added for the Treasure hunt code) so this should be fairly simple to do... I might take a look at this later.
A locked shulker box will now serve for this feature.
An optional feature where the final treasure room loot chest is locked (1.8 feature) by a key that is stored somewhere else in the dungeon, possibly in the entrance chest, or in some other random chest (depending on difficulty - 3 levels, unlocked, locked, locked+lostkey)
The key can, I think, be any named object, so a stick with the custom name owner+"'s key" would do the trick, though you might want some variations on this theme to prevent someone with an anvil from crafting one on the fly.
I'm also investigating this for the treasure hunts feature to stop people short-cutting the hunt.