MehVahdJukaar / polytone

Other
31 stars 2 forks source link

Grass/Foliage colormaps are black, water colormap does not load on Sodium. #14

Open ShadowMorde opened 5 months ago

ShadowMorde commented 5 months ago

I know Sodium just updated to 0.5.6 and that there is no testing between Sodium and Polytone as a result.

My resource pack worked fine under 1.13.0 for 1.20.4 (maybe 1.13.2 for older versions fixed this? I'm not sure.) but now when using Sodium the following would happen: Light colormap still works (thats good) Grass(grass_block, short_grass, etc.) and Foliage (oak_leaves, jungle_leaves, etc.) show up as pure black. Water colormap does not load whatsoever, using the default colormap instead.

image image

Example images provided for the issue.

image

Colormap folder in question. Turning off Sodium fixed the issue which leads me to believe the issue is isolated to Sodium/Polytone interracting but I believe my resource pack could be more efficient here. Just trying to create a port for Polytone atm.

MehVahdJukaar commented 5 months ago

Hm sodium only recently added support for custom colour resolvers. I might still have some code on that made them not load when sodium is on

MehVahdJukaar commented 5 months ago

Try new version

MehVahdJukaar commented 5 months ago

Btw what's the content of those .properties?

ShadowMorde commented 5 months ago

image The "blocks=" declaration does not seem to work, forcing me to copy/paste multiple files at least on the older version that I used.

image It's more or less the same with Polytone 1.14.1 and Sodium 0.5.7 on 1.20.1. The only difference being the tall grass rendering properly but that's because my resource pack is updated for 1.20.4 and during that period, grass.png was renamed to short_grass.png.

Do you mind compiling 1.14.x for 1.20.4? All of my mods iirc do not go older than 1.20.2 due to changes to the game. That's also the version I filed the bug report for.

I can just also send the resource pack in question unless you have a pack that you test on.

MehVahdJukaar commented 5 months ago

I see. I need to add a backward compat layer for those. Polytone does not use that but has ta own more powerful system as exolained on the wiki. I'll update 1.20.4

MehVahdJukaar commented 5 months ago

Is this still happening?

ShadowMorde commented 5 months ago

Sorry I just woke up. This is still happening as of 1.14.0 on 1.20.4 yes. I tested it again just now.

MehVahdJukaar commented 5 months ago

should be fixed

MehVahdJukaar commented 5 months ago

btw note that you can have a single colormap target multiple block using the "targets" field.

ShadowMorde commented 5 months ago

Grass color IS working with Sodium however water/flowing water color is not working. I also noticed this when I used MultiMC to open the game up instead of the vanilla launcher. image

MehVahdJukaar commented 5 months ago

they added that warning? and you are using latest sodium? I did test all this and its all working fine for me. with newest polytone and old sodium the game will actually crash when trying to use custom colormaps. Grass color is a vanilla thing so it will work eevn without any of the mods. Send me the relevant part of your pack pls if it still doesnt work for you so i can test

MehVahdJukaar commented 5 months ago

also i dont get the point of that warning. their latest update was supposed to fix that very issue, talked with author about this too and it does work for me so thats clearly resolved. It would make sense to be other way around

ShadowMorde commented 5 months ago

image image image image Here's what I tried, all in which didn't work. Here's my pack in question.. Shadow NB Polytone Patch.zip

ShadowMorde commented 5 months ago

By the way it's supposed to set the water color to pure white (except for swamp, it's a different color denoted by the stray pixel in the water.png file) because it's a patch for my resource pack that uses the old water. The old water with the new water colormap does not look good to say the least, it's too deep of a blue to the point there's hardly a texture even.

MehVahdJukaar commented 5 months ago

ok here is some of the things that i found. the watercolor is broken. There must be something from sodium that conflicts with it and i got to figure out why. Changing it via biomes colors work fine tho. Your jsons were incorrect as they had a misplaced comma so they werent read. Use a editor with json syntax highlight. As for the color.properties both files do work but note that those had many values which were repeated and only 1 will be applied

MehVahdJukaar commented 5 months ago

as for fog and skycolor those arent supported via colormaps yet. you can still change them via biome effects, thats how vanilla does it. Will be in future versions tho

MehVahdJukaar commented 5 months ago

the other colormaps you had worked fine as far as i could see

MehVahdJukaar commented 5 months ago

yes sodium is skipping fabric api fluid render handlers

MehVahdJukaar commented 5 months ago

here's that related issue btw. https://github.com/CaffeineMC/sodium-fabric/issues/2298

water colormaps work for all fluids BUT water. Just use biome effects for now

ShadowMorde commented 5 months ago

Sorry for the late reply, I was doing a boot defrag on my harddrive that took 4 hours but I got biome effects to work thanks for letting me know where I went wrong with that. Idk if you can change grass/foliage color within biome effects, it looks like you should be able to but I can't seem to do that, not that it matters because I already have grass color and whatnot working regardless. I do have other issues to report that I've noticed, I'll open them up soon but not until I'm done updating this resource pack (which idk how long that would take).

MehVahdJukaar commented 5 months ago

You can change grass colour too. This will only have effect if you don't override the grass block colour with a custom colormap

ShadowMorde commented 5 months ago

This crashlog I get when loading/creating a new world at all seems to be linked with water color. I get the same results with/without any resource packs. Using Fabric Loader 0.15.6, Sodium 0.5.8 (0.5.7 failed to work too), Fabric API 0.95.4 (0.95.3 also failed), and both PrismLauncher and Microsoft Minecraft Launcher. This also meant I tried the OpenJDK 17 from the website you get it from and the one that came bundled with the Minecraft Launcher. Also worth to mention, I had just reinstalled Windows 11 to 23H2.

[00:04:09] [Datafixer Bootstrap/INFO]: 198 Datafixer optimizations took 221 milliseconds [00:04:12] [Render thread/INFO]: Loaded 7 recipes [00:04:12] [Render thread/INFO]: Loaded 1271 advancements [00:04:12] [Render thread/WARN]: Failed to load level data or datapacks, can't proceed with server load java.util.concurrent.ExecutionException: java.lang.NullPointerException: Cannot invoke "net.mehvahdjukaar.polytone.biome.BiomeEffectModifier.waterColor()" because "original" is null at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) ~[?:?] at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) ~[?:?] at net.minecraft.class_7196.method_45694(class_7196.java:182) ~[client-intermediary.jar:?] at net.minecraft.class_7196.method_54610(class_7196.java:136) ~[client-intermediary.jar:?] at net.minecraft.class_7196.method_54614(class_7196.java:330) ~[client-intermediary.jar:?] at net.minecraft.class_7196.method_54615(class_7196.java:308) ~[client-intermediary.jar:?] at net.minecraft.class_7196.method_54618(class_7196.java:242) ~[client-intermediary.jar:?] at net.minecraft.class_528$class_4272.method_20164(class_528.java:440) ~[client-intermediary.jar:?] at net.minecraft.class_528$class_4272.method_25402(class_528.java:417) ~[client-intermediary.jar:?] at net.minecraft.class_350.method_25402(class_350.java:279) ~[client-intermediary.jar:?] at net.minecraft.class_4069.method_25402(class_4069.java:38) ~[client-intermediary.jar:?] at net.minecraft.class_312.method_1611(class_312.java:99) ~[client-intermediary.jar:?] at net.minecraft.class_437.method_25412(class_437.java:414) ~[client-intermediary.jar:?] at net.minecraft.class_312.method_1601(class_312.java:99) ~[client-intermediary.jar:?] at net.minecraft.class_312.method_22686(class_312.java:180) ~[client-intermediary.jar:?] at net.minecraft.class_1255.execute(class_1255.java:102) ~[client-intermediary.jar:?] at net.minecraft.class_312.method_22684(class_312.java:180) ~[client-intermediary.jar:?] at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43) ~[lwjgl-glfw-3.3.2.jar:?] at org.lwjgl.system.JNI.invokeV(Native Method) ~[lwjgl-3.3.2.jar:?] at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3438) ~[lwjgl-glfw-3.3.2.jar:?] at com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:202) ~[client-intermediary.jar:?] at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:220) ~[client-intermediary.jar:?] at net.minecraft.class_1041.method_15998(class_1041.java:287) ~[client-intermediary.jar:?] at net.minecraft.class_310.method_1523(class_310.java:1349) ~[client-intermediary.jar:?] at net.minecraft.class_310.method_1514(class_310.java:888) ~[client-intermediary.jar:?] at net.minecraft.client.main.Main.main(Main.java:265) ~[minecraft-1.20.4-client.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.6.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.6.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.6.jar:?] at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87) ~[NewLaunch.jar:?] at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130) ~[NewLaunch.jar:?] at org.prismlauncher.EntryPoint.main(EntryPoint.java:70) ~[NewLaunch.jar:?] Caused by: java.lang.NullPointerException: Cannot invoke "net.mehvahdjukaar.polytone.biome.BiomeEffectModifier.waterColor()" because "original" is null at net.mehvahdjukaar.polytone.biome.BiomeEffectsManager.addAllWaterColors(BiomeEffectsManager.java:119) ~[polytone-1.20.4-1.14.5-fabric.jar:?] at net.mehvahdjukaar.polytone.biome.BiomeEffectsManager.doApply(BiomeEffectsManager.java:74) ~[polytone-1.20.4-1.14.5-fabric.jar:?] at net.mehvahdjukaar.polytone.Polytone.onTagsReceived(Polytone.java:65) ~[polytone-1.20.4-1.14.5-fabric.jar:?] at net.mehvahdjukaar.polytone.fabric.PolytoneFabric.lambda$onInitializeClient$0(PolytoneFabric.java:21) ~[polytone-1.20.4-1.14.5-fabric.jar:?] at net.fabricmc.fabric.api.event.lifecycle.v1.CommonLifecycleEvents.lambda$static$0(CommonLifecycleEvents.java:33) ~[fabric-lifecycle-events-v1-2.2.3+eabbae364f-a9a67aeb5a6be7d3.jar:?] at net.minecraft.class_5350.handler$bbh000$fabric-lifecycle-events-v1$hookRefresh(class_5350.java:533) ~[client-intermediary.jar:?] at net.minecraft.class_5350.method_40421(class_5350.java:82) ~[client-intermediary.jar:?] at net.minecraft.class_7237.method_42097(class_7237.java:57) ~[client-intermediary.jar:?] at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) ~[?:?] at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?] at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?] at net.minecraft.class_1255.method_18857(class_1255.java:139) ~[client-intermediary.jar:?] at net.minecraft.class_310.method_18857(class_310.java:12772) ~[client-intermediary.jar:?] at net.minecraft.class_7196.method_45694(class_7196.java:181) ~[client-intermediary.jar:?] ... 29 more

ramennbowls commented 2 months ago

@MehVahdJukaar I'm experiencing the same issue with colormaps on grass and leaves, when using Polytone with Embeddium on Forge 1.18.2. Are you able to implement Embeddium support? Let me know, cheers!

2024-05-02_06 38 49