I'm trying to make a mini game and I part of it includes giving a player an item when they turn an item in a item frame. The frame is in the air so it would be best if I didn't have to attach a comparator to it, I tried having a scoreboard based on the NBT of the item frame but to no success.
The Meaning of Life, the Universe, and Everything.
Join Date:
6/27/2018
Posts:
59
Minecraft:
KaidenKraft
PSN:
KaidenKraft
Nintendo:
SW-4867-4245-9689
Discord:
KaidenKraft#2288
PMC:
KaidenKraft
Member Details
i tried everything i could, but if you use barrier blocks, from underneath, the redstone will be invisible.
You could have a repeating command block underground or whereever, with the command /execute if block (COORDS) minecraft:redstone_wire[power=1] run setblock (COORDS) redstone_block
there is 1 flaw though, the comparator has a visible bottom.
/execute as @e[type=minecraft:item_frame,nbt={TileX:-45,TileY:6,TileZ:-39,Item:{id:"minecraft:diamond"},ItemRotation:1b}] run say hi
TileX,TileY,TileZ are coordinates of the item frame so replace these with your own (you can aim at the item frame with your cursor and do /data get entity <hit_tab> TileX to get the x coordinate)
this will probably spam and give you a 100 items so you will have to either remove the item from the item frame to stop the command or add a tag to the item frame or player.
/execute as @e[type=minecraft:item_frame,nbt={TileX:-45,TileY:6,TileZ:-39,Item:{id:"minecraft:diamond"},ItemRotation:1b}] run say hi
TileX,TileY,TileZ are coordinates of the item frame so replace these with your own (you can aim at the item frame with your cursor and do /data get entity <hit_tab> TileX to get the x coordinate)
this will probably spam and give you a 100 items so you will have to either remove the item from the item frame to stop the command or add a tag to the item frame or player.
A version of this command that will only do it once when the player does it:
/execute as @e[type=minecraft:item_frame,nbt={TileX:-45,TileY:6,TileZ:-39,Item:{id:"minecraft:diamond"}}] at @s run execute as @p if score @s frame_count matches 1.. run say hi
The scoreboard frame_count will count how many frames the player has rotated, and you should set it to 0 for all players immediately after running this command.
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
A version of this command that will only do it once when the player does it:
/execute as @e[type=minecraft:item_frame,nbt={TileX:-45,TileY:6,TileZ:-39,Item:{id:"minecraft:diamond"}}] run execute as @p if score @s frame_count matches 1.. run say hi
The scoreboard frame_count will count how many frames the player has rotated, and you should set it to 0 for all players immediately after running this command.
Hi,
I'm trying to make a mini game and I part of it includes giving a player an item when they turn an item in a item frame. The frame is in the air so it would be best if I didn't have to attach a comparator to it, I tried having a scoreboard based on the NBT of the item frame but to no success.
i tried everything i could, but if you use barrier blocks, from underneath, the redstone will be invisible.
You could have a repeating command block underground or whereever, with the command /execute if block (COORDS) minecraft:redstone_wire[power=1] run setblock (COORDS) redstone_block
there is 1 flaw though, the comparator has a visible bottom.
Hope this helps!
Here you go:
TileX,TileY,TileZ are coordinates of the item frame so replace these with your own (you can aim at the item frame with your cursor and do /data get entity <hit_tab> TileX to get the x coordinate)
this will probably spam and give you a 100 items so you will have to either remove the item from the item frame to stop the command or add a tag to the item frame or player.
Command block engineer // Developer // #TeamTrees
A version of this command that will only do it once when the player does it:
/execute as @e[type=minecraft:item_frame,nbt={TileX:-45,TileY:6,TileZ:-39,Item:{id:"minecraft:diamond"}}] at @s run execute as @p if score @s frame_count matches 1.. run say hi
The scoreboard frame_count will count how many frames the player has rotated, and you should set it to 0 for all players immediately after running this command.
Remember those versions that minecraft pranked us with? Specifically:
Those are still downloadable! Watch this video for 2.0:
https://www.youtube.com/watch?v=PQdu9LKAdIU
To download the other ones you need to make a folder in the versions folder for minecraft and put the client and JSON file for the versions in there. They all need to be named the same aside from file extensions. Once you do that, you will be able to choose that version when making a new profile with the minecraft launcher.
15w14a is on this link:
http://minecraft.gamepedia.com/15w14a
1.RV-Pre1 is here:
http://minecraft.gamepedia.com/1.RV-Pre1
Minecraft 3D is here:
https://minecraft.gamepedia.com/Java_Edition_3D_Shareware_v1.34
the man said it all
Command block engineer // Developer // #TeamTrees