Dystortedd / Ult-Effects

The ultimate effects pack. Text, Font, and much much more !
MIT License
17 stars 1 forks source link

Unable to use Ult-Effects on Minecraft 1.21.1 (RuntimeException: could not reload shaders) #3

Closed TheArmagan closed 1 month ago

TheArmagan commented 1 month ago

Getting these errors:

[11:41:54] [Render thread/WARN]: Shader rendertype_entity_translucent_emissive could not find sampler named Sampler2 in the specified shader program.
[11:41:54] [Render thread/INFO]: Caught error loading resourcepacks, removing all selected resourcepacks
java.util.concurrent.CompletionException: java.lang.RuntimeException: could not reload shaders
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
    at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:722) ~[?:?]
    at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
    at net.minecraft.class_4014.method_18365(class_4014.java:69) ~[client-intermediary.jar:?]
    at net.minecraft.class_1255.method_18859(class_1255.java:162) ~[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:136) ~[client-intermediary.jar:?]
    at net.minecraft.class_1255.method_5383(class_1255.java:121) ~[client-intermediary.jar:?]
    at net.minecraft.class_310.method_1523(class_310.java:1240) [client-intermediary.jar:?]
    at net.minecraft.class_310.method_1514(class_310.java:882) [client-intermediary.jar:?]
    at net.minecraft.client.main.Main.main(Main.java:256) [client-intermediary.jar:?]
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480) [fabric-loader-0.16.5.jar:?]
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.16.5.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.16.5.jar:?]
Caused by: java.lang.RuntimeException: could not reload shaders
    at net.minecraft.class_757.method_34538(class_757.java:537) [client-intermediary.jar:?]
    at net.minecraft.class_757$1.method_45777(class_757.java:419) ~[client-intermediary.jar:?]
    at net.minecraft.class_757$1.method_18788(class_757.java:396) ~[client-intermediary.jar:?]
    at net.minecraft.class_4080.method_18790(class_4080.java:13) ~[client-intermediary.jar:?]
    at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
    ... 12 more
Caused by: net.minecraft.class_2973: Invalid shaders/core/rendertype_text.json: Couldn't compile vertex program (file/ultresourcepack, rendertype_text) : 3(12) : error C1101: ambiguous overloaded function reference "floor(ivec3)"
    (0) : vec3 floor(vec3)
    (0) : gp5 cp50 fp50 vp50 gp50 cpf fpf vpf gpf superp vec3 floor(superp vec3)
    (0) : gp5 gp4 cp50 fp50 vp50 gp50 cpf fpf vpf gpf lowp vec3 floor(lowp vec3)
    (0) : gp5 gp4 cp50 fp50 vp50 gp50 cpf fpf vpf gpf mediump vec3 floor(mediump vec3)
    (0) : gp5 gp4 cp50 fp50 vp50 gp50 cpf fpf vpf gpf vec3 floor(vec3)
    at net.minecraft.class_2973.method_12856(class_2973.java:48) ~[client-intermediary.jar:?]
    at net.minecraft.class_5944.<init>(class_5944.java:172) ~[client-intermediary.jar:?]
    at net.minecraft.class_757.method_34538(class_757.java:516) ~[client-intermediary.jar:?]
    at net.minecraft.class_757$1.method_45777(class_757.java:419) ~[client-intermediary.jar:?]
    at net.minecraft.class_757$1.method_18788(class_757.java:396) ~[client-intermediary.jar:?]
    at net.minecraft.class_4080.method_18790(class_4080.java:13) ~[client-intermediary.jar:?]
    at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
    ... 12 more
Caused by: java.io.IOException: Couldn't compile vertex program (file/ultresourcepack, rendertype_text) : 3(12) : error C1101: ambiguous overloaded function reference "floor(ivec3)"
    (0) : vec3 floor(vec3)
    (0) : gp5 cp50 fp50 vp50 gp50 cpf fpf vpf gpf superp vec3 floor(superp vec3)
    (0) : gp5 gp4 cp50 fp50 vp50 gp50 cpf fpf vpf gpf lowp vec3 floor(lowp vec3)
    (0) : gp5 gp4 cp50 fp50 vp50 gp50 cpf fpf vpf gpf mediump vec3 floor(mediump vec3)
    (0) : gp5 gp4 cp50 fp50 vp50 gp50 cpf fpf vpf gpf vec3 floor(vec3)
    at net.minecraft.class_281.method_34416(class_281.java:69) ~[client-intermediary.jar:?]
    at net.minecraft.class_281.method_1283(class_281.java:51) ~[client-intermediary.jar:?]
    at net.minecraft.class_5944.method_34579(class_5944.java:210) ~[client-intermediary.jar:?]
    at net.minecraft.class_5944.<init>(class_5944.java:157) ~[client-intermediary.jar:?]
    at net.minecraft.class_757.method_34538(class_757.java:516) ~[client-intermediary.jar:?]
    at net.minecraft.class_757$1.method_45777(class_757.java:419) ~[client-intermediary.jar:?]
    at net.minecraft.class_757$1.method_18788(class_757.java:396) ~[client-intermediary.jar:?]
    at net.minecraft.class_4080.method_18790(class_4080.java:13) ~[client-intermediary.jar:?]
    at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
    ... 12 more
[11:41:54] [Render thread/INFO]: Reloading ResourceManager: vanilla

I hope these logs helps! I really want to use Ult-Effects on my 1.21.1 server.

TheArmagan commented 1 month ago

I just fixed myself by changing the ivec3 to vec3 minecraft/shaders/include/effects/text.glsl on line 1 and line 7 idk if its the correct way to fix but its works

TheArmagan commented 1 month ago

But there is another problem when I call /title @a actionbar {"text":"HelloWorld","color":"#ff00ff","font":"ult_effects:top_left_anchor"} text is aligned from the center image

Dystortedd commented 1 month ago

For the anchors, you need to use spaces or amberwat's space font to push things, I just anchor the text at one place, I cannot place it correctly. As for your first issue, it works really well when using your fix, no issues were detected on my end. I'll make a hotfix relatively soon.