Java implementation of a physics collider