-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
how am I supposed to split these changes
Signed-off-by: Octol1ttle <[email protected]>
- Loading branch information
1 parent
c7f9edc
commit 4b3d257
Showing
19 changed files
with
206 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/ru/octol1ttle/flightassistant/alerts/firework/FireworkCountZeroAlert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package ru.octol1ttle.flightassistant.alerts.firework; | ||
|
||
import net.minecraft.client.font.TextRenderer; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.text.Text; | ||
import org.jetbrains.annotations.NotNull; | ||
import ru.octol1ttle.flightassistant.HudComponent; | ||
import ru.octol1ttle.flightassistant.alerts.AbstractAlert; | ||
import ru.octol1ttle.flightassistant.alerts.AlertSoundData; | ||
import ru.octol1ttle.flightassistant.alerts.ECAMSoundData; | ||
import ru.octol1ttle.flightassistant.computers.FlightComputer; | ||
|
||
import static ru.octol1ttle.flightassistant.HudComponent.CONFIG; | ||
|
||
public class FireworkCountZeroAlert extends AbstractAlert { | ||
|
||
private final FlightComputer computer; | ||
|
||
public FireworkCountZeroAlert(FlightComputer computer) { | ||
this.computer = computer; | ||
} | ||
|
||
@Override | ||
public boolean isTriggered() { | ||
return computer.firework.safeFireworkCount <= 0; | ||
} | ||
|
||
@Override | ||
public @NotNull AlertSoundData getAlertSoundData() { | ||
return ECAMSoundData.MASTER_CAUTION; | ||
} | ||
|
||
@Override | ||
public int renderECAM(TextRenderer textRenderer, DrawContext context, float x, float y, boolean highlight) { | ||
return HudComponent.drawHighlightedFont(textRenderer, context, Text.translatable("alerts.flightassistant.firework.count_zero"), x, y, | ||
CONFIG.alertColor, | ||
highlight && !dismissed); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/ru/octol1ttle/flightassistant/alerts/firework/FireworkLowCountAlert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package ru.octol1ttle.flightassistant.alerts.firework; | ||
|
||
import net.minecraft.client.font.TextRenderer; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.text.Text; | ||
import org.jetbrains.annotations.NotNull; | ||
import ru.octol1ttle.flightassistant.HudComponent; | ||
import ru.octol1ttle.flightassistant.alerts.AbstractAlert; | ||
import ru.octol1ttle.flightassistant.alerts.AlertSoundData; | ||
import ru.octol1ttle.flightassistant.alerts.ECAMSoundData; | ||
import ru.octol1ttle.flightassistant.computers.FlightComputer; | ||
|
||
import static ru.octol1ttle.flightassistant.HudComponent.CONFIG; | ||
|
||
public class FireworkLowCountAlert extends AbstractAlert { | ||
|
||
private final FlightComputer computer; | ||
|
||
public FireworkLowCountAlert(FlightComputer computer) { | ||
this.computer = computer; | ||
} | ||
|
||
@Override | ||
public boolean isTriggered() { | ||
return computer.firework.safeFireworkCount > 0 && computer.firework.safeFireworkCount <= 24; | ||
} | ||
|
||
@Override | ||
public @NotNull AlertSoundData getAlertSoundData() { | ||
return ECAMSoundData.MASTER_CAUTION; | ||
} | ||
|
||
@Override | ||
public int renderECAM(TextRenderer textRenderer, DrawContext context, float x, float y, boolean highlight) { | ||
return HudComponent.drawHighlightedFont(textRenderer, context, Text.translatable("alerts.flightassistant.firework.low_count"), x, y, | ||
CONFIG.amberColor, | ||
!dismissed); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/ru/octol1ttle/flightassistant/alerts/other/ElytraHealthLowAlert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package ru.octol1ttle.flightassistant.alerts.other; | ||
|
||
import net.minecraft.client.font.TextRenderer; | ||
import net.minecraft.client.gui.DrawContext; | ||
import net.minecraft.text.Text; | ||
import org.jetbrains.annotations.NotNull; | ||
import ru.octol1ttle.flightassistant.HudComponent; | ||
import ru.octol1ttle.flightassistant.alerts.AbstractAlert; | ||
import ru.octol1ttle.flightassistant.alerts.AlertSoundData; | ||
import ru.octol1ttle.flightassistant.alerts.ECAMSoundData; | ||
import ru.octol1ttle.flightassistant.computers.FlightComputer; | ||
|
||
public class ElytraHealthLowAlert extends AbstractAlert { | ||
private final FlightComputer computer; | ||
|
||
public ElytraHealthLowAlert(FlightComputer computer) { | ||
this.computer = computer; | ||
} | ||
|
||
@Override | ||
public boolean isTriggered() { | ||
return computer.elytraHealth <= 5.0f; | ||
} | ||
|
||
@Override | ||
public @NotNull AlertSoundData getAlertSoundData() { | ||
return ECAMSoundData.MASTER_WARNING; | ||
} | ||
|
||
@Override | ||
public int renderECAM(TextRenderer textRenderer, DrawContext context, float x, float y, boolean highlight) { | ||
return HudComponent.drawHighlightedFont(textRenderer, context, Text.translatable("alerts.flightassistant.elytra_health_low"), x, y, | ||
HudComponent.CONFIG.alertColor, | ||
!dismissed && highlight); | ||
} | ||
} |
5 changes: 4 additions & 1 deletion
5
...tassistant/alerts/InternalErrorAlert.java → ...tant/alerts/other/InternalErrorAlert.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.