AbsolemJackdaw / PublicGuiAnnouncement

Creative Commons Zero v1.0 Universal
8 stars 8 forks source link

GUI has a texture bug when showing some mods #4

Closed sepsol closed 4 years ago

sepsol commented 4 years ago

This is how it looks like:

image

I saw this bugged texture when using:

I tried these and these were ok:

I see NO GUI at all when I'm in:

CONTEXT I guess these from the paperdoll model on the top left. Here's my specs:

AbsolemJackdaw commented 4 years ago

Can you provide a log please ?

AbsolemJackdaw commented 4 years ago

My current guess is : the texture path provided for worldhandler has some typos i it. Same for better advancements

Create mod is currently not known to be supported. Akitors cart inventory may not use a vanilla base for their cart gui's , so this is the same case as for Create.

Im surprised about inventory and crafting table. Did you test this with a friend or all alone ? Its hard to get a correct angle alone sometimes. Again, a log may help me explain these.

sepsol commented 4 years ago

I reported the issue to the devs of AskitorCarts and Create mod as well. Here's a log from my latest run which I triggered all of the GUIs: latest.log

I will update you if I get a chance to test this on my server. Also, when should I send degug.log and when should I send latest.log on GitHub?! Everybody just says send the log, nobody ever specifies which one! I often get confused.

AbsolemJackdaw commented 4 years ago

Both are good depending on what the the dev needs to see

AbsolemJackdaw commented 4 years ago

I think im gonna need the dev log Btw your latest log tells us about a network error (packets) from something called TrashSlot Network. Its not my mod and shouldnt have too much issues on the game but the author may want to fix the spam and his code.

sepsol commented 4 years ago

Thank you for letting me know! I'll report that :) Here's the debug.log for that same session.

AbsolemJackdaw commented 4 years ago

Well none of those helped. Theyre filled with spam from unknown packet handling of some sort. Ill try to find the issue out myself, by manually searching the code

sepsol commented 4 years ago

Sorry for that! Thanks.

AbsolemJackdaw commented 4 years ago

Found the issue

"publicguiannouncement:textures/gui/modsupport/worldhander/world_handler.png", 

image I'm missing and L in wordhandler in the json file.

You can easily quickfix this yourself by editing the json file that is in the jar under assets/publicguiannouncement/load_screens ...

AbsolemJackdaw commented 4 years ago

same issue for the better advancements one. the path provided by the json is incorrect.

I'mg going to solve these issues and PR them to the corresponding mods. It should not be up to me i.m.o to add the support, but from the mods themself

sepsol commented 4 years ago

owwww, i see it feels good to fix a code with your own hands :D

sepsol commented 4 years ago

Thanks for the help! I'm gonna test this fix and keep you posted soon.

AbsolemJackdaw commented 4 years ago

cant verify anything bad for inventory or crafting table. they should show up

sepsol commented 4 years ago

I can't see the issue here though 🤔

image

AbsolemJackdaw commented 4 years ago

image

AbsolemJackdaw commented 4 years ago

its in the gui folder, not the betteradvancements folder its nonexistent

sepsol commented 4 years ago

oh, yeah. I just remembered something! I'm using Aternos.org for hosting my Minecraft server. Aternos only allows to load mods that are currently on CureForge website. Will this fix work if I launch the server with the version you uploaded on curseforge and only use the fix on my clients? 🤔 I want to make sure that inventory and crafting table GUIs are working fine.

AbsolemJackdaw commented 4 years ago

no, the fix would only apply localy, and probably only on a single player worlds.

you can launch the server to test the crafting and player inventory though

AbsolemJackdaw commented 4 years ago

it wouldn't hurt launching with a modified jar tohugh if its only the json chances are big they will work on your end but not on anyone elses, if they dont have the fix

sepsol commented 4 years ago

So here's the update:

Also I really liked that it doesn't show the creative inventory and it always defaults to showing the survival inventory :D Overall thank you very much for your time!

AbsolemJackdaw commented 4 years ago

yeah indeed, it has been omited in code. that is very intentional

@Override
    public void render(AbstractClientPlayerEntity entityIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {

        if (Minecraft.getInstance().currentScreen instanceof InventoryScreen || Minecraft.getInstance().currentScreen instanceof CreativeScreen)
            return;
sepsol commented 4 years ago

That was genius! So if I want to not announce a GUI, all I should do is to remove their respective .json file?

AbsolemJackdaw commented 4 years ago

or entry yes. the vanilla compat json has all of the entries listed.

but ive been thinking a bit with how you did the experiment : The Mod loads in the jsons client side , and makes a list for the client player with all the entries. so it is possible you have a screen for mod X, with texture attached, and send the information to another player that does not have mod X compatibility json, and would just see a blank texture (black / pink) but that shouldn't be any nuissance really. just something that passed my mind.

sepsol commented 4 years ago

I used the fixed mod on one device and original mod on another device. One of them rendered those two GUIs black and pink and the other rendered them correctly.

One question: Can I only change the location of the corresponding .json files for GUIs that I don't want? I am trying to not touch the code whenever possible.

Also did you mean this .json file in the comment above?

image

AbsolemJackdaw commented 4 years ago

yes, it is that json file.

I didn't get your question all that well, but here's the deal : wether a screen can show up or not is determinedb y the sole presence of an entry in the json file.

what is a screen entry ? its this :

 {
            "class" : "net.geforcemods.securitycraft.gui.GuiCameraMonitor", 
            "texture" : "securitycraft:textures/gui/container/blank.png"
        }

the mod just reads trough all of them, and if any is found matching the current open screen, it will display the texture specified below. So you can either remove the entry ( bracket, class line, texture line, next bracket and the comma) or replace the texture with a complete blank file. (you can put a 255x255 empty image in assets/publicguiannouncement/gui , call it empty.png, and have the "texture" line reference that image. it wont show up for you, and if someone else opens it, you wont be able to see it either. if you want an entire server to not see the screen, they need to share the same json file.

I'd recommend https://www.curseforge.com/minecraft/mc-mods/resource-loader RESOURCE LOADER to pre load a resource for end users using a modpack, effectively replacing the same named file in a directory without people having to add a resourcepack manually. (got this mod suggested by a modpack maker)

sepsol commented 4 years ago

I think I got it, thanks a lot. I couldn't find any WorldHandler entried in the mensioned .json file though. Also sadly the Resource Loader mod isn't available for 1.14.4 (Forge) and it doesn't seem to get updates anymore. Otherwise I am really interested in making a modpack for my own server. It's really helpful to get newbies into the game.

I am taking your time so much, sorry for that. But I feel like I'm connected to a programming source :D three more questions and that's it:

AbsolemJackdaw commented 4 years ago

how about you come annoy me on my discord with all those questions :D

https://discord.gg/8MEdFZh

AbsolemJackdaw commented 4 years ago

this issue has been resolved on discord with SepSol