mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:01:32 +01:00
Update FontRendererMixin.java
This commit is contained in:
parent
7a8fd25ba8
commit
ef97091bb1
@ -9,7 +9,9 @@ import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@Mixin(value = FontRenderer.class, priority = 1100)
|
||||
public abstract class FontRendererMixin implements FontRendererExt {
|
||||
@ -46,4 +48,14 @@ public abstract class FontRendererMixin implements FontRendererExt {
|
||||
protected abstract void resetStyles();
|
||||
|
||||
@Shadow @Final private ResourceLocation locationFontTexture;
|
||||
|
||||
@Inject(method = "drawString(Ljava/lang/String;FFIZ)I",
|
||||
at = @At(
|
||||
value = "INVOKE", target = "Lnet/minecraft/client/gui/FontRenderer;renderString(Ljava/lang/String;FFIZ)I",
|
||||
ordinal = 0, shift = At.Shift.AFTER
|
||||
)
|
||||
)
|
||||
private void silent$resetStyle(CallbackInfoReturnable<Integer> ci) {
|
||||
this.resetStyles();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user