-
Bug
-
Resolution: Awaiting Response
-
None
-
Minecraft 1.13-pre6
-
None
-
Unconfirmed
-
(Unassigned)
I have an armor_stand with a motion and when I want to stop it I use the NoGravity tag. But the amror stand gets stopped at the wrong position (I think it gets stopped one tick before the NoGravity tag is set to 1). And reloading the world corrects it.
If I teleport to it before the world reload, I get teleported where the armor_stand should be, not at the position the armor_stand is displayed
// Summon function (Gives a Motion to the armor_stand according to its orientation): summon armor_stand ~ ~ ~ {Tags:["Grenade_Sticky","Grenade","CanBeAlive","InitGrenade"],Invisible:1,Small:1,Marker:1,ArmorItems:[{},{},{},{id:"minecraft:emerald_block",Count:1}]} scoreboard players set @e[tag=InitGrenade] GrenadeCooldown 100 execute as @e[tag=InitGrenade] at @s run tp @s @p[scores={ID=1..4}] execute as @e[tag=InitGrenade] at @s run tp @s ~ ~1.5 ~ execute as @e[tag=InitGrenade] run function tria:weapons/grenades/give_velocity tag @e[tag=InitGrenade,scores={VectorX=0}] add Grenade_NoCollX tag @e[tag=InitGrenade,scores={VectorZ=0}] add Grenade_NoCollZ tag @e remove InitGrenade
// Collisions
execute as @e[tag=Grenade_Sticky] store result score @s Var1 run data get entity @s Motion[0] 1000000
execute as @e[tag=Grenade_Sticky] store result score @s Var2 run data get entity @s Motion[2] 1000000
execute as @e[tag=Grenade_Sticky,tag=!Grenade_NoCollX,scores={Var1=0}] run data merge entity @s {NoGravity:1}
execute as @e[tag=Grenade_Sticky,tag=!Grenade_NoCollZ,scores={Var2=0}] run data merge entity @s {NoGravity:1}
The first screenshot is taken before executing the function, the second is taken just after, the 3rd is taken after a movement of the player, and the 4th is taken after a reload of the world