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

Is there a way to make OptiGUI exclusive .properties files #30

Closed
rybomups opened this issue Apr 5, 2023 · 7 comments
Closed

Is there a way to make OptiGUI exclusive .properties files #30

rybomups opened this issue Apr 5, 2023 · 7 comments

Comments

@rybomups
Copy link

rybomups commented Apr 5, 2023

I'm currently having an issue with my pack (Rybo's Enhanced GUI) where it is assigning a GUI texture to barrels I would like to make it available to any user of either Optifine or OptiGUI, of course with limited features if they go with Optifine. When Optifine reads the barrel.properties file (it is simply:
container=chest
_barrel=true
texture=barrel.png)
it naturally assigns chests the barrel texture and so barrels default on the chest texture. I could fix the problem by switching the barrel and chest texture locations and having the barrel be the default, but I don't want to do that as I would also like vanilla users to still have some features and would like them to see all the chest-like tile entities to have a chest-like texture.

I know I could specify more conditions to make the problem only occur between single chests and barrels but it still is a problem and I would rather not have multiple different files to choose from based on what client you plan on running the resource pack on if avoidable.

I'm wondering if you could add a method for making specific .properties files only readable by OptiGUI, as then I could have Optifine sidestep the file and not have it cause issues on those clients.

@opekope2
Copy link
Owner

opekope2 commented Apr 5, 2023

The chest properties file is the feature of OptiFine I like the least from a programmer's perspective, because it lets this happen. I feel like barrels belong to chests, but I overlooked OptiFine compatibility with these features.

Removing these features from OptiFine properties is a breaking change, which breaks all OptiGUI-compatible resource packs when updating from 1.1.6 to 2.0.0.

Adding an OptiGUI-only properties file is definitely a good idea. I dismissed it because I thought cramming all new features into the OptiFine properties is a good idea, as there are not many. The new codebase creates a filter chain instead of storing the properties file and matching against it. This enables the possibility of a more advanced configuration file for OptiGUI. But this might be an overkill.


This is a good observation to help polishing "extension" features before the full 2.0.0 release. Since it's a complete rewrite, a major version change, breaking compatibility with the old codebase is less of a big deal than making properties files and the docs a bloated mess.

@opekope2 opekope2 mentioned this issue Apr 5, 2023
@opekope2
Copy link
Owner

opekope2 commented Apr 5, 2023

  1. The simple solution
    Add OptiGUI-exclusive properties files to /assets/minecraft/optigui/gui/container/.
    However, placing images in a different folder or having duplicate images is counter-intuitive.

  2. The simpler solution
    Add OptiGUI-exclusive properties files to /assets/minecraft/optifine/gui/container/ with a different extension.
    However, in some cases, a completely different file would be needed for OptiGUI, which can collide with the OptiFine one.

  3. The overkill solution
    Add OptiGUI-exclusive filter chain (JSON/YAML) configuration files to /assets/minecraft/optigui/gui/container/.
    This enables matching against advanced conditions, but if no one uses it, why add it in the first place?
    And again, this may collide with an OptiFine configuration.

  4. Add _optigui_extension=file.properties option to OptiFine files
    This would make OptiGUI load that file as if it was part of the original file. Extensions would be put there.
    This fixes a case with 1 and 2 when a completely different properties file with all configurations would be needed for OptiGUI, but for OptiGUI-only properties, this adds a "redundant" file.

Some of these ideas are older, I came up with some of them now. I don't have a big community to ask which is best, and I only know a couple resource packs with OptiGUI support (namely the ones featured on the readme on Modrinth and CurseForge) so I'll listen to some opinions (and possibly new ideas) to make OptiGUI better

@opekope2
Copy link
Owner

opekope2 commented Apr 5, 2023

Oh yeah, if I split OptiGUI features from OptiFine ones, I'll definitely remake the chest.properties.

@opekope2
Copy link
Owner

opekope2 commented Apr 9, 2023

The rework is planned to be released as part of beta 4, and it can be tracked in #32. The documentation will be updated when beta 4 gets released.

@opekope2
Copy link
Owner

OptiGUI 2.1.0-beta.1 introduced OptiGUI-specific files, read more about it here.

_barrel has benn removed from OptiFine files. I wrote a migration guide.

@opekope2
Copy link
Owner

@rybomups I looked into your resource pack. You need to put the barrel.properties into the /assets/optigui/gui folder and rename it to barrel.ini as I have recently updated the wiki page. This was introduced in OptiGUI 2.1.0-beta.1.

@opekope2
Copy link
Owner

opekope2 commented Jun 3, 2023

I have updated the documentation, as it was wrong about the folder in which the .ini files should go.

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

No branches or pull requests

2 participants