tick1.mcfunction 578 B

1234567
  1. # 调整物品:仅在纵向速度 < -0.015 且 y > 10 时,才将 NoGravity 设置为 false
  2. execute as @e[tag=bonus_item] store result score @s temp run data get entity @s Motion[1] 1000
  3. execute as @e[tag=bonus_item] if entity @s[x=1000,y=10,z=7000,dx=100,dy=100,dz=100,scores={temp=-15..}] run data merge entity @s {NoGravity:0b}
  4. execute as @e[tag=bonus_item] unless entity @s[x=1000,y=10,z=7000,dx=100,dy=100,dz=100,scores={temp=-15..}] run data merge entity @s {NoGravity:1b}
  5. # 清理苦力怕爆炸的效果云
  6. kill @e[type=minecraft:area_effect_cloud,nbt={WaitTime:10}]