generated from LabyMod/addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from RappyLabyAddons/feat/sounds
Implement sound system
- Loading branch information
Showing
23 changed files
with
484 additions
and
63 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
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
27 changes: 27 additions & 0 deletions
27
core/src/main/java/com/rappytv/toolwarn/config/subconfig/TbwSoundSubConfig.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,27 @@ | ||
package com.rappytv.toolwarn.config.subconfig; | ||
|
||
import com.rappytv.toolwarn.util.WarnSound; | ||
import net.labymod.api.client.gui.screen.widget.widgets.input.dropdown.DropdownWidget.DropdownSetting; | ||
import net.labymod.api.configuration.loader.Config; | ||
import net.labymod.api.configuration.loader.annotation.ParentSwitch; | ||
import net.labymod.api.configuration.loader.property.ConfigProperty; | ||
|
||
public class TbwSoundSubConfig extends Config { | ||
|
||
@ParentSwitch | ||
private final ConfigProperty<Boolean> enabled = new ConfigProperty<>(true); | ||
@DropdownSetting | ||
private final ConfigProperty<WarnSound> warnSound = new ConfigProperty<>(WarnSound.PLING); | ||
@DropdownSetting | ||
private final ConfigProperty<WarnSound> lastHitSound = new ConfigProperty<>(WarnSound.ANVIL_USE); | ||
|
||
public ConfigProperty<Boolean> enabled() { | ||
return enabled; | ||
} | ||
public ConfigProperty<WarnSound> warnSound() { | ||
return warnSound; | ||
} | ||
public ConfigProperty<WarnSound> lastHitSound() { | ||
return lastHitSound; | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
core/src/main/java/com/rappytv/toolwarn/util/ITbwSounds.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,14 @@ | ||
package com.rappytv.toolwarn.util; | ||
|
||
import net.labymod.api.client.resources.ResourceLocation; | ||
import net.labymod.api.reference.annotation.Referenceable; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@Referenceable | ||
public interface ITbwSounds { | ||
|
||
@NotNull ResourceLocation getPlingSound(); | ||
@NotNull ResourceLocation getLevelUpSound(); | ||
@NotNull ResourceLocation getGlassBreakSound(); | ||
@NotNull ResourceLocation getAnvilUseSound(); | ||
} |
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.