generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d25679
commit 6dc2c4f
Showing
2 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/main/java/me/mixces/animatium/mixins/renderer/MixinShaderProgram.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package me.mixces.animatium.mixins.renderer; | ||
|
||
import com.llamalad7.mixinextras.injector.wrapoperation.Operation; | ||
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; | ||
import me.mixces.animatium.config.AnimatiumConfig; | ||
import net.minecraft.client.gl.ShaderProgram; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
|
||
@Mixin(ShaderProgram.class) | ||
public abstract class MixinShaderProgram { | ||
@WrapOperation(method = "initializeUniforms", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;getShaderLineWidth()F")) | ||
private float animatium$legacyBlockOutlineRendering$lineWidth(Operation<Float> original) { | ||
if (AnimatiumConfig.getInstance().getLegacyBlockOutlineRendering()) { | ||
return 2.0F; | ||
} else { | ||
return original.call(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters