Darkhax-Minecraft / WAWLA

What Are We Looking At (WAWLA) is a mod aimed and drawing more attention to providing in-game documentation for players.
GNU Lesser General Public License v2.1
32 stars 22 forks source link

Overlay on mod block causes Index out of Bounds #65

Closed Draco18s closed 7 years ago

Draco18s commented 7 years ago

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.

Darkhax commented 7 years ago

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.

Draco18s commented 7 years ago

[Salute]