-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
- Loading branch information
1 parent
8a7e96f
commit 2c7cb19
Showing
36 changed files
with
507 additions
and
257 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https://services.gradle.org/distributions/gradle-8.1.1-bin.zip | ||
distributionUrl=https://services.gradle.org/distributions/gradle-8.3-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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
31 changes: 31 additions & 0 deletions
31
src/main/java/net/torocraft/flighthud/alerts/AlertSoundData.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,31 @@ | ||
package net.torocraft.flighthud.alerts; | ||
|
||
import net.minecraft.sound.SoundEvent; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class AlertSoundData { | ||
public static final AlertSoundData EMPTY = new AlertSoundData( | ||
null, | ||
Integer.MAX_VALUE, | ||
0.0f, | ||
false | ||
); | ||
public final @Nullable SoundEvent sound; | ||
public final float volume; | ||
public final boolean repeat; | ||
private final int priority; | ||
|
||
public AlertSoundData(@Nullable SoundEvent sound, int priority, float volume, boolean repeat) { | ||
this.sound = sound; | ||
this.priority = priority; | ||
this.volume = volume; | ||
this.repeat = repeat; | ||
} | ||
|
||
/** | ||
* @return the alert's priority, where 0 is highest priority. The priority will go down by 0.5 if the sound is repeating | ||
*/ | ||
public double getPriority() { | ||
return this.priority - (this.repeat ? 0.5 : 0.0); | ||
} | ||
} |
27 changes: 0 additions & 27 deletions
27
src/main/java/net/torocraft/flighthud/alerts/ECAMAlert.java
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
package net.torocraft.flighthud.alerts; | ||
|
||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.font.TextRenderer; | ||
import net.minecraft.client.gui.DrawContext; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public interface IAlert { | ||
boolean isTriggered(); | ||
|
||
void tick(); | ||
@NotNull AlertSoundData getAlertSoundData(); | ||
|
||
int drawText(MinecraftClient mc, DrawContext context, float x, float y, boolean highlight); | ||
void renderCentered(TextRenderer textRenderer, DrawContext context, float width, float y, boolean highlight); | ||
} |
Oops, something went wrong.