Fixed mod startup crash

This commit is contained in:
Anuken
2023-05-22 21:42:46 -04:00
parent c4b1df9526
commit 871548c095
2 changed files with 3 additions and 3 deletions

View File

@@ -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<>();
}
}

View File

@@ -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);