Implemented basic block inventories
This commit is contained in:
@@ -7,4 +7,10 @@ public class UnitInventory {
|
||||
public final ItemStack item = new ItemStack(Item.getByID(0), 0);
|
||||
public final LiquidStack liquid = new LiquidStack(Liquid.getByID(0), 0);
|
||||
public float power = 0f;
|
||||
|
||||
public void addItem(Item item, int amount){
|
||||
if(this.item.item != item) this.item.amount = 0;
|
||||
this.item.item = item;
|
||||
this.item.amount += amount;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user