Total Complexity | 1 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package de.pewpewproject.lasertag.mixin.gui; |
||
15 | @Mixin(InGameHud.class) |
||
16 | public class InGameHudMixin { |
||
17 | |||
18 | /** |
||
19 | * Hack to show team list even if world is in singleplayer. |
||
20 | * Set scoreboardObjective2 to non-null value so that second hand of OR-operator is always false. Therefore |
||
21 | * Only !this.client.options.playerListKey.isPressed() matters |
||
22 | * |
||
23 | * @param original |
||
24 | * @return |
||
25 | */ |
||
26 | @ModifyVariable(method = "render(Lnet/minecraft/client/util/math/MatrixStack;F)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/option/KeyBinding;isPressed()Z"), ordinal = 1) |
||
27 | private ScoreboardObjective modifyScoreboardObjective2(ScoreboardObjective original) { |
||
28 | return new ScoreboardObjective(null, null, null, Text.literal("<dummy>"), null); |
||
29 | } |
||
31 |