Skip to content

Commit

Permalink
fix crash with fastcraft (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
FalsePattern committed Dec 17, 2024
1 parent 00d9db9 commit 5e984b1
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

package com.falsepattern.falsetweaks.mixin.mixins.client.animfix.fastcraft;

import org.spongepowered.asm.mixin.Dynamic;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
Expand All @@ -32,14 +33,15 @@

//Evil black magic class #4
//Revert fastcraft ASM changes
@SuppressWarnings({"UnresolvedMixinReference", "InvalidInjectorMethodSignature", "MixinAnnotationTarget"})
@Mixin(TextureUtil.class)
@Mixin(value = TextureUtil.class,
priority = 1200)
public abstract class TextureUtilMixin {
@Shadow
private static int func_147943_a(int p_147943_0_, int p_147943_1_, int p_147943_2_, int p_147943_3_, boolean p_147943_4_) {
return 0;
}

@Dynamic
@Redirect(method = "generateMipmapData",
at = @At(value = "INVOKE",
target = "Lfastcraft/HC;p(IIIIZ)I",
Expand All @@ -50,6 +52,7 @@ private static int disableGenerateMipmapDataTweak(int a, int b, int c, int d, bo
return func_147943_a(a, b, c, d, e);
}

@Dynamic
@Redirect(method = "uploadTextureMipmap",
at = @At(value = "INVOKE",
target = "Lfastcraft/HC;i([[IIIIIZZ)Z",
Expand Down

0 comments on commit 5e984b1

Please sign in to comment.