|
1 | | -package dev.emi.emi.mixin.early.minecraft.client; |
2 | | - |
3 | | -import com.rewindmc.retroemi.REMIMixinHooks; |
4 | | -import net.minecraft.client.gui.FontRenderer; |
5 | | -import org.objectweb.asm.Opcodes; |
6 | | -import org.spongepowered.asm.mixin.Mixin; |
7 | | -import org.spongepowered.asm.mixin.Shadow; |
8 | | -import org.spongepowered.asm.mixin.injection.At; |
9 | | -import org.spongepowered.asm.mixin.injection.Inject; |
10 | | -import org.spongepowered.asm.mixin.injection.ModifyVariable; |
11 | | -import org.spongepowered.asm.mixin.injection.Slice; |
12 | | -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; |
13 | | - |
14 | | -@Mixin(value = FontRenderer.class, priority = 2000) |
15 | | -public abstract class FontRendererMixin { |
16 | | - |
17 | | - @Shadow protected byte[] glyphWidth; |
18 | | - |
19 | | -// @ModifyVariable( |
20 | | -// method = "renderStringAtPos", |
21 | | -// at = @At( |
22 | | -// value = "JUMP", |
23 | | -// opcode = Opcodes.GOTO, |
24 | | -// ordinal = 0 |
25 | | -// ), |
26 | | -// ordinal = 0 // i |
27 | | -// ) |
28 | | -// private int customFontColor(int original, String text, boolean shadow) { |
29 | | -// return REMIMixinHooks.applyCustomFormatCodes((FontRenderer) (Object) this, text, shadow, original); |
| 1 | +//package dev.emi.emi.mixin.early.minecraft.client; |
| 2 | +// |
| 3 | +//import com.rewindmc.retroemi.REMIMixinHooks; |
| 4 | +//import net.minecraft.client.gui.FontRenderer; |
| 5 | +//import org.objectweb.asm.Opcodes; |
| 6 | +//import org.spongepowered.asm.mixin.Mixin; |
| 7 | +//import org.spongepowered.asm.mixin.Shadow; |
| 8 | +//import org.spongepowered.asm.mixin.injection.At; |
| 9 | +//import org.spongepowered.asm.mixin.injection.Inject; |
| 10 | +//import org.spongepowered.asm.mixin.injection.ModifyVariable; |
| 11 | +//import org.spongepowered.asm.mixin.injection.Slice; |
| 12 | +//import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; |
| 13 | +// |
| 14 | +//@Mixin(value = FontRenderer.class, priority = 2000) |
| 15 | +//public abstract class FontRendererMixin { |
| 16 | +// |
| 17 | +// @Shadow protected byte[] glyphWidth; |
| 18 | +// |
| 19 | +//// @ModifyVariable( |
| 20 | +//// method = "renderStringAtPos", |
| 21 | +//// at = @At( |
| 22 | +//// value = "JUMP", |
| 23 | +//// opcode = Opcodes.GOTO, |
| 24 | +//// ordinal = 0 |
| 25 | +//// ), |
| 26 | +//// ordinal = 0 // i |
| 27 | +//// ) |
| 28 | +//// private int customFontColor(int original, String text, boolean shadow) { |
| 29 | +//// return REMIMixinHooks.applyCustomFormatCodes((FontRenderer) (Object) this, text, shadow, original); |
| 30 | +//// } |
| 31 | +// |
| 32 | +// // fix vanilla bug |
| 33 | +// @Inject(method = "readGlyphSizes", at = @At(value = "INVOKE", target = "Ljava/io/InputStream;read([B)I", shift = At.Shift.AFTER)) |
| 34 | +// private void fixBrackets(CallbackInfo ci) { |
| 35 | +// this.glyphWidth['('] = 127; |
30 | 36 | // } |
31 | | - |
32 | | - // fix vanilla bug |
33 | | - @Inject(method = "readGlyphSizes", at = @At(value = "INVOKE", target = "Ljava/io/InputStream;read([B)I", shift = At.Shift.AFTER)) |
34 | | - private void fixBrackets(CallbackInfo ci) { |
35 | | - this.glyphWidth['('] = 127; |
36 | | - } |
37 | | -} |
| 37 | +//} |
0 commit comments