Skip to content

Commit

Permalink
fixed stupid bug thing
Browse files Browse the repository at this point in the history
  • Loading branch information
LudoCrypt committed Dec 30, 2022
1 parent 077555c commit a939a9c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ quilt_loader = "0.17.1"
quilted_fabric_api = "4.0.0-beta.7+0.59.0-1.19.2"
ladysnake_satin = "1.9.0"
terraformersmc_modmenu = "4.0.6"
limlib_base = "7.2.0"
limlib_base = "7.2.2"

midnight_lib = "1.0.0-quilt"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;

import ladysnake.satin.api.managed.ManagedShaderEffect;
import ladysnake.satin.api.managed.ShaderEffectManager;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.ludocrypt.corners.config.CornerConfig;
import net.ludocrypt.limlib.effects.render.post.PostEffect;
import net.ludocrypt.limlib.effects.render.post.holder.ShaderHolder;
import net.minecraft.util.Identifier;

public class StrongPostEffect extends PostEffect {
Expand All @@ -27,10 +26,10 @@ public class StrongPostEffect extends PostEffect {
private final Identifier fallbackShaderName;

@Environment(EnvType.CLIENT)
private final Supplier<ManagedShaderEffect> memoizedShaderEffect = Suppliers.memoize(() -> ShaderEffectManager.getInstance().manage(this.getStrongShaderLocation()));
private final Supplier<ShaderHolder> memoizedShaderEffect = Suppliers.memoize(() -> new ShaderHolder(this.getStrongShaderLocation()));

@Environment(EnvType.CLIENT)
private final Supplier<ManagedShaderEffect> memoizedFallbackShaderEffect = Suppliers.memoize(() -> ShaderEffectManager.getInstance().manage(this.getFallbackShaderLocation()));
private final Supplier<ShaderHolder> memoizedFallbackShaderEffect = Suppliers.memoize(() -> new ShaderHolder(this.getFallbackShaderLocation()));

public StrongPostEffect(Identifier shaderName, Identifier fallbackShaderName) {
this.shaderName = shaderName;
Expand Down Expand Up @@ -67,7 +66,7 @@ public Identifier getFallbackShaderLocation() {

@Override
@Environment(EnvType.CLIENT)
public Supplier<ManagedShaderEffect> getMemoizedShaderEffect() {
public Supplier<ShaderHolder> getMemoizedShaderEffect() {
return CornerConfig.disableStrongShaders ? memoizedFallbackShaderEffect : memoizedShaderEffect;
}

Expand Down
10 changes: 6 additions & 4 deletions src/main/resources/quilt.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@
"id": "minecraft",
"versions": ">=1.19.2"
},
{
"id": "satin",
"versions": "*"
}
"satin",
"limlib_effects",
"limlib_registry",
"limlib_render",
"limlib_world",
"midnightlib"
]
},
"mixin": "corners.mixins.json",
Expand Down

0 comments on commit a939a9c

Please sign in to comment.