|
3 | 3 | import org.spongepowered.asm.mixin.Mixin; |
4 | 4 |
|
5 | 5 | //#if MC >=1.21.5 |
6 | | -@Mixin(net.minecraft.client.render.RenderPhase.LineWidth.class) |
| 6 | +import net.minecraft.client.render.RenderPhase; |
| 7 | +import org.spongepowered.asm.mixin.injection.At; |
| 8 | +import org.spongepowered.asm.mixin.injection.Inject; |
| 9 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; |
| 10 | +import java.util.OptionalDouble; |
7 | 11 | //#else |
8 | | -//$$ @Mixin(net.minecraft.client.Minecraft.class) |
| 12 | +//$$ import net.minecraft.client.Minecraft; |
| 13 | +//#endif |
| 14 | + |
| 15 | +//#if MC >=1.21.5 |
| 16 | +@Mixin(RenderPhase.LineWidth.class) |
| 17 | +//#else |
| 18 | +//$$ @Mixin(Minecraft.class) |
9 | 19 | //#endif |
10 | 20 | public abstract class MixinLineStateShard { |
11 | 21 | //#if MC >=1.21.5 |
12 | | - @org.spongepowered.asm.mixin.injection.Inject(method = "method_23553", at = @org.spongepowered.asm.mixin.injection.At("HEAD"), cancellable = true) |
13 | | - private static void polyhitbox$overrideLineWidth(java.util.OptionalDouble optionalDouble, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) { |
| 22 | + @Inject(method = "method_23553", at = @At("HEAD"), cancellable = true) |
| 23 | + private static void polyhitbox$overrideLineWidth(OptionalDouble optionalDouble, CallbackInfo ci) { |
14 | 24 | ci.cancel(); |
15 | 25 | } |
16 | 26 |
|
17 | | - @org.spongepowered.asm.mixin.injection.Inject(method = "method_23554", at = @org.spongepowered.asm.mixin.injection.At("HEAD"), cancellable = true) |
18 | | - private static void polyhitbox$overrideLineWidth2(java.util.OptionalDouble optionalDouble, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) { |
| 27 | + @Inject(method = "method_23554", at = @At("HEAD"), cancellable = true) |
| 28 | + private static void polyhitbox$overrideLineWidth2(OptionalDouble optionalDouble, CallbackInfo ci) { |
19 | 29 | ci.cancel(); |
20 | 30 | } |
21 | 31 | //#endif |
|
0 commit comments