This commit is contained in:
Anuken
2019-09-15 16:54:58 -04:00
parent 681347e933
commit 5ba7e1d08b
@@ -86,14 +86,15 @@ public class CoreBlock extends StorageBlock{
} }
state.teams.get(tile.getTeam()).cores.add(tile); state.teams.get(tile.getTeam()).cores.add(tile);
entity.storageCapacity = entity.proximity().sum(e -> isContainer(e) ? e.block().itemCapacity : 0); entity.storageCapacity = itemCapacity + entity.proximity().sum(e -> isContainer(e) ? e.block().itemCapacity : 0);
entity.proximity().each(this::isContainer, t -> { entity.proximity().each(this::isContainer, t -> {
t.entity.items = entity.items; t.entity.items = entity.items;
t.<StorageBlockEntity>entity().linkedCore = tile; t.<StorageBlockEntity>entity().linkedCore = tile;
}); });
for(Tile other : state.teams.get(tile.getTeam()).cores){ for(Tile other : state.teams.get(tile.getTeam()).cores){
entity.storageCapacity += other.block().itemCapacity; if(other == tile) continue;
entity.storageCapacity += other.block().itemCapacity + other.entity.proximity().sum(e -> isContainer(e) ? e.block().itemCapacity : 0);
} }
for(Item item : content.items()){ for(Item item : content.items()){