execute if score world resetAll matches 1.. run scoreboard players remove world resetAll 1
execute as @e[type=rc:hand_south] at @s unless block ~~~ rc:deployer run scriptevent rc:despawnEntity
execute as @e[type=rc:hand_north] at @s unless block ~~~ rc:deployer run scriptevent rc:despawnEntity
execute as @e[type=rc:hand_down] at @s unless block ~~~ rc:deployer run scriptevent rc:despawnEntity
execute as @e[type=rc:hand_west] at @s unless block ~~~ rc:deployer run scriptevent rc:despawnEntity
execute as @e[type=rc:hand_east] at @s unless block ~~~ rc:deployer run scriptevent rc:despawnEntity

execute as @e[type=rc:drill_south] at @s unless block ~~~ rc:drill run scriptevent rc:despawnEntity
execute as @e[type=rc:drill_north] at @s unless block ~~~ rc:drill run scriptevent rc:despawnEntity
execute as @e[type=rc:drill_down] at @s unless block ~~~ rc:drill run scriptevent rc:despawnEntity
execute as @e[type=rc:drill_west] at @s unless block ~~~ rc:drill run scriptevent rc:despawnEntity
execute as @e[type=rc:drill_east] at @s unless block ~~~ rc:drill run scriptevent rc:despawnEntity
execute as @e[type=rc:drill_up] at @s unless block ~~~ rc:drill run scriptevent rc:despawnEntity


gamerule sendcommandfeedback false
scoreboard players add world resetAll 0

execute as @e[type=rc:crushing_wheel_north] at @s unless block ~~~ rc:crushing_wheel run scriptevent rc:despawnEntity
execute as @e[type=rc:crushing_wheel_west] at @s unless block ~~~ rc:crushing_wheel run scriptevent rc:despawnEntity
execute as @e[type=rc:mixer_entity] at @s unless block ~~~ rc:mechanical_mixer run scriptevent rc:despawnEntity
execute as @e[type=rc:press_entity] at @s unless block ~~~ rc:mechanical_press run scriptevent rc:despawnEntity
execute as @e[type=rc:mechanical_arm_entity] at @s unless block ~~~ rc:mechanical_arm run scriptevent rc:despawnEntity
execute as @e[type=rc:filter_entity] at @s unless block ~~~ rc:brass_funnel unless block ~~~ rc:andesite_funnel run scriptevent rc:despawnEntity
execute as @e[type=rc:water_wheel] at @s unless block ~~~ rc:water_wheel run scriptevent rc:despawnEntity
execute as @e[type=rc:large_water_wheel] at @s unless block ~~~ rc:large_water_wheel run scriptevent rc:despawnEntity
execute as @e[type=rc:flywheel] at @s unless block ~~~ rc:flywheel run scriptevent rc:despawnEntity
execute as @e[type=rc:mechanical_bearing] at @s unless block ~~~ rc:mechanical_bearing run scriptevent rc:despawnEntity
execute as @e[type=rc:bearing_item] at @s unless block ~~~ rc:mechanical_bearing run scriptevent rc:despawnBearing


execute as @e[type=rc:smart_chute.container] at @s unless block ~~~ rc:smart_chute unless block ~~~ rc:smart_observer run scriptevent rc:despawnEntity


scoreboard objectives add speed dummy speed
scoreboard objectives setdisplay belowname speed

execute as @e[type=rc:belt_item] at @s run scriptevent rc:belt_item