Wawla - What Are We Looking At

Wawla - What Are We Looking At

73M Downloads

Overlay on mod block causes Index out of Bounds

Draco18s opened this issue ยท 2 comments

commented

I don't see anything wrong with your code to provide the overlay information, but somehow your overlay got a bad item stack from one of my blocks.

As the "lower half" of the ore flowers aren't set to be their own items, the itemblock assumes that the metadata value will only ever be 0-7. As a result, your mod passes my itemblock a stack with a metadata value 8-15 (some how). But again, I don't see how it's occurring as you are correctly using the result from PickBlock (which for my blocks, returns an item stack with metadata 0-7).

Crash report:
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2451299-reasonable-realism-its-a-pack-its-a-mod-it-makes?comment=1112
My block:
https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/flowers/block/BlockOreFlower1.java#L67

I can certainly fix this on my end (enforcing a 0-7 metadata when getting the stack's name), but there might be other mods out there where your code will fail in the same way.

commented

Sorry for the late response. I have long since deprecated my internal HUD so this shouldn't be an issue anymore. It was phased out completely with 1.11.2.

commented

[Salute]