Skip to content

Commit

Permalink
fix overflow animations compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed May 29, 2022
1 parent 538dc94 commit d41c2ff
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ org.gradle.jvmargs=-Xmx2G

# Define project properties.
mod_name=REDACTION
mod_ver=1.3.3
mod_ver=1.3.4

loom.platform = forge
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
package net.wyvest.redaction.mixin;

import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.resources.model.IBakedModel;
import net.wyvest.redaction.config.RedactionConfig;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Pseudo;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Pseudo
@Mixin(targets = "cc.woverflow.overflowanimations.GlintHandler", remap = false)
public class OverflowGlintHandlerMixin {
@Inject(method = "renderGlint", at = @At("RETURN"))
private static void afterRenderEffect(IBakedModel model, CallbackInfo ci) {
@Inject(method = "renderGlint", at = @At("TAIL"))
private static void afterRenderEffect(RenderItem instance, IBakedModel model, CallbackInfoReturnable<Boolean> ci) {
if (RedactionConfig.INSTANCE.getDisableHandLighting()) {
RenderHelper.disableStandardItemLighting();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.wyvest.redaction.mixin;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.resources.model.IBakedModel;
Expand All @@ -18,7 +19,7 @@ private void beforeRenderEffect(IBakedModel model, CallbackInfo ci) {
}
}

@Inject(method = "renderEffect", at = @At("RETURN"))
@Inject(method = "renderEffect", at = @At("TAIL"))
private void afterRenderEffect(IBakedModel model, CallbackInfo ci) {
if (RedactionConfig.INSTANCE.getDisableHandLighting()) {
RenderHelper.disableStandardItemLighting();
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/net/wyvest/redaction/Redaction.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object Redaction {


const val NAME = "REDACTION"
const val VERSION = "1.3.3"
const val VERSION = "1.3.4"
const val ID = "redaction"
val modDir = File(File("./W-OVERFLOW"), NAME)
val isPatcher by lazy {
Expand Down

0 comments on commit d41c2ff

Please sign in to comment.