Skip to content

fix: Item Overlay regex for Windows paths#8

Open
Alex33856 wants to merge 2 commits intoNotEnoughUpdates:masterfrom
Alex33856:dev/fix-item-overlay-regex
Open

fix: Item Overlay regex for Windows paths#8
Alex33856 wants to merge 2 commits intoNotEnoughUpdates:masterfrom
Alex33856:dev/fix-item-overlay-regex

Conversation

@Alex33856
Copy link

No description provided.

@lineargraph
Copy link
Member

huh, is this actually an issue on windows? how does it manifest? all the paths should really just be slashes anyway, hmm. can you tell me about how you get errors with this?

@Alex33856
Copy link
Author

Alex33856 commented Mar 4, 2026

Without this, zero item overlays are loaded on Windows, because NEURepoFile#getPath returns the path with backslashes.

@lineargraph
Copy link
Member

how are you using this project? could you show me a use case that fails on windows (git branch or a .java file)? .java would be nice because then i could actually put that in a github action test

@Alex33856
Copy link
Author

Alex33856 commented Mar 4, 2026

how are you using this project?

It's used in Skyblocker to parse the NEU repo items and item overlays.
Here is where it checks for and applies overlays if they exist.

could you show me a use case that fails on windows (git branch or a .java file)? .java would be nice because then i could actually put that in a github action test

I don't have an easily separable way to reproduce this outside of Minecraft and Skyblocker.

The problem I'm facing is that certain SkyBlock items (Wither Scrolls, Power Scrolls, Totem of Corruption) have additional NBT data (Item Model, Banner Patterns) that is not present in the item file, but in an overlay file.
We create an ItemStack from the repo item and attempt to apply an overlay if one exists.
Because of this issue, on Windows, the ItemStack is missing that additional NBT data and thus does not visually match the actual SkyBlock item.

To replicate in-game with Skyblocker (any version, 1.21.10/1.21.11):

  • Join SkyBlock
  • Open the recipe book, and wait for it to load if it hasn't already
  • Search for Totem of Corruption

On Windows, it appears as a white banner
image

On other platforms, it appears properly with a black/purple banner pattern.
20260304_145523 - Copy

@Alex33856
Copy link
Author

Alex33856 commented Mar 4, 2026

This test can replicate the issue.

java.lang.NullPointerException: Cannot invoke "io.github.moulberry.repo.data.ItemOverlays$ItemOverlayFile.getVersion()" because the return value of "java.util.Map.get(Object)" is null

	at io.github.moulberry.repo.NEURepoParserTest.testOverlayFiles(NEURepoParserTest.java:28)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

@lineargraph
Copy link
Member

perhaps it would make sense to instead make the filepath use forward slashes canonically, even on windows.

Copy link
Member

@lineargraph lineargraph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank youuu will probably try to figure out how to get the action build running on windows as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants