Technik Wiki
Tomatocake3 (Diskussion | Beiträge)
K (Verbesserung)
Tomatocake3 (Diskussion | Beiträge)
K (Verbesserung)
Zeile 54: Zeile 54:
 
{{Bilderfolge|#1#2|Inventar-Sensor (Befehle) Bild 2.|400px|list=1}}
 
{{Bilderfolge|#1#2|Inventar-Sensor (Befehle) Bild 2.|400px|list=1}}
   
Mit diesem Inventarsensor ist es möglich, die Anzahl der vorhandenen Gegenstände im Inventar des Spielers zu bestimmen. Dazu wird beim Einschalten ein Punktestand-Ziel erstellt, welches benötigt wird um die Anzahl der Gegenstände zu speichern{{bb|2|1}}. Nun bekommt der Spieler in diesem Beispiel 64 Holz{{bb|2|2}}. Nun läuft der Wiederhol-Befehlsblock an und testet mit dem /clear-Befehl wie viele Gegenstände des Typs Holz der Spieler besitzt{{bb|2|3}}. Weil der /clear-Befehl null Holzstämme entfernt, wird nicht die gelöschte Anzahl der Gegenstände gespeichert, sondern die Anzahl an Gegenstände, die er dort vorgefunden hat. Gleich im Anschluss wird dann dem Spieler mitgeteilt, wie viele Holzstämme er nun noch besitzt{{bb|2|4}}. Wenn man die Vorrichtung ausschaltet, so wird das Punktestand-Ziel wieder gelöscht{{bb|2|5}} und die Holzstämme im Inventar ebenfalls{{bb|2|6}}.
+
Mit diesem Inventarsensor ist es möglich, die Anzahl der vorhandenen Gegenstände im Inventar des Spielers zu bestimmen. Dazu wird beim Einschalten ein Punktestand-Ziel erstellt, welches benötigt wird um die Anzahl der Gegenstände zu speichern{{bb|2|1}}. Nun bekommt der Spieler in diesem Beispiel 64 Holz{{bb|2|2}}. Nun läuft der Wiederhol-Befehlsblock an und testet mit dem /clear-Befehl wie viele Gegenstände des Typs Holz der Spieler besitzt{{bb|2|3}}. Weil der /clear-Befehl null Holzstämme entfernt, wird nicht die gelöschte Anzahl der Gegenstände gespeichert, sondern die Anzahl an Gegenstände, die er dort vorgefunden hat. Gleich im Anschluss wird dann dem Spieler mitgeteilt, wie viele Holzstämme er nun noch besitzt{{bb|2|4}}. Wenn man die Vorrichtung ausschaltet, so werden das Punktestand-Ziel {{bb|2|5}}, die Holzstämme im Inventar{{bb|2|6}} und auch eventuell herumliegende Stämme gelöscht{{bb|2|7}}.
   
 
{{Ausklappmenü|offen=1|{{bb}}|
 
{{Ausklappmenü|offen=1|{{bb}}|
{{bb|2|1|i|4=/scoreboard objectives add PZInvS:2Anz dummy}}
+
{{bb|2|1|i|4=/scoreboard objectives add PZInvS.2Anz dummy ["Inventar-Sensor.2: ",{"text":"Anzahl","bold":true}]}}
{{bb|2|2|k|4=/give @a[distance=..25] oak_log{display:{Name:"Inventarsensor:2",Lore:["Dieser Gegenstand wird erfasst"] } } 64 }}
+
{{bb|2|2|k|4=/give @a[distance=..25] oak_log{EigInvS.2Alle:true,display:{Lore:['"Dieser Gegenstand wird erfasst"'] } } 64 }}
   
   
{{bb|2|3|w|4=/execute as @a[distance=..25] store result score @s PZInvS:2Anz run clear @s #minecraft:logs 0}}
+
{{bb|2|3|w|4=/execute as @a[distance=..25] store result score @s PZInvS.2Anz run clear @s oak_log 0}}
{{bb|2|4|k|4=/execute as @a[scores={PZInvS:2Anz=1..},distance=..25] run tellraw @s ["Inventarsensor:2 ",{"text":"In deinem Inventar befinden sich "},{"score":{"name":"@p","objective":"PZInvS:2Anz"} },{"text":" Stämme"} ] }}
+
{{bb|2|4|k|4=/execute as @a[distance=..25,scores={PZInvS.2Anz=0..}] run title @s actionbar ["",{"text":"Stämme im Inventar: ","bold":true},{"score":{"name":"@s","objective":"PZInvS.2Anz"},"color":"dark_purple","bold":true}] }}
   
   
{{bb|2|5|i|4=/scoreboard objectives remove PZInvS:2Anz}}
+
{{bb|2|5|i|4=/scoreboard objectives remove PZInvS.2Anz}}
{{bb|2|6|k|4=/clear @a[distance=..25] #minecraft:logs{display:{Name:"Inventarsensor:2"} } }}
+
{{bb|2|6|k|4=/clear @a[distance=..25] minecraft:oak_log{EigInvS.2Alle:true} }}
  +
{{bb|2|7|k|4=/kill @e[type=minecraft:item,nbt={Item:{id:"minecraft:oak_log",tag:{EigInvS.2Alle:true} } } ] }}
 
}}
 
}}
   
Zeile 127: Zeile 128:
   
   
{{bb|4|2|w|4=/tag @a[tag=EtiInvS:4,distance=..25] remove EtiInvS:4}}
+
{{bb|4|2|w|4=/tag @a[tag=EtiInvS:4,distance=..25] remove EtiInvS:4 }}
 
{{bb|4|3|k|4=/execute as @a[tag=!EtiInvS:4,distance=..25,nbt={SelectedItem:{id:"minecraft:arrow",tag:{display:{Name:"Inventarsensor:4"}} } }] run tag @s add EtiInvS:4 }}
 
{{bb|4|3|k|4=/execute as @a[tag=!EtiInvS:4,distance=..25,nbt={SelectedItem:{id:"minecraft:arrow",tag:{display:{Name:"Inventarsensor:4"}} } }] run tag @s add EtiInvS:4 }}
 
{{bb|4|4|k|4=/tellraw @a[tag=EtiInvS:4,distance=..25] ["Inventarsensor:4 ",{"text":"Du wählst gerade den Pfeil in deiner Schnellzugriffsleiste aus."} ] }}
 
{{bb|4|4|k|4=/tellraw @a[tag=EtiInvS:4,distance=..25] ["Inventarsensor:4 ",{"text":"Du wählst gerade den Pfeil in deiner Schnellzugriffsleiste aus."} ] }}
Zeile 217: Zeile 218:
 
*{{b|/summon}}
 
*{{b|/summon}}
 
*{{b|/execute}}
 
*{{b|/execute}}
*{{b|/testforblock}}
+
*{{b|/data}}
 
*{{b|/setblock}}
 
*{{b|/setblock}}
*{{b|/blockdata}}
+
*{{b|/tag}}
 
*{{b|/tellraw}}
 
*{{b|/tellraw}}
  +
*{{b|/kill}}
  +
*{{b|/clear}}
 
|
 
|
 
* {{Gridbild|Hebel|link}}
 
* {{Gridbild|Hebel|link}}
Zeile 230: Zeile 233:
 
{{Bilderfolge|#1#2|Inventar-Sensor (Befehle) Bild 7.|400px|list=1}}
 
{{Bilderfolge|#1#2|Inventar-Sensor (Befehle) Bild 7.|400px|list=1}}
   
Mit diesem Inventarsensor lässt sich überprüfen ob der Spieler oder Trichter Gegenstände aus dem Behälter herausgeholt haben. Dazu wird ein Rüstungsständer erzeugt, der die Position der Truhe vorgibt{{bb|7|1}}. Dadurch das sich bei der Truhe ein Rüstungsständer aufhält, kann man von ihm aus prüfen, welcher Spieler erfasst werden soll, wenn dieser etwas herausgeholt hat. Nun wird eine Truhe an seiner Position platziert, welche komplett voll mit Totems der Unsterblichkeit ist{{bb|7|2}}. Nun wird permanent getestet, ob die Truhe noch an der Position des Rüstungsständers voll ist{{bb|7|3}}, wenn das nicht der Fall ist, bekommt der Spieler eine Nachricht und ein nachfolgender Ketten-Befehlsblock setzt an die Position des Rüstungsständers eine komplett gefüllte Truhe{{bb|7|4}}. Schaltet man den Inventarsensor aus, so wird zuerst die Truhe entfernt{{bb|7|5}}, dann der Rüstungsständer{{bb|7|6}} und dann die eventuell vorhandenen Totem im Inventar des Spielers{{bb|7|7}}.
+
Mit diesem Inventarsensor lässt sich überprüfen, ob der Spieler oder Trichter Gegenstände aus dem Behälter herausgeholt haben. Dazu wird ein Rüstungsständer erzeugt, der die Position der Truhe vorgibt{{bb|7|1}}. Dadurch das sich bei der Truhe ein Rüstungsständer aufhält, kann man von ihm aus prüfen, welcher Spieler erfasst werden soll, wenn dieser etwas herausgeholt hat. Nun wird eine Truhe an seiner Position platziert, welche komplett voll mit Totems der Unsterblichkeit ist{{bb|7|2}}. Nun wird permanent getestet, ob die Truhe an der Position des Rüstungsständers noch voll ist{{bb|7|3}}, wenn das nicht der Fall ist, bekommt der Rüstungsständer ein Etikett und alle Spieler in der Nähe eine Nachricht{{bb|7|4}}. Ein nachfolgender Ketten-Befehlsblock setzt an die Position des Rüstungsständers eine komplett gefüllte Truhe{{bb|7|5}} und das Etikett wird vom Rüstungsständer wieder entfernt {{b|7|6}}. Schaltet man den Inventarsensor aus, so wird zuerst die Truhe entfernt{{bb|7|7}}, dann der Rüstungsständer{{bb|7|8}} und dann die eventuell vorhandenen Totems im Inventar des Spielers{{bb|7|9}}.
   
 
{{Ausklappmenü|offen=1|{{bb}}|
 
{{Ausklappmenü|offen=1|{{bb}}|
{{bb|7|1|i|4=/summon minecraft:armor_stand ~ ~ ~1 {Small:true,NoGravity:true,Invisible:true,CustomNameVisible:true,CustomName:'{"text":"Inventar","bold":true}',Tags:["EtiInvS.7Alle"]} }}
+
{{bb|7|1|i|4=/summon minecraft:armor_stand ~ ~ ~1 {Small:1b,NoGravity:1b,Invisible:1b,CustomNameVisible:1b,CustomName:'{"text":"Inventar","bold":true}',Tags:["EtiInvS.7Alle"]} }}
 
{{bb|7|2|k|4=/execute at @e[type=armor_stand,tag=EtiInvS.7Alle] run setblock ~ ~ ~ chest[facing=east]{Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b} ] } }}
 
{{bb|7|2|k|4=/execute at @e[type=armor_stand,tag=EtiInvS.7Alle] run setblock ~ ~ ~ chest[facing=east]{Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b} ] } }}
   
   
{{bb|7|3|w|4=/execute at @e[type=minecraft:armor_stand,tag=EtiInvS.7Alle] if block ~ ~ ~ minecraft:chest unless block ~ ~ ~ minecraft:chest[facing=east]{Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b} ] } run tellraw @a[distance=..5] ["Inventar-Sensor.7: ",{"text":"Es wurde ein oder mehrere Gegenstände aus der Truhe entnommen.","bold":true} ] }}
+
{{bb|7|3|w|4=/execute as @e[type=armor_stand,tag=EtiInvS.7Alle] at @s if block ~ ~ ~ minecraft:chest unless block ~ ~ ~ minecraft:chest[facing=east]{Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b} ] } run tag @s add EtiInvS.7Fehlt}}
  +
{{bb|7|4|w|4=/execute at @e[type=armor_stand,tag=EtiInvS.7Alle,tag=EtiInvS.7Fehlt] run tellraw @a[distance=..5] ["Inventar-Sensor.7: ",{"text":"Es wurde ein oder mehrere Gegenstände aus der Truhe entnommen.","bold":true}] }}
{{bb|7|4|k|4=/execute at @e[type=armor_stand,tag=EtiInvS.7Alle] if block ~ ~ ~ chest unless block ~ ~ ~ chest[facing=east]{Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b} ] } run data merge block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b} ] } }}
+
{{bb|7|5|k|4=/execute at @e[type=armor_stand,tag=EtiInvS.7Alle,tag=EtiInvS.7Fehlt] if block ~ ~ ~ chest run data merge block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b}] } }}
  +
{{bb|7|6|w|4=/tag @e[type=armor_stand,tag=EtiInvS.7Alle,tag=EtiInvS.7Fehlt] remove EtiInvS.7Fehlt }}
   
   
{{bb|7|5|i|4=/execute at @e[type=armor_stand,tag=EtiInvS.7Alle] run setblock ~ ~ ~ air replace}}
+
{{bb|7|7|i|4=/execute at @e[type=armor_stand,tag=EtiInvS.7Alle] run setblock ~ ~ ~ air replace }}
{{bb|7|6|k|4=/kill @e[type=armor_stand,tag=EtiInvS.7Alle] }}
+
{{bb|7|8|k|4=/kill @e[type=armor_stand,tag=EtiInvS.7Alle] }}
{{bb|7|7|k|4=/clear @a[distance=..25] totem_of_undying}}
+
{{bb|7|9|k|4=/clear @a[distance=..25] totem_of_undying }}
 
}}
 
}}
   

Version vom 19. Mai 2020, 11:02 Uhr

Gruppe: Grid Kolben
Vorrichtungen

Grid Roter Sand blass mit Mechaniken

Grid Redstone mit Redstone
                Hier:
Grid Befehlsblock mit Befehlen
Verfügbar in:
Wiki Redstone-Welt Redstone-Welt
Wiki Redstone-Welt
Überarbeitete oder neue Varianten dieser Technik existieren bereits in der aktuellen Redstone-Welt.
Hier fehlt noch die Dokumentation dieser Varianten, diese müssen noch nachgetragen werden.

Ein Inventarsensor kann erkennen, ob in bestimmten Inventaren bestimmte Gegenstände vorhanden sind oder eben nicht vorhanden sind. Wenn er die zu suchenden Gegenstände findet, gibt er eine Nachricht aus.

Variante 1


Inventar-Sensor (Befehle) Bild 1.1 Inventar-Sensor (Befehle) Bild 1.2

Dieser Inventarsensor erkennt, ob man einen bestimmten Gegenstand im Inventar liegen hat. Dazu wird einem, beim Einschalten, eine Diamantaxt gegebenBefehl 1.1. Wenn der Spieler die besagte Axt im Inventar hat, bekommt er einen Titel in der Aktionsleiste angezeigtBefehl 1.2. Wenn die Vorrichtung wieder ausgeschaltet wird, wird das Inventar des Spielers von dem Gegenstand befreitBefehl 1.3.



Befehlsblöcke mit Befehlen:
give @a[distance=..25] diamond_axe{EigInvS.1Alle:true,display:{Lore:['"Dieser Gegenstand wird erfasst"']} }
title @a[distance=..25,nbt={Inventory:[{id:"minecraft:diamond_axe"} ] }] actionbar {"text":"Diamantaxt im Inventar","color":"aqua","bold":true}
clear @a[distance=..25] diamond_axe{EigInvS.1Alle:true}

Variante 2

Inventar-Sensor (Befehle) Bild 2.1 Inventar-Sensor (Befehle) Bild 2.2

Mit diesem Inventarsensor ist es möglich, die Anzahl der vorhandenen Gegenstände im Inventar des Spielers zu bestimmen. Dazu wird beim Einschalten ein Punktestand-Ziel erstellt, welches benötigt wird um die Anzahl der Gegenstände zu speichernBefehl 2.1. Nun bekommt der Spieler in diesem Beispiel 64 HolzBefehl 2.2. Nun läuft der Wiederhol-Befehlsblock an und testet mit dem /clear-Befehl wie viele Gegenstände des Typs Holz der Spieler besitztBefehl 2.3. Weil der /clear-Befehl null Holzstämme entfernt, wird nicht die gelöschte Anzahl der Gegenstände gespeichert, sondern die Anzahl an Gegenstände, die er dort vorgefunden hat. Gleich im Anschluss wird dann dem Spieler mitgeteilt, wie viele Holzstämme er nun noch besitztBefehl 2.4. Wenn man die Vorrichtung ausschaltet, so werden das Punktestand-Ziel Befehl 2.5, die Holzstämme im InventarBefehl 2.6 und auch eventuell herumliegende Stämme gelöschtBefehl 2.7.


Befehlsblöcke mit Befehlen:
scoreboard objectives add PZInvS.2Anz dummy ["Inventar-Sensor.2: ",{"text":"Anzahl","bold":true}]
give @a[distance=..25] oak_log{EigInvS.2Alle:true,display:{Lore:['"Dieser Gegenstand wird erfasst"'] } } 64


execute as @a[distance=..25] store result score @s PZInvS.2Anz run clear @s oak_log 0
execute as @a[distance=..25,scores={PZInvS.2Anz=0..}] run title @s actionbar ["",{"text":"Stämme im Inventar: ","bold":true},{"score":{"name":"@s","objective":"PZInvS.2Anz"},"color":"dark_purple","bold":true}]


scoreboard objectives remove PZInvS.2Anz
clear @a[distance=..25] minecraft:oak_log{EigInvS.2Alle:true}
kill @e[type=minecraft:item,nbt={Item:{id:"minecraft:oak_log",tag:{EigInvS.2Alle:true} } } ]

Variante 3

Inventar-Sensor (Befehle) Bild 3.1 Inventar-Sensor (Befehle) Bild 3.2

Dieser Inventarsensor erfasst ob sich ein Gegenstand innerhalb des Inventars auf einem bestimmten Feld befindet. Hierzu bekommt man beim Einschalten einen KompassBefehl 3.1 in das erste Feld der Schnellzugriffsleiste gelegt. Anschließend wird der Wiederhol-Befehlsblock aktiv, welcher eventuell vorhandene Etiketten entfernt, wenn bereits erfasst wurde, das man den gesuchten Gegenstand genau im richtigen Feld besitztBefehl 3.2. Dann bekommt man wiederum das Etikett, wenn die Bedingungen stimmen und der Gegenstand sich im ersten Feld befindetBefehl 3.3. Wenn sich der Gegenstand an der richtigen Stelle befindet, erhält der Spieler einen Titel in der Aktionsleiste, das der Gegenstand gefunden wurdeBefehl 3.4. Wenn er den Gegenstand nicht an der richtigen Stelle besitzt, wird ihm stattdessen ein anderer Titel angezeigt, die ihm dann diesen Umstand mitteiltBefehl 3.5. Wird nun die Vorrichtung ausgeschaltet, so wird der Kompass aus dem Inventar gelöschtBefehl 3.6, der eventuell als Gegenstand vorhandene Kompass entferntBefehl 3.7 und das noch eventuell vorhandene Etikett entferntBefehl 3.8.


Befehlsblöcke mit Befehlen:
replaceitem entity @a[distance=..25] hotbar.0 compass{EigInvS.4Alle:true,display:{Lore:['"Dieser Gegenstand wird nur erfasst,"','"wenn er sich im ersten Feld befindet"']} }


tag @a[tag=EtiInvS.4Slot,distance=..25] remove EtiInvS.4Slot
tag @a[distance=..25,nbt={Inventory:[{Slot:0b,id:"minecraft:compass"}]}] add EtiInvS.4Slot
title @a[tag=EtiInvS.4Slot,distance=..25] actionbar ["",{"text":"Schnellzugriffsleiste 1.Slot == ","bold":true},{"text":"Kompass","color":"green","bold":true}]
title @a[tag=!EtiInvS.4Slot,distance=..25] actionbar ["",{"text":"Schnellzugriffsleiste 1.Slot == ","bold":true},{"text":"!Kompass","color":"red","bold":true}]


clear @a[distance=..25] compass{EigInvS.4Alle:true}
kill @e[type=item,nbt={Item:{id:"minecraft:compass",tag:{EigInvS.3Alle:true} } } ]
tag @a[tag=EtiInvS.4Slot] remove EtiInvS.4Slot

Variante 4

Inventar-Sensor (Befehle) Bild 4.1 Inventar-Sensor (Befehle) Bild 4.2

Mit diesem Inventarsensor kann man feststellen, ob der Spieler in der Schnellzugriffsleiste einen bestimmten Gegenstand ausgewählt hat. Dazu erhält der Spieler einen Pfeil ins InventarBefehl 4.1. Dieser besitzt einen bestimmten Namen und eine Beschreibung. Nun wird das Etikett, welches eventuell vorhanden ist, entferntBefehl 4.2. Nun bekommt der Spieler dieses Etikett, wenn er den Gegenstand tatsächlich ausgewählt hatBefehl 4.3. Hierbei wird auch nur dann das Etikett übergeben, wenn er das Etikett noch nicht besitzt und wenn der ausgewählte Gegenstand den entsprechenden Namen besitzt. Wenn der Spieler den Gegenstand ausgewählt hat und somit das Etikett besitzt, erhält er nun ständig die Nachricht, das er es ausgewählt hatBefehl 4.4 und nur dann, wenn er es nicht ausgewählt hat die entsprechend andere NachrichtBefehl 4.5. Anstelle der Nachrichten könnte man auch andere Dinge von diesen Spieler ausführen, dies wird jedoch in diesem Beispiel nicht weiter erläutert. Schaltet man die Vorrichtung wieder aus, so wird dem Spieler der Gegenstand wieder aus dem Inventar entferntBefehl 4.6 und das Etikett, welches er noch besitzt, wenn er den Gegenstand ausgewählt hat, wird ebenfalls entferntBefehl 4.7.


Befehlsblöcke mit Befehlen:
give @p[distance=..10] arrow{display:{Name:"Inventarsensor:4",Lore:["Dieser Gegenstand wird","erfasst, wenn du ihn in der","Schnellzugriffsleiste auswählst"] } }


tag @a[tag=EtiInvS:4,distance=..25] remove EtiInvS:4
execute as @a[tag=!EtiInvS:4,distance=..25,nbt={SelectedItem:{id:"minecraft:arrow",tag:{display:{Name:"Inventarsensor:4"
} }] run tag @s add EtiInvS:4
tellraw @a[tag=EtiInvS:4,distance=..25] ["Inventarsensor:4 ",{"text":"Du wählst gerade den Pfeil in deiner Schnellzugriffsleiste aus."} ]
tellraw @a[tag=!EtiInvS:4,distance=..25] ["Inventarsensor:4 ",{"text":"Du hast nicht den Pfeil in deiner Schnellzugriffsleiste ausgewählt."} ]


clear @a[distance=..25] arrow{display:{Name:"Inventarsensor:4"} }
tag @a[tag=EtiInvS:4] remove EtiInvS:4

}}

Variante 5

Inventar-Sensor (Befehle) Bild 5.1 Inventar-Sensor (Befehle) Bild 5.2

Mit Hilfe dieses Inventarsensors kann man erfassen, ob der Spieler ein bestimmtes Inventar geöffnet hat. In diesem Beispiel wird das Öffnen einer Endertruhe erfasst. Dazu wird beim Einschalten ein Punktestand-Ziel erstellt, welches die Statistik für geöffnete Endertruhen speichertBefehl 5.1. Nun soll die Endertruhe platziert werden, damit sie in diesem Beispiel unabhängig vom Aufbau dieser Vorrichtung immer neben dieser platziert wird, wird sie mit Hilfe eines Rüstungsständers positioniertBefehl 5.2, sodass von diesem aus auch der Radius geprüft werden kannBefehl 5.3. So wird die Endertruhe genau an die Position des Rüstungsständer gesetzt und anschließend prüft der Wiederhol-Befehlsblock mit seinem Befehl, ob im Umkreis von fünf Metern die Endertruhe von einen Spieler geöffnet wurde. Wenn das der Fall ist, bekommt der Spieler eine Nachricht in den Chat gelegtBefehl 5.4. Damit hat der Spieler nun, einen Punktestand, welcher jetzt wieder zurückgesetzt werden soll, damit der Spieler nicht permanent eine Nachricht erhältBefehl 5.5. Wenn man nun mehrere solcher Endertruhen aufstellen würde, könnte man von diesen aus jeweils testen, ob sie geöffnet wurden. Schaltet man die Vorrichtung wieder aus, so wird das Punktestand-Ziel gelöschtBefehl 5.6, die Endertruhe entferntBefehl 5.7 und der Rüstungsständer getötetBefehl 5.8.


Befehlsblöcke mit Befehlen:
scoreboard objectives add PZInvS.5Ender minecraft.custom:minecraft.open_enderchest ["Inventar-Sensor.5: ",{"text":"Anzahl der geöffneten Endertruhen","bold":true}]
summon armor_stand ~ ~-1 ~1 {Small:1b,NoGravity:1b,Invisible:1b,Tags:["EtiInvS.5Alle"]}
execute at @e[type=minecraft:armor_stand,tag=EtiInvS.5Alle] run setblock ~ ~ ~ ender_chest[facing=east]


execute at @e[type=armor_stand,tag=EtiInvS.5Alle] run tellraw @a[scores={PZInvS.5Ender=1..},distance=..5] ["Inventar-Sensor.5: ",{"text":"Du hast die Endertruhe geöffnet","bold":true}]
scoreboard players reset @a[scores={PZInvS.5Ender=1..},distance=..25] PZInvS.5Ender


scoreboard objectives remove PZInvS.5Ender
execute at @e[type=armor_stand,tag=EtiInvS.5Alle] run setblock ~ ~ ~ air
kill @e[type=armor_stand,tag=EtiInvS.5Alle]

Variante 6

Datei:Inventar-Sensor (Befehle) Bild 6.1.png Datei:Inventar-Sensor (Befehle) Bild 6.2.png

Mit Hilfe des Inventarsensors kann man erfassen, ob der Spieler einen bestimmten Gegenstand in einem bestimmten Feld liegen hat, ob er den Gegenstand ausgewählt hat oder ob beides zusammen zutrifft. Dazu wird ein Punktestand-Ziel erstellt, welches die verschiedenen Werte speichern kannBefehl 6.1. Es wird dafür benutzt, die verschiedenen Zustände die beim Inventar entstehen können mit bestimmten Werten zu belegen. Danach bekommt der Spieler ein Namensschild in das zweite Feld von links in die Schnellzugriffsleiste gelegtBefehl 6.2. Wenn der Inventarsensor eingeschaltet wurde, so prüft er nun zuerst, ob sich der gesuchte Gegenstand in dem richtigen Feld der Schnellzugriffsleiste befindetBefehl 6.3, wenn das zutrifft, erhält der Spieler den Wert eins sonst bekommt er keinen Wert. Anschließend wird geschaut, ob der Spieler den gesuchten Gegenstand ausgewählt hat, wenn das zutrifft, bekommt er den Wert zwei, sonst auch wieder keinen Wert. Als letztes wird geschaut, ob er den Gegenstand im richtigen Feld hat und auch ausgewählt hat, dann bekommt er den Wert drei. Solange der Spieler den Gegenstand im Inventar besitzt, wird immer eine der drei Möglichkeiten auslösen und dann bekommt der Spieler je nach Sachverhalt eine der drei Nachrichten in den Chat geschriebenBefehl 6.6Befehl 6.7Befehl 6.8. Anschließend wird sein Punktestand wieder zurückgesetztBefehl 6.9. Wenn der Inventarsensor ausgeschaltet wird, so wird zuerst das Punktestand-Ziel gelöschtBefehl 6.10 und anschließend das Inventar des Spielers von dem gesuchten Gegenstand befreitBefehl 6.11.


Befehlsblöcke mit Befehlen:
scoreboard objectives add PZInvS:6 dummy
replaceitem entity @a[r=25] slot.hotbar.1 minecraft:name_tag 1 0 {display:{Name:"Inventarsensor:6",Lore:["Dieser Gegenstand wird nur erfasst,","wenn er sich im ersten Feld befindet"] } }


scoreboard players set @a[r=25] PZInvS:6 1 {Inventory:[{Slot:1b,id:"minecraft:name_tag",tag:{display:{Name:"Inventarsensor:6"} } } ] }
scoreboard players set @a[r=25] PZInvS:6 2 {SelectedItem:{id:"minecraft:name_tag",tag:{display:{Name:"Inventarsensor:6"} } } }
scoreboard players set @a[r=25] PZInvS:6 3 {SelectedItem:{id:"minecraft:name_tag",tag:{display:{Name:"Inventarsensor:6"} } },Inventory:[{Slot:1b,id:"minecraft:name_tag",tag:{display:{Name:"Inventarsensor:6"} } } ] }
tellraw @a[score_PZInvS:6_min=1,score_PZInvS:6=1,r=25] ["Inventarsensor:6 ",{"text":"In deiner Schnellzugriffsleiste befindet sich in dem zweiten Feld ein Namensschild."} ]
tellraw @a[score_PZInvS:6_min=2,score_PZInvS:6=2,r=25] ["Inventarsensor:6 ",{"text":"Du hast in der Schnellzugriffsleiste das Namensschild ausgewählt."} ]
tellraw @a[score_PZInvS:6_min=3,score_PZInvS:6=3,r=25] ["Inventarsensor:6 ",{"text":"In deiner Schnellzugriffsleiste befindet sich in dem zweiten Feld ein Namensschild und du hast es ausgewählt."} ]
scoreboard players set @a[r=25] PZInvS:6 0


scoreboard objectives remove PZInvS:6
clear @a[r=25] minecraft:name_tag -1 9999 {display:{Name:"Inventarsensor:6"} }

Variante 7

Datei:Inventar-Sensor (Befehle) Bild 7.1.png Datei:Inventar-Sensor (Befehle) Bild 7.2.png

Mit diesem Inventarsensor lässt sich überprüfen, ob der Spieler oder Trichter Gegenstände aus dem Behälter herausgeholt haben. Dazu wird ein Rüstungsständer erzeugt, der die Position der Truhe vorgibtBefehl 7.1. Dadurch das sich bei der Truhe ein Rüstungsständer aufhält, kann man von ihm aus prüfen, welcher Spieler erfasst werden soll, wenn dieser etwas herausgeholt hat. Nun wird eine Truhe an seiner Position platziert, welche komplett voll mit Totems der Unsterblichkeit istBefehl 7.2. Nun wird permanent getestet, ob die Truhe an der Position des Rüstungsständers noch voll istBefehl 7.3, wenn das nicht der Fall ist, bekommt der Rüstungsständer ein Etikett und alle Spieler in der Nähe eine NachrichtBefehl 7.4. Ein nachfolgender Ketten-Befehlsblock setzt an die Position des Rüstungsständers eine komplett gefüllte TruheBefehl 7.5 und das Etikett wird vom Rüstungsständer wieder entfernt Befehl Schrägstrich oder 1= fehlt, siehe Dokumentation. Schaltet man den Inventarsensor aus, so wird zuerst die Truhe entferntBefehl 7.7, dann der RüstungsständerBefehl 7.8 und dann die eventuell vorhandenen Totems im Inventar des SpielersBefehl 7.9.


Befehlsblöcke mit Befehlen:
summon minecraft:armor_stand ~ ~ ~1 {Small:1b,NoGravity:1b,Invisible:1b,CustomNameVisible:1b,CustomName:'{"text":"Inventar","bold":true}',Tags:["EtiInvS.7Alle"]}
execute at @e[type=armor_stand,tag=EtiInvS.7Alle] run setblock ~ ~ ~ chest[facing=east]{Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b} ] }


execute as @e[type=armor_stand,tag=EtiInvS.7Alle] at @s if block ~ ~ ~ minecraft:chest unless block ~ ~ ~ minecraft:chest[facing=east]{Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b} ] } run tag @s add EtiInvS.7Fehlt
execute at @e[type=armor_stand,tag=EtiInvS.7Alle,tag=EtiInvS.7Fehlt] run tellraw @a[distance=..5] ["Inventar-Sensor.7: ",{"text":"Es wurde ein oder mehrere Gegenstände aus der Truhe entnommen.","bold":true}]
execute at @e[type=armor_stand,tag=EtiInvS.7Alle,tag=EtiInvS.7Fehlt] if block ~ ~ ~ chest run data merge block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:totem_of_undying",Count:1b},{Slot:1b,id:"minecraft:totem_of_undying",Count:1b},{Slot:2b,id:"minecraft:totem_of_undying",Count:1b},{Slot:3b,id:"minecraft:totem_of_undying",Count:1b},{Slot:4b,id:"minecraft:totem_of_undying",Count:1b},{Slot:5b,id:"minecraft:totem_of_undying",Count:1b},{Slot:6b,id:"minecraft:totem_of_undying",Count:1b},{Slot:7b,id:"minecraft:totem_of_undying",Count:1b},{Slot:8b,id:"minecraft:totem_of_undying",Count:1b},{Slot:9b,id:"minecraft:totem_of_undying",Count:1b},{Slot:10b,id:"minecraft:totem_of_undying",Count:1b},{Slot:11b,id:"minecraft:totem_of_undying",Count:1b},{Slot:12b,id:"minecraft:totem_of_undying",Count:1b},{Slot:13b,id:"minecraft:totem_of_undying",Count:1b},{Slot:14b,id:"minecraft:totem_of_undying",Count:1b},{Slot:15b,id:"minecraft:totem_of_undying",Count:1b},{Slot:16b,id:"minecraft:totem_of_undying",Count:1b},{Slot:17b,id:"minecraft:totem_of_undying",Count:1b},{Slot:18b,id:"minecraft:totem_of_undying",Count:1b},{Slot:19b,id:"minecraft:totem_of_undying",Count:1b},{Slot:20b,id:"minecraft:totem_of_undying",Count:1b},{Slot:21b,id:"minecraft:totem_of_undying",Count:1b},{Slot:22b,id:"minecraft:totem_of_undying",Count:1b},{Slot:23b,id:"minecraft:totem_of_undying",Count:1b},{Slot:24b,id:"minecraft:totem_of_undying",Count:1b},{Slot:25b,id:"minecraft:totem_of_undying",Count:1b},{Slot:26b,id:"minecraft:totem_of_undying",Count:1b}] }
tag @e[type=armor_stand,tag=EtiInvS.7Alle,tag=EtiInvS.7Fehlt] remove EtiInvS.7Fehlt


execute at @e[type=armor_stand,tag=EtiInvS.7Alle] run setblock ~ ~ ~ air replace
kill @e[type=armor_stand,tag=EtiInvS.7Alle]
clear @a[distance=..25] totem_of_undying


Disambig color
 
Grid Grasblock
Auch im Minecraft Wiki wird das Thema dieser Technik behandelt:
Inventar