1

Need Help With Command Stuff

Acidpop7/14/19 7:14 am
1 emeralds 183 5
7/17/2019 1:38 pm
Pr1zz0n
Is it possible to make this work for all items without using a million commands?

Posted by avatar
Acidpop
Level 61 : High Grandmaster Droid
145

Create an account or sign in to comment.

5

1
07/17/2019 1:38 pm
Level 1 : New Network
Pr1zz0n
Pr1zz0n avatar
yes, it's possible with just one command block.... always running command block and it is written in just one line so.... the answer is yes.
help :::: watch yt video i ain expert
2
07/14/2019 8:27 amhistory
Level 37 : Artisan Dragon
dragonmaster
dragonmaster avatar
If I didn't make a mistake this should work for all items (assuming they don't have a special display setting:



you run a function in a loop from

execute as @e[type=item,nbt={OnGround:1b,Thrower:{}}] at @s run function ...

and in the function you do this:

summon armor_stand ~ ~-1.6 ~-0.5 {ArmorItems:[{id:stone},{},{},{}],NoGravity:1,Pose:{Head:[90.0f,0.0f,0.0f]}}
data modify entity @e[type=armor_stand,distance=..2,sort=nearest,limit=1] ArmorItems[3] set from entity @s Item
kill @s




(summons armorstand, copies item data to head slot, kills item)



you should be able to do a similar thing to get the item back (summon dummy item, copy ArmorItems[3] data to Item data of the dummy item, kill armorstand)




Edit: changed distance=..1 to distance=..2
1
07/14/2019 8:44 amhistory
Level 61 : High Grandmaster Droid
Acidpop
Acidpop avatar
can't seem to get it to work

these are my original commands:

/execute as @e[nbt={Item:{id:"minecraft:apple"},OnGround:1b}] at @s run summon armor_stand ~ ~-1.7 ~-1 {Invisible:1b,NoGravity:1b,ArmorItems:[{},{},{},{id:"apple",Count:1b}],HandItems:[{},{}],CustomName:"{\"text\":\"item\"}",DisabledSlots:2039583,Pose:{Head:[90f,0f,0f]}}


/execute as @e[nbt={Item:{id:"minecraft:apple"},OnGround:1b}] run kill @s


/execute as @e[name=item] at @s if entity @a[distance=..2,scores={shift=10..}] run give @a[distance=..2,limit=1,scores={shift=10..}] apple


/execute as @e[name=item] at @s if entity @a[distance=..2,scores={shift=10..}] run kill @s


if you don't mind could you fix them?
and could you also try to make it work for the item count
if you don't thanks anyway
1
07/14/2019 9:14 am
Level 37 : Artisan Dragon
dragonmaster
dragonmaster avatar
I just noticed I made the distance too short in my second command

increase that to ..2 or ..3 and it should work
1
07/14/2019 9:35 am
Level 37 : Artisan Dragon
dragonmaster
dragonmaster avatar
and to get the item back you do this in a loop:



execute at @a[scores={shift=10..}] as @e[distance=..2,type=armor_stand] run function ...


and in the function you do this:

summon item ~ ~ ~ {Item:{id:"minecraft:stone"}}
data modify entity @e[type=item,distance=..2,sort=nearest,limit=1] Item set from entity @s ArmorItems[3]
kill @s
Planet Minecraft

Website

© 2010 - 2022
www.planetminecraft.com

Welcome