package net.minecraft.world.phys;

import net.minecraft.world.entity.Entity;

public abstract class HitResult {
    protected final Vec3 location;
    
    protected HitResult(final Vec3 dem) {
        this.location = dem;
    }
    
    public double distanceTo(final Entity aom) {
        final double double3 = this.location.x - aom.getX();
        final double double4 = this.location.y - aom.getY();
        final double double5 = this.location.z - aom.getZ();
        return double3 * double3 + double4 * double4 + double5 * double5;
    }
    
    public abstract Type getType();
    
    public Vec3 getLocation() {
        return this.location;
    }
    
    public enum Type {
        MISS, 
        BLOCK, 
        ENTITY;
    }
}
