Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thingamajigs 2 Long Roads: Dynamic Sign Custom Texture Loading #1

Open
roberttkahelin8 opened this issue Aug 30, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@roberttkahelin8
Copy link
Owner

roberttkahelin8 commented Aug 30, 2024

Attention to players of Thingamajigs 2 Addons!
The last addon being developed is Thingamajigs 2 Long Roads.

Due to a problem, the mod has been put on hiatus (but could be done sooner if some conditions were fulfilled).
Long Roads contains dynamic signs, which can change texture on the fly to anything registered with a resource location.

The new system is being worked on, however has hit a road block (no pun intended).

The system probably was already doomed to fail from the start.

  • Currently, it takes PNG files' names from a directory and puts them inside the mod's internal list as a reference for later. The reference only accepts PNG files (if they are valid) and rejects all other file types, reducing risk issues.

  • Each internal list 'String' is converted to a 'resource location' with the format (pretend that 'cool_thingy.png' is the image we want to add): "thingamajigslongroads:textures/custom_signs/cool_thingy.png".

  • A text file ("loaded_signs.txt") is created in the custom directory 'thingamajigs_road_signs' with all references that were created and put in the internal list.

The issue now is that the resource location needs to actually point to the texture in the custom directory, and that is outside of CMB's coding know-how, and is baffling.

Note that some research indicates potential requirement of a custom resource loader, messing around with resourcepack registration, and some image loading and unloading using Java IO.

If anyone knows a good way (that supports server and client) to convert a PNG to a resource location-tied minecraft texture that an entity model can reference in it's model layer location, then please add to this suggestion, it would be amazing, and credit would be given instantly.

@roberttkahelin8 roberttkahelin8 added the enhancement New feature or request label Aug 30, 2024
@roberttkahelin8 roberttkahelin8 pinned this issue Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant