437: Items only one team can pick up. [Minecraft Map Making]

Subscribers:
3,590
Published on ● Video Link: https://www.youtube.com/watch?v=rmQTGgI7stg



Duration: 0:00
274 views
16


Membership:
Ep437: Giving items a tag so that only certain teams can pick them up.

00:00 Intro
00:20 Setup teams
01:15 Give item
01:50 Controller

Command help from MCDiscord: Noxon

Version: 1.21

Commands, builds, hacks and ideas for people making their own Minecraft maps.

Check out my collabs on Coppit's channel:

The Discord server I am usually on: https://discord.gg/amU84KykEu

The following commands are prefixed with three letters which represent the settings of the command block. E.g IUN: = Impulse Unconditional Needs_Redstone. These prefixes need to be removed if copying the commands.

Since angled brackets are not allowed in YouTube descriptions you will have to replace "greater than" and "less than" with the appropriate angled bracket.

Commands used:

Setup team:
IUN: team add red

Join team:
IUN: team join red @p

Give:
IUN: give @p diamond[minecraft:custom_data={team:red}]

Controller:
RUA: execute as @e[type=item] if items entity @s contents *[minecraft:custom_data~{team:red}] at @s run data modify entity @s Owner set value [I; 0,0,0,0]
CUA: execute as @e[type=item] if items entity @s contents *[minecraft:custom_data~{team:red}] at @s run data modify entity @s Owner set from entity @p[team=red] UUID