package common.entity.types;

import common.entity.DamageSource;

public class CombatEntry {
	private final DamageSource source;
	private final int damage;
	private final String blockType;
	private final float fallDistance;

	public CombatEntry(DamageSource source, int damage, String blockType, float fallDistance) {
		this.source = source;
		this.damage = damage;
		this.blockType = blockType;
		this.fallDistance = fallDistance;
	}

	public DamageSource getSource() {
		return this.source;
	}

	public int getDamage() {
		return this.damage;
	}

	public String getBlockType() {
		return this.blockType;
	}

	public float getFallDistance() {
		return this.source == DamageSource.outOfWorld ? Float.MAX_VALUE : this.fallDistance;
	}
}
