opekope2 / OptiGUI

Blazing fast custom GUI textures on Fabric and Quilt with built-in OptiFine custom GUI resource pack support
https://opekope2.dev/OptiGUI/
MIT License
22 stars 4 forks source link

Example files in Documentation #49

Closed Rafii2198 closed 1 year ago

Rafii2198 commented 1 year ago

I am trying to create an RP that has support for OptiGui, the thing is I can't get it to work, and I am sure the issue is me not understanding something. If there were some example files, or the best thing would be an example RP with some simple changes then it would be a lot easier to understand and with documentation, it would help make some more advanced things.

Apologies if it wrong place to report it, I have no idea if there is another place to do it.

opekope2 commented 1 year ago

Actually, I'm working on an OptiGUI resource pack, not sure when it's going to be finished. I recently updated the docs, because I wrote wrong folders in it. I suggest you to take a look at the Minecraft log and search for OptiGUI: it tells you what files it's loading, and what problems are in those files (if any)

Rafii2198 commented 1 year ago

Alright, I got it to work, thanks! I put it in the wrong location. And I have another question, out of scope of this issue but don't know where to ask, I am playing on a vanilla rpg server, there are npcs that you can interact with, and I wanted to create a custom gui for each of them. The thing is they are using some custom stuff to make these inventories and I have no idea how to modify them or if it is even possible image (I have some mods to add overlays and other visual things, but the server itself is vanilla with plugins, no mods required)

opekope2 commented 1 year ago

That's a thing lots of servers do (inventory menus), and I want to add support for them in the future. If you right-click an entity, it should be possible with some quirks. The trick is to use interaction.texture. It looks like the top row of the chest GUI, so you can use this selector to match the original texture (there is no log when OptiGUI replaces a texture). You can leave the group empty, or place the ID of the entity you're right-clicking (F3, and you should see the targeted entity ID on the right). Feel free to experiment.

[]
interaction.texture=minecraft:textures/gui/container/generic_54.png
replacement=whatever.png

Please note that these "fake inventories" are untested, and may not work. Also, I'd prefer you opening a new issue called sth like Server inventory menus.