Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Calculating the x value
- execute as @s store result score @s charlottebuff.distance_from_last_minecart_enter_squared run data get entity @s Pos[0]
- scoreboard players operation @s charlottebuff.distance_from_last_minecart_enter_squared -= @s charlottebuff.entered_minecart_pos_x
- # Squaring the x value
- scoreboard players operation @s charlottebuff.distance_from_last_minecart_enter_squared *= @s charlottebuff.distance_from_last_minecart_enter_squared
- # Calculating the z value
- execute as @s store result score @s charlottebuff.accumulator run data get entity @s Pos[2]
- scoreboard players operation @s charlottebuff.accumulator -= @s charlottebuff.entered_minecart_pos_z
- # Squaring the z value
- scoreboard players operation @s charlottebuff.accumulator *= @s charlottebuff.accumulator
- # Adding both squares
- scoreboard players operation @s charlottebuff.distance_from_last_minecart_enter_squared += @s charlottebuff.accumulator
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement