1111import io .github .axolotlclient .modules .hud .gui .layout .CardinalOrder ;
1212import io .github .axolotlclient .modules .hud .util .DefaultOptions ;
1313import io .github .axolotlclient .modules .hud .util .Rectangle ;
14+ import io .github .axolotlclient .util .Util ;
1415import net .minecraft .entity .effect .StatusEffect ;
1516import net .minecraft .entity .effect .StatusEffectInstance ;
1617import net .minecraft .util .Identifier ;
@@ -35,6 +36,18 @@ public class PotionsHud extends TextHudEntry implements DynamicallyPositionable
3536 private final BooleanOption iconsOnly = new BooleanOption ("axolotlclient.iconsonly" , false );
3637 protected static final Identifier INVENTORY_TEXTURE = new Identifier ("textures/gui/container/inventory.png" );
3738
39+ private final List <StatusEffectInstance > placeholder = Util .make (()-> {
40+ List <StatusEffectInstance > list = new ArrayList <>();
41+ StatusEffectInstance effect = new StatusEffectInstance (StatusEffect .SPEED .id , 9999 );
42+ StatusEffectInstance jump = new StatusEffectInstance (StatusEffect .JUMP_BOOST .id , 99999 );
43+ StatusEffectInstance haste = new StatusEffectInstance (StatusEffect .HASTE .id , Integer .MAX_VALUE );
44+ haste .setPermanent (true );
45+ list .add (effect );
46+ list .add (jump );
47+ list .add (haste );
48+ return list ;
49+ });
50+
3851 public PotionsHud () {
3952 super (50 , 200 , false );
4053 }
@@ -118,14 +131,7 @@ private void renderPotion(StatusEffectInstance effect, int x, int y) {
118131
119132 @ Override
120133 public void renderPlaceholderComponent (float delta ) {
121- StatusEffectInstance effect = new StatusEffectInstance (StatusEffect .SPEED .id , 9999 );
122- StatusEffectInstance jump = new StatusEffectInstance (StatusEffect .JUMP_BOOST .id , 99999 );
123- StatusEffectInstance haste = new StatusEffectInstance (StatusEffect .HASTE .id , 9999999 );
124- List <StatusEffectInstance > list = new ArrayList <>();
125- list .add (effect );
126- list .add (jump );
127- list .add (haste );
128- renderEffects (list );
134+ renderEffects (placeholder );
129135 }
130136
131137 @ Override
0 commit comments