Skip to content

Commit 9cc03b7

Browse files
committed
Mark ReachHuds & ComboHuds as broken
1 parent 6318ac0 commit 9cc03b7

File tree

26 files changed

+107
-38
lines changed

26 files changed

+107
-38
lines changed

1.16_combat-6/src/main/java/io/github/axolotlclient/mixin/LivingEntityMixin.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ public LivingEntityMixin(EntityType<?> type, World world) {
5050
// 2 ticks or so? Defintely not perfect tho
5151
if (source.getAttacker() instanceof PlayerEntity) {
5252
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
53-
comboHud.onEntityDamage(this);
53+
if (comboHud != null) {
54+
comboHud.onEntityDamage(this);
55+
}
5456
}
5557
}
5658
}

1.16_combat-6/src/main/java/io/github/axolotlclient/mixin/PlayerEntityMixin.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ protected PlayerEntityMixin(EntityType<? extends LivingEntity> entityType, World
5858
}
5959

6060
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
61-
comboHud.onEntityAttack(entity);
61+
if (comboHud != null) {
62+
comboHud.onEntityAttack(entity);
63+
}
6264
}
6365
}
6466

@@ -83,7 +85,9 @@ protected PlayerEntityMixin(EntityType<? extends LivingEntity> entityType, World
8385

8486
if (source.getAttacker() instanceof PlayerEntity) {
8587
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
86-
comboHud.onEntityDamage(this);
88+
if (comboHud != null) {
89+
comboHud.onEntityDamage(this);
90+
}
8791
}
8892
}
8993

1.16_combat-6/src/main/java/io/github/axolotlclient/modules/hud/HudManager.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,20 +111,23 @@ public void init() {
111111
add(new ItemUpdateHud());
112112
add(new PackDisplayHud());
113113
add(new IRLTimeHud());
114-
add(new ReachHud());
114+
add(new ReachHud()); // TODO this is broken
115115
add(new HotbarHUD());
116116
add(new MemoryHud());
117117
add(new PlayerCountHud());
118118
add(new CompassHud());
119119
add(new TPSHud());
120-
add(new ComboHud());
120+
add(new ComboHud()); // TODO this is broken
121121
add(new PlayerHud());
122122
add(new MouseMovementHud());
123123
add(new DebugCountersHud());
124124
add(new DayCounterHud());
125125
entries.put(BedwarsMod.getInstance().getUpgradesOverlay().getId(), BedwarsMod.getInstance().getUpgradesOverlay());
126126
entries.put(BedwarsMod.getInstance().getResourceOverlay().getId(), BedwarsMod.getInstance().getResourceOverlay());
127127

128+
((ReachHud) get(ReachHud.ID)).getEnabled().setForceOff(true, "feature.broken");
129+
((ComboHud) get(ComboHud.ID)).getEnabled().setForceOff(true, "feature.broken");
130+
128131
entries.values().forEach(HudEntry::init);
129132

130133
refreshAllBounds();

1.20/src/main/java/io/github/axolotlclient/mixin/LivingEntityMixin.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ public LivingEntityMixin(EntityType<?> type, World world) {
5050
// 2 ticks or so? Defintely not perfect tho
5151
if (source.getAttacker() instanceof PlayerEntity) {
5252
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
53-
comboHud.onEntityDamage(this);
53+
if (comboHud != null) {
54+
comboHud.onEntityDamage(this);
55+
}
5456
}
5557
}
5658
}

1.20/src/main/java/io/github/axolotlclient/mixin/PlayerEntityMixin.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ private PlayerEntityMixin(EntityType<? extends LivingEntity> entityType, World w
5757
}
5858

5959
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
60-
comboHud.onEntityAttack(entity);
60+
if (comboHud != null) {
61+
comboHud.onEntityAttack(entity);
62+
}
6163
}
6264
}
6365

@@ -82,7 +84,9 @@ private PlayerEntityMixin(EntityType<? extends LivingEntity> entityType, World w
8284

8385
if (source.getAttacker() instanceof PlayerEntity) {
8486
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
85-
comboHud.onEntityDamage(this);
87+
if (comboHud != null) {
88+
comboHud.onEntityDamage(this);
89+
}
8690
}
8791
}
8892
}

1.20/src/main/java/io/github/axolotlclient/modules/hud/HudManager.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,23 @@ public void init() {
104104
add(new ItemUpdateHud());
105105
add(new PackDisplayHud());
106106
add(new IRLTimeHud());
107-
add(new ReachHud());
107+
add(new ReachHud()); // TODO this is broken
108108
add(new HotbarHUD());
109109
add(new MemoryHud());
110110
add(new PlayerCountHud());
111111
add(new CompassHud());
112112
add(new TPSHud());
113-
add(new ComboHud());
113+
add(new ComboHud()); // TODO this is broken
114114
add(new PlayerHud());
115115
add(new MouseMovementHud());
116116
add(new DebugCountersHud());
117117
add(new DayCounterHud());
118118
entries.put(BedwarsMod.getInstance().getUpgradesOverlay().getId(), BedwarsMod.getInstance().getUpgradesOverlay());
119119
entries.put(BedwarsMod.getInstance().getResourceOverlay().getId(), BedwarsMod.getInstance().getResourceOverlay());
120120

121+
((ReachHud) get(ReachHud.ID)).getEnabled().setForceOff(true, "feature.broken");
122+
((ComboHud) get(ComboHud.ID)).getEnabled().setForceOff(true, "feature.broken");
123+
121124
entries.values().forEach(HudEntry::init);
122125

123126
refreshAllBounds();

1.21.4/src/main/java/io/github/axolotlclient/mixin/PlayerEntityMixin.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ protected PlayerEntityMixin(EntityType<? extends LivingEntity> entityType, Level
5555
}
5656

5757
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
58-
comboHud.onEntityAttack(entity);
58+
if (comboHud != null) {
59+
comboHud.onEntityAttack(entity);
60+
}
5961
}
6062
}
6163

1.21/src/main/java/io/github/axolotlclient/mixin/LivingEntityMixin.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ public LivingEntityMixin(EntityType<?> type, World world) {
5050
// 2 ticks or so? Defintely not perfect tho
5151
if (source.getAttacker() instanceof PlayerEntity) {
5252
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
53-
comboHud.onEntityDamage(this);
53+
if (comboHud != null) {
54+
comboHud.onEntityDamage(this);
55+
}
5456
}
5557
}
5658
}

1.21/src/main/java/io/github/axolotlclient/mixin/PlayerEntityMixin.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ private PlayerEntityMixin(EntityType<? extends LivingEntity> entityType, World w
5757
}
5858

5959
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
60-
comboHud.onEntityAttack(entity);
60+
if (comboHud != null) {
61+
comboHud.onEntityAttack(entity);
62+
}
6163
}
6264
}
6365

@@ -82,7 +84,9 @@ private PlayerEntityMixin(EntityType<? extends LivingEntity> entityType, World w
8284

8385
if (source.getAttacker() instanceof PlayerEntity) {
8486
ComboHud comboHud = (ComboHud) HudManager.getInstance().get(ComboHud.ID);
85-
comboHud.onEntityDamage(this);
87+
if (comboHud != null) {
88+
comboHud.onEntityDamage(this);
89+
}
8690
}
8791
}
8892
}

1.21/src/main/java/io/github/axolotlclient/modules/hud/HudManager.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,22 @@ public void init() {
104104
add(new ItemUpdateHud());
105105
add(new PackDisplayHud());
106106
add(new IRLTimeHud());
107-
add(new ReachHud());
107+
add(new ReachHud()); // TODO this is broken
108108
add(new HotbarHUD());
109109
add(new MemoryHud());
110110
add(new PlayerCountHud());
111111
add(new CompassHud());
112112
add(new TPSHud());
113-
add(new ComboHud());
113+
add(new ComboHud()); // TODO this is broken
114114
add(new PlayerHud());
115115
add(new MouseMovementHud());
116116
add(new DebugCountersHud());
117117
entries.put(BedwarsMod.getInstance().getUpgradesOverlay().getId(), BedwarsMod.getInstance().getUpgradesOverlay());
118118
entries.put(BedwarsMod.getInstance().getResourceOverlay().getId(), BedwarsMod.getInstance().getResourceOverlay());
119119

120+
((ReachHud) get(ReachHud.ID)).getEnabled().setForceOff(true, "feature.broken");
121+
((ComboHud) get(ComboHud.ID)).getEnabled().setForceOff(true, "feature.broken");
122+
120123
entries.values().forEach(HudEntry::init);
121124

122125
refreshAllBounds();

0 commit comments

Comments
 (0)