[1.12.2 - Mod Compatibility] Crash involving OTG
NotAVerb opened this issue ยท 6 comments
I got this error shortly after creating a world with the Open Terrain Generator mod.
AW2 v2.4.37
OTG v4
https://gist.github.com/NotAVerb/c03f1a9bf01710deb123cb858f57229a
That appears to be OTG issue. They pass in invalid meta for the block - I have no idea where they get it from as AW only returns sub blocks with correct meta in its getSubBlocks method.
Feel free to reopen if they feel otherwise, but in that case I would like to understand where they are getting meta 3 from for this block.
Looked at this a bit more and it seems you may be using some kind of structure generation of OTG? Perhaps there's an issue there?
Likely OTG is generating structures and objects that are defined in BO3 files. BO3 files are like schematics, except that OTG can use them and the files are plain text and can be read and edited with a text editor. Likely there are some BO3's containing blocks with non-vanilla block id's. If these BO3's are used with a different set of mods than they were made with then those block id's may now point to the wrong blocks. So it would try to query block id's or block id + metadata combinations that don't actually exist. I think that normally just returns null instead of throwing an exception though(?).
Catching ArrayIndexOutOfBoundsException now, so this will be fixed with the next version of OTG.
My opinion - block ids were last supposed to be used directly in 1.6.4. Since 1.7 the resourcelocation names are supposed to be used so the BO3 format should use that.
Adding defensive code in AW just because some other mod may be using block ids seems like a lot of time wasted and a lot of code that will just make maintenance a little more complicated. And block ids are not the only thing that has changed since 1.7, so I would need to put code in for potion ids, null item stacks and a lot of other stuff if I followed the same direction.