BlockUI

BlockUI

19M Downloads

[BUG] Custom style packs with icons crash

IchHabeHunger54 opened this issue ยท 6 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest MineColonies Verison?

  • I am running the latest alpha version of MineColonies for my Minecraft version.

Did you check on the Wiki? or ask on Discord?

  • I checked the MineColonies Wiki and made sure my issue is not covered there. Or I was sent from discord to open an issue here.

Minecraft Version

1.19

MineColonies Version

1.0.988-ALPHA

Structurize Version

1.0.437-ALPHA

Related Mods and their Versions

Forge: 43.1.1
BlockUI: 0.0.60-ALPHA
Domum Ornamentum: 1.0.59-ALPHA-universal
Multi-Piston: 1.2.16-ALPHA

Current Behavior

I am currently developing the Antique style pack and transitioned my style to the new build tool.
I changed my pack.json's icon (among other properties, such as the description and required mods list).
Now, whenever I try to change my build tool's style pack and scroll down to where my style would (supposedly) be, the game crashes.
Removing the custom icon fixes the issue.
I have also heard that the Cavern style currently faces the same issues, so I assume this is the case for all custom style packs.

Expected Behavior

Not to crash, and show the pack (including the icon) as you would expect.

Reproduction Steps

  1. Build something and scan it.
  2. Close your game. (Might not be necessary, but I did it in both cases I encountered this bug.)
  3. In your newly-created player style pack in the blueprints folder, in pack.json, set the icon to an image of your choosing (located in the same folder).
  4. Start the game and enter your world.
  5. Open the build tool UI.
  6. Click on Switch Pack and scroll down to your player-specific style pack. (I'd guess that if it crashes immediately, the pack already shows up at the top, I haven't encountered this myself though.)
  7. Observe how the game crashes.

Logs

https://gist.github.com/IchHabeHunger54/509f37ce2c19e911635d7286a5fc6468

Anything else?

The issue appears to be caused by the game loading the image path as a resource location instead of a path (as I highly doubt that the structurize: prefix is supposed to be there).

commented

It looks like the problem is that it doesn't like that you have a space in the name of your Minecraft instance. So you can probably workaround this by editing that out.

It does seem like a bug in the way it handles out-of-jar images, though. It likely needs to be using FolderPackResources instead.

commented

This is probably mostly a Structurize bug, rather than an mcol or BlockUI bug. Either BlockUI would need to provide a "render texture using direct Path" option or (better) Structurize should make a FolderPackResources with a custom namespace to represent the loose blueprints folder and translate paths accordingly when converting them to ResourceLocations.

commented

It's a blockUI bug, we got a special ResourceLocation already with a custom namespace, but this one still maintains the regex but shouldn't

commented

Still present on Minecol 1.0.995-ALPHA, Structurize 1.0.441-ALPHA and BlockUI 0.0.61-ALPHA, however with a different log: https://gist.github.com/IchHabeHunger54/05438b85b388f44977d36cea25ab32a1

commented

Completely different issue @Raycoms

commented

image
somehow fixed itself. idk