package net.starlikeclient.minecraft.util;

public class EnergyStats {
	private int energy = 5;
	private int energyCeiling = 10;
	
	public boolean depleteEnergy(int energyDeplete) {
		if(0 >= energy - energyDeplete) {
			energy = energy - energyDeplete;
			return true;
		}
		return false;
	}
	public boolean addEnergy(int energyIncrease) {
		if(energyCeiling <= energy + energyIncrease) {
			energy = energy + energyIncrease;
			return true;
		}
		return false;
	}
	public int getEnergy() {
		return energy;
	}
	public int getEnergyCeiling() {
		return energyCeiling;
	}
	public void setEnergyCeiling(int energyCeiling) {
		energy = energyCeiling;
	}
}
