optimizations

This commit is contained in:
Mylloon 2021-06-27 21:20:53 +02:00
parent 82bbe8c7b2
commit e286446e02

21
main.sk
View file

@ -355,11 +355,12 @@ command deacoudre: # dé à coudre
else: else:
set {thimble} to true set {thimble} to true
broadcast "&aDémarrage de la partie de dé à coudre !" broadcast "&aDémarrage de la partie de dé à coudre !"
teleport all players to location at 101.5, 83, -314 in world "world" loop all players:
set gamemode of all players to survival teleport loop-player to location at 101.5, 83, -314 in world "world"
feed all players set gamemode of loop-player to survival
heal all players feed loop-player
cure all players heal loop-player
cure loop-player
else: else:
send {@errorMessage} send {@errorMessage}
@ -372,17 +373,15 @@ every 0.5 second in "world": # dé à coudre
if block at loop-player is water: if block at loop-player is water:
set {_xLocationBlock1} to difference between X-location of block at loop-player and 103.5 set {_xLocationBlock1} to difference between X-location of block at loop-player and 103.5
set {_xLocationBlock2} to difference between X-location of block at loop-player and 99.5 set {_xLocationBlock2} to difference between X-location of block at loop-player and 99.5
if {_xLocationBlock1} and {_xLocationBlock2} <= 0: set {_zLocationBlock1} to difference between Z-location of block at loop-player and -312.5
set {_zLocationBlock2} to difference between Z-location of block at loop-player and -304.5
set {_yLocationBlock} to difference between Y-location of block at loop-player and 57.5
if {_xLocationBlock1} and {_xLocationBlock2} and {_zLocationBlock1} and {_zLocationBlock2} <= 0:
continue continue
if {_xLocationBlock1} and {_xLocationBlock2} >= 4: if {_xLocationBlock1} and {_xLocationBlock2} >= 4:
continue continue
set {_yLocationBlock} to difference between Y-location of block at loop-player and 57.5
if {_yLocationBlock} != 0: if {_yLocationBlock} != 0:
continue continue
set {_zLocationBlock1} to difference between Z-location of block at loop-player and -312.5
set {_zLocationBlock2} to difference between Z-location of block at loop-player and -304.5
if {_zLocationBlock1} and {_zLocationBlock2} <= 0:
continue
if {_zLocationBlock1} and {_zLocationBlock2} >= 8: if {_zLocationBlock1} and {_zLocationBlock2} >= 8:
continue continue
set block at loop-player to wool set block at loop-player to wool