Display Morejava.lang.NullPointerException
at ic2.snyke7.advMachine.TileAdvMachine.canWork(TileAdvMachine.java:227)
at ic2.snyke7.advMachine.TileAdvMachine.g(TileAdvMachine.java:179)
at up.h(World.java:193
at gr.h(WorldServer.java:439)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:632)
at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:563)
at axv.p(IntegratedServer.java:110)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:469)
at ep.run(SourceFile:539)--- END ERROR REPORT 626763fc ----------
I have no clue as to what's the cause. TileAdvMachine.g() is updateEntity(), TileAdvMachine.canWork is:
public boolean canWork() {
if(slots[0] == null) return false;
ItemStack result = getResultFor(slots[0]); getResultFor gives the result for extraction in this case
if(result == null) return false;
int remaining = 0;
for(int i = 2; i < slots.length; i++) { slots are the itemstacks in the slots, 0 being raw items, 1 is the battery slot, 2,3,4 are the result slots
if(slots == null) return true;
else
if(slots.isItemEqual(result)) {
if(slots[i].stackSize + result.stackSize <= slots[i].getItem().getItemStackLimit()) <-- line 227 I've checked slots[i][i][i] for not being null, result for not being null, so that leaves slots.getItem() being null which makes no sense? Or did CMR mess up?
return true;
else
remaining += Math.max(0, slots[i].getItem().getItemStackLimit() - slots[i].stackSize);
}
}
return remaining >= result.stackSize;
}
Sorry for the layout, tabs turned into spaces for some reason [/i][/i][/i][/i][/i][/i]