Added full seedling + sapling functionality

This commit is contained in:
Ceikry
2021-03-09 21:32:19 -06:00
parent 5231120ae4
commit 9564c36706
2 changed files with 3 additions and 1 deletions
@@ -806,6 +806,7 @@ public class Container {
public Item get(Item item){
for(Item i : items){
if(i == null) continue;
if(item.getId() == i.getId()) return i;
}
return null;
@@ -67,7 +67,8 @@ class SeedlingState(player: Player? = null) : State(player) {
val inBank = player.bank.get(Item(seed.id))
if(inBank == null) removeList.add(seed)
else {
player.bank.replace(Item(seed.sapling), inBank.slot)
player.bank.remove(Item(inBank.id,1))
player.bank.add(Item(seed.sapling))
removeList.add(seed)
}
}