Closed Matchlighter closed 10 years ago
It has been detected a few days ago. I wasn't sure what was causing it. Are you sure it's because the chunk isn't fully loaded?
The only way is if block
is null
, which either means your block isn't registered, or getBlockId()
is returning 0.
what is happening is that it's returning 0 (because most times I'm getting the block 2 blocks above the TE), but 0 should be Forge's fake air block :|
In 1.7.2+, yes, but I don't think there is anything like that in 1.6.4 - you have to do a null check. Although it doesn't normally crash... A null check always seems to work when I want to check if it's air.
Edit: Ok, there is something in 1.6.4. I did not know that. So this is weird.
Ok, now that we agree, how could we possibly fix that? Null check and fall back to air / stone block?
That's what I would say.
Potentially fixed here: https://github.com/LordFokas/StargateTech2/commit/f4eb3acfb9bfa219bb9c62d55cfe6ad94c0ea82b
Oh, eh, my guess is it should be fixed. I'll pull and try it when I get a chance.
I'll close it for now. If it isn't gone let me know and I'll reopen.
Their seems to be a bug where
TileEntities
render before the world is fully loaded. This result inBlock block = Block.blocksList[w.getBlockId(pos.x, pos.y, pos.z)];
inBaseTESR
returningnull
and raising and NPE a few lines down.