Astral Sorcery

Astral Sorcery

63M Downloads

Formation and Conversion Wands act weirdly with Botania integration

Hubry opened this issue ยท 2 comments

commented
  • If a wand is set to an item provided by a Botania wand (Rod of the Lands/Highlands/Terra Firma for dirt, Depths for cobble), the render of the item counter shows garbled text (For comparison, Rod of the Shifting Crust shows an infinity symbol in their case).
    example
  • If blocks are provided by the Hand of Ender (which allows pulling from the player's Ender Chest), the wands don't account for those blocks in their count or previews (Rod of the Shifting Crust does).
  • Dirt/cobble duplication: if you have no mana in your inventory, a rod generating dirt/cobble, and at least 1 of those blocks, they will be placed/replaced for no mana cost, not consuming the blocks in inventory.
  • If a Hand of Ender would be providing blocks (but no mana is available to pay the cost of providing them) and some blocks of the same type are in the player's inventory (but not enough to cover the whole area), the blocks replaced by the Conversion Wand dont match the preview and are replaced in an erratic pattern.

Using Forge 14.23.3.2655, AS 1.12.2-1.8.9, Botania r1.10-354.

commented
  1. There is an infinity symbol in the source code. The file is encoded as UTF-8; the string of symbols in the item counter exactly matches what you would get by taking the bytes for the UTF-8 encoding of the infinity symbol - \xE2\x88\x9E - and treating them as Latin-1 characters. Setting a breakpoint on the call to the font renderer shows it is receiving exactly those characters, so it must be the Java compiler treating the contents of the string literal as Latin-1. (Indeed, the documentation says that it uses the platform encoding to interpret bytes in string literals, which would be Latin-1 on American and Australian computers.) Botania's solution is to use the Unicode string escape "\u221E" to exactly specify the character.

  2. Seems to be related to the client not having access to the player's actual server-side ender chest. Botania counts the items on the server thread and then uses the shared class ItemsRemainingRenderHandler to pass the item count to the client thread for rendering. I'd expect that the Shifting Crust rod wouldn't properly count Ender Chests contents when used in MP, since that render handler class is not synced between the client and server.

  3. and 4. are caused by a missing success check on the non-simulated IBlockProvider.provideBlock calls. A simulated request for 100 cobble would return True (since it will request 1 cobble 100 times), while an actual request may return False due to insufficient mana (or ender chest content).

Patch incoming.

commented

Never mind, not gonna patch this - fixing this missing success check properly would take me more than 5 minutes. :P