Fixed mod startup crash
This commit is contained in:
@@ -33,7 +33,7 @@ public class ContentLoader{
|
||||
|
||||
public ContentLoader(){
|
||||
for(ContentType type : ContentType.all){
|
||||
contentMap[type.ordinal()] = new Seq<>(type.contentClass == null ? Object.class : type.contentClass);
|
||||
contentMap[type.ordinal()] = new Seq<>();
|
||||
contentNameMap[type.ordinal()] = new ObjectMap<>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1005,7 +1005,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
int dump = this.cdump;
|
||||
var allItems = content.items();
|
||||
int itemSize = allItems.size;
|
||||
Item[] itemArray = allItems.items;
|
||||
Object[] itemArray = allItems.items;
|
||||
|
||||
for(int i = 0; i < proximity.size; i++){
|
||||
Building other = proximity.get((i + dump) % proximity.size);
|
||||
@@ -1014,7 +1014,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
|
||||
for(int ii = 0; ii < itemSize; ii++){
|
||||
if(!items.has(ii)) continue;
|
||||
Item item = itemArray[ii];
|
||||
Item item = (Item)itemArray[ii];
|
||||
|
||||
if(other.acceptItem(self(), item) && canDump(other, item)){
|
||||
other.handleItem(self(), item);
|
||||
|
||||
Reference in New Issue
Block a user