forum Forumsplay_arrow Minecraft fiber_manual_record Redstone

1

[1.9.4] How to turn sign/item frame into a lock?

1 emerald4 replies67 views
created 02/13/2019 4:33 am by Zelascelar
last reply 02/18/2019 5:53 am
One of many things I'm struggling with, since I'm not too well with commands/redstone.

I want a sign to function as a lock, I've found out how to make it clickable with a command. The generated command is:

/give @p sign 1 0 {BlockEntityTag:{Text1:"{\"text\":\"Lock!\",\"color\":\"gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/setblock 251 44 730 redstone_block\"}}"},display:{Name:"Custom Sign"}}

from this site: minecraftcommand.science/command-sign-generator

How do I make it so you can only use a specified item on it, a key, and also how to make that item disappear from your inventory? And is it better to use an item frame instead of sign?

it's for a Zelda-themed dungeon I'm making, and there's so much stuff I haven't discovered yet and trying to catch up while making the map makes my brain boil haha
. I also wonder what the best way to change the models of the sign/item frame so it looks like a lock?


Posted by avatar
Zelascelar
Level 1 : New Miner
0

4 replies

2
02/13/2019 6:43 am
Level 7 : Apprentice Engineer
Gilran
avatar
Itemframe is not good for this task. We used Tripwire Hook to personalize a key (the shape is almost a key shape). You can get this item an own name and description or an enchant to separate it from normal items.

Testforblock can watch the item on a block or testfor can watch the item at a player. And you can put this tests in an /execute command.





You can use this generator: https://mcstacker.bimbimma.com/mcstacker1.10.php
Official page to /execute: minecraft.gamepedia.com/Commands/execute

I hope I could help you a little.
1
02/16/2019 8:05 am
Level 1 : New Miner
Zelascelar
avatar
You did, you help me alot in knowing where to dig in! now I just need to find a tutorial from MCstacker haha. I had completely overlooked Testforblock.


Sadly though I'm already using tripwire hooks for actual tripwire traps in the dungeon - it fit the theme of it. I guess I can take another item and remodel it? Or make a completekly new model and add as a resourcepack, which I'm learning right now.

I didn't get the "testfor can watch the item at a player" bit though?
1
02/18/2019 5:53 am
Level 7 : Apprentice Engineer
Gilran
avatar
Some explanation about nbt tags: www.digminecraft.com/data_tags/player.php
1
02/18/2019 5:27 am
Level 7 : Apprentice Engineer
Gilran
avatar
You can hover above features of MCStacker and you get a tooltip. I do not remember the 1.9 testfor versions could consist the inventory events but maybe use tags to detect things in inventory. … mcstacker.bimbimma.com/#!22834 something similar...

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome