In order to fully replace testfor
and simply return the number of entities existing, something like execute if entity @e[type=squid]
or execute if entity @e[type=squid] run
should work. However, it instead exhibits the following behavior:
if block
: If the block is found, a syntax error is thrown. if the block is not found, nothing happens.if entity
: If the entity is found, a syntax error is thrown. If the entity is not found, the message is "No entity was found."if score
: If the score comparison succeeded, a syntax error is thrown. If the score comparison failed, nothing happens.if blocks
: If the regions match, a syntax error is thrown. If the regions do not match, nothing happens.
NOTE: Excluding run
at the end of each of these commands after the relevant arguments results in a syntax error upon running.
Now it just gives no output, whether it succeeded or failed.