scoreboard objectives remove ChargerMorph
scoreboard objectives remove ChefMorph
scoreboard objectives remove GardenerMorph
scoreboard objectives remove HydroMorph

teleport @e[type=ldz:ender_charger] ~ ~5 ~
teleport @e[type=ldz:ender_chef] ~ ~5 ~
teleport @e[type=ldz:ender_gardener] ~ ~5 ~
teleport @e[type=ldz:ender_hydro] ~ ~5 ~

event entity @e[type=ldz:ender_charger] despawn
event entity @e[type=ldz:ender_chef] despawn
event entity @e[type=ldz:ender_gardener] despawn
event entity @e[type=ldz:ender_hydro] despawn

scoreboard objectives remove PCharger
scoreboard objectives remove PChef
scoreboard objectives remove PGardener
scoreboard objectives remove PHydro
scoreboard objectives add PCharger dummy
scoreboard objectives add PChef dummy
scoreboard objectives add PGardener dummy
scoreboard objectives add PHydro dummy

summon ldz:ender_charger ~ ~ ~ 270 0
summon ldz:ender_chef ~ ~ ~ 0 0
summon ldz:ender_gardener ~ ~ ~ 90 0
summon ldz:ender_hydro ~ ~ ~ 90 0

scoreboard players add @e[type=ldz:ender_charger,c=1] PCharger 1
scoreboard players add @e[type=ldz:ender_chef,c=1] PChef 1
scoreboard players add @e[type=ldz:ender_gardener,c=1] PGardener 1
scoreboard players add @e[type=ldz:ender_hydro,c=1] PHydro 1

event entity @e[type=ldz:ender_charger] set_barrier_sensor_to_true
event entity @e[type=ldz:ender_chef] set_barrier_sensor_to_true
event entity @e[type=ldz:ender_gardener] set_barrier_sensor_to_true
event entity @e[type=ldz:ender_hydro] set_barrier_sensor_to_true

teleport @e[type=ldz:ender_charger,scores={PCharger=1}] -531 167 -159
teleport @e[type=ldz:ender_chef,scores={PChef=1}] 82 153 -482
teleport @e[type=ldz:ender_gardener,scores={PGardener=1}] 31 165 446
teleport @e[type=ldz:ender_hydro,scores={PHydro=1}] 593 166 50