Added full seedling + sapling functionality
This commit is contained in:
@@ -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;
|
||||
|
||||
+2
-1
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user