execute at @e[type=bat,name=enderhopper] as @e[type=bat,name=enderhopper] run setblock ~ ~1 ~ minecraft:hopper execute at @e[type=bat,name=enderhopper] as @e[type=bat,name=enderhopper] run summon armor_stand ~ ~1 ~ {Invisible:1b,Invulnerable:1b,PersistenceRequired:1b,CustomName:"hopper"} execute at @e[type=armor_stand,name="hopper"] as @e[type=armor_stand,name="hopper"] run tp @e[type=item,distance=..5] @s execute at @e[type=bat,name=enderhopper] run kill @e[type=bat,name=enderhopper] execute at @e[type=bat,name=enderhopper] run kill @e[type=item,distance=..2] execute at @e[type=armor_stand,name="hopper"] as @e[type=armor_stand,name="hopper"] run particle minecraft:enchant ~ ~ ~ 0.1 0.1 0.1 1 1 normal execute at @e[type=armor_stand,name="hopper"] as @e[type=armor_stand,name="hopper"] run particle minecraft:portal ~ ~ ~ 0.1 0.1 0.1 1 1 normal execute at @e[type=armor_stand,name="hopper"] as @e[type=armor_stand,name="hopper"] unless block ~ ~ ~ minecraft:hopper run kill @e[type=item,distance=..5] execute at @e[type=armor_stand,name="hopper"] as @e[type=armor_stand,name="hopper"] unless block ~ ~ ~ minecraft:hopper run kill @e[type=armor_stand,distance=..5]