jaquadro / GardenCollection

A collection of garden-themed mods for Minecraft Forge.
MIT License
24 stars 12 forks source link

Odd interaction between Garden Soil and Botania Flower Pouch #33

Closed thephoenixlodge closed 9 years ago

thephoenixlodge commented 9 years ago

It seems that right clicking the Botania Flower pouch onto Garden Soil deducts mystical flowers from the pouch and uses them to fill the slots in the garden soil, which you normally only see when using the trowel. The flowers do not render immediately however, but will do so upon using the trowel to look at the soil. However, upon closing the gui, this then causes a crash, presumably due to mystical flowers usually being counted as large so not actually being valid to fit in all the slots of the soil at once. Not sure which side this would need to be fixed on, so posting here first since at least the part where it causes a crash is on the Garden Stuff side.

Crash Report: http://pastebin.com/bPjsyWCG Botania Version: 1.7-220 Garden Stuff Version: 1.6.5

jaquadro commented 9 years ago

I can't reproduce the crash. Clicking a plot (or pot) with the seed bag does fill it with as many flowers as it can, and they don't appear immediately, but I don't crash after querying it with the trowel.

2015-09-07_02 41 07

The auto-insert behavior looks like something I cannot control, as Botania's behavior for right-clicking with that item is to check if the target block is an inventory, and then attempt dumping all of its contents into it (e.g. shift+right-click on a chest). All of the soil and containers except the tilled garden soil are inventories, so they will happily take the plants. Maybe I could override it in the Forge hook.

The size restrictions were mostly lifted a while ago, with some extra rendering tricks to try and deal with the weirdness of big plants in edge slots.

I don't have a good idea for why you crashed with the given stack trace, but maybe you could provide more specific repro instructions?

thephoenixlodge commented 9 years ago

Honestly I'm not sure whether the crash was specifically tied to it or exactly how I caused it, it just seemed to randomly happen a few seconds after I closed the trowel soil gui

jaquadro commented 9 years ago

They're probably not related, but it's still a concerning crash. The line in question is:

return (index >= 0) ? dataStack[index] : defaultMeta;

In a single-threaded environment it should be impossible to crash there, so there must be some race I did not anticipate. Oh wow, the client and server threads are probably racing each other on a shared, static block instance. Eep.

Thanks for catching it, even if by accident. I think it's an SSP-only bug.

jaquadro commented 9 years ago

Both the Botania flower pouch and crash are fixed in 1.6.6.