|
26 | 26 | import net.minecraft.entity.player.EntityPlayer; |
27 | 27 | import net.minecraft.scoreboard.ScoreObjective; |
28 | 28 | import net.minecraft.util.math.MathHelper; |
29 | | -import org.spongepowered.asm.lib.Opcodes; |
30 | 29 | import org.spongepowered.asm.mixin.Mixin; |
31 | 30 | import org.spongepowered.asm.mixin.injection.At; |
32 | 31 | import org.spongepowered.asm.mixin.injection.Inject; |
33 | 32 | import org.spongepowered.asm.mixin.injection.Redirect; |
34 | 33 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; |
35 | 34 |
|
| 35 | +import static org.spongepowered.asm.lib.Opcodes.GETFIELD; |
| 36 | + |
36 | 37 | /** |
37 | 38 | * @author Brady |
38 | 39 | * @since 5/24/2018 10:53 AM |
@@ -116,14 +117,14 @@ private void renderAttackIndicator(GuiIngame gui, int x, int y, int textureX, in |
116 | 117 | gui.drawTexturedModalRect(x, y, textureX, textureY, width, height); |
117 | 118 | } |
118 | 119 |
|
119 | | - @Redirect(method = "renderAttackIndicator", at = @At(value = "FIELD", target = "net/minecraft/client/settings/GameSettings.attackIndicator:I", opcode = Opcodes.GETFIELD)) |
| 120 | + @Redirect(method = "renderAttackIndicator", at = @At(value = "FIELD", target = "net/minecraft/client/settings/GameSettings.attackIndicator:I", opcode = GETFIELD)) |
120 | 121 | private int renderAttackIndicator$attackIndicator(GameSettings gameSettings) { |
121 | 122 | HudOverlayEvent event = new HudOverlayEvent(HudOverlayEvent.Type.ATTACK_INDICATOR); |
122 | 123 | ClientAPI.EVENT_BUS.post(event); |
123 | 124 | return event.isCancelled() ? 0 : gameSettings.attackIndicator; |
124 | 125 | } |
125 | 126 |
|
126 | | - @Redirect(method = "renderHotbar", at = @At(value = "FIELD", target = "net/minecraft/client/settings/GameSettings.attackIndicator:I", opcode = Opcodes.GETFIELD)) |
| 127 | + @Redirect(method = "renderHotbar", at = @At(value = "FIELD", target = "net/minecraft/client/settings/GameSettings.attackIndicator:I", opcode = GETFIELD)) |
127 | 128 | private int renderHotbar$attackIndicator(GameSettings gameSettings) { |
128 | 129 | HudOverlayEvent event = new HudOverlayEvent(HudOverlayEvent.Type.ATTACK_INDICATOR); |
129 | 130 | ClientAPI.EVENT_BUS.post(event); |
|
0 commit comments