Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locked chests in treasure room (feature) #222

Open
sshipway opened this issue Aug 7, 2014 · 11 comments
Open

Locked chests in treasure room (feature) #222

sshipway opened this issue Aug 7, 2014 · 11 comments

Comments

@sshipway
Copy link
Contributor

sshipway commented Aug 7, 2014

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.

@JiFish
Copy link
Collaborator

JiFish commented Aug 7, 2014

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.

@sshipway
Copy link
Contributor Author

sshipway commented Aug 8, 2014

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...

@orphu
Copy link
Owner

orphu commented Aug 8, 2014

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.

@JiFish
Copy link
Collaborator

JiFish commented Aug 8, 2014

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.

@sshipway
Copy link
Contributor Author

Done some testing and looks like you're right; Invulnerable tag has no effect on chest breakability in current 1.8 snapshot at least.

@JiFish
Copy link
Collaborator

JiFish commented Aug 12, 2014

Here's a possibility: Minecart Chests can have the Invulnerable tag. But I am not sure if they can use the Lock tag...

@sshipway
Copy link
Contributor Author

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?

@sshipway
Copy link
Contributor Author

Locked chests still drop their contents when destroyed, at least in the current snapshot.

@JiFish
Copy link
Collaborator

JiFish commented Aug 13, 2014

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.

@sshipway
Copy link
Contributor Author

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.

@JiFish
Copy link
Collaborator

JiFish commented Nov 30, 2016

A locked shulker box will now serve for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants