Locked Door With Multiple Keys that lead to a new room with each key.

Started by Logdawg940 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Locked Door With Multiple Keys that lead to a new room with each key.

In the series Steven Universe there is a temple door where each gem has their own room. I want to make a door where you have to place a certain item and you get sent to a room and make whatever. Let's us an example, I want to have a place where I store my diamonds. So, I put a Diamond into the door, the door gives back the diamond AND teleports me to a new room where I can place a chest and put diamonds in it. Afterwards, I wish to go sort out my gold, so I put a piece of gold into the door and it takes me to a new room. I place a chest and decide to go back to my diamond room, so I put a diamond in the slot and I am transported back to the room with a chest and a diamond waiting inside.

Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use procedures to do this.
Wed, 03/20/2019 - 16:56

Use procedures to do this.

Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How is the question not what…
Sat, 03/23/2019 - 01:58

How is the question not what to do :p

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't think you can do…
Sat, 03/23/2019 - 06:49

I don't think you can do this.

You can't make a door that automatically teleports you to some rooms (because the door can't know where the rooms are), but you can do this:

 

Make an item (maybe called Coordinates Chooser).

Add this procedure to it:

 

when item right-clicked on block:

If [(is air at x, y+1, z) and (is air at x, y+2,z)] and (NOT block at x, y, z = bedrock)

Do

Set the (chooserx) nbt variable of entity to x

Set the (choosery) nbt variable of entity to y+1

Set the (chooserz) nbt variable of entity to z

 

The procedure blocks names might be wrong.

Anyway, this procedure lets you save the coordinates of a point.

I will post another comment here describing the next step because I don't want the page to reload and lose everything I wrote

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(this is the second part of…
Sat, 03/23/2019 - 07:19

(this is the second part of the previous comment)

Now that you made that item, make the door.

Add this procedure to "when block right-clicked"

 

If (item in entity's main hand = coordinates chooser) and (NOT item in entity's off hand = air)

Do

Set the [make text with (item in entity's off hand) +" x"] nbt variable of block to (get the chooserx nbt variable of entity)

//copy this last procedure block to make it work with y and z coordinates too. The x in make text with item in entity's off hand + "x" is not a coordinate, just the letter x.

Set the [make text with (item in entity's off hand) + "was used"] nbt block to true

If NOT (item in entity main hand = coordinates chooser)

Do

If (get nbt variable of block (make text with... +was used) = true

Teleport entity to...

 

I will continue this comment later

 

 

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(this is the third part of a…
Sat, 03/23/2019 - 08:53

(this is the third part of a comment)

In the last part, I was saying

if [get nbt variable of block (make text with item in entity's main hand* +was used)]=true

Do

Teleport entity to (make text with item in player's main hand + x) (make text... + y) (make text... +z)

 

*in the previous comment I forgot that this should be the main hand

Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well I wanted to make like a…
Sat, 03/23/2019 - 20:00

Well I wanted to make like a gui where the player places the item to be teleported to a structure.

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The procedure I told you…
Mon, 03/25/2019 - 20:06

The procedure I told you works based on the items in main hand and off hand.

You can also make it as a gui. You'll just need to change the procedure a bit.