updated spirit apple texture
fixed tigers eye shrine broken credit russian lang fixed queen music handler fixed permanent portals not placing corners and not finding exisitng portals fixed keybind conflict sprint conflicts added back cloud sea added verdance music disc
This commit is contained in:
1 parent
6e12612559
commit
682bd39001
18 files changed
+85
-15
No files matched your search
+11
-13
@@ -13,15 +13,18 @@ import net.minecraft.util.RandomSource;
|
||||
import java.util.Comparator;
|
||||
|
||||
public final class QueenMusicHandler {
|
||||
private static final double START_RADIUS = 128.0D;
|
||||
private static final double STOP_RADIUS = 160.0D;
|
||||
private static final int RESTART_COOLDOWN_TICKS = 100;
|
||||
private static final double START_RADIUS = 256.0D;
|
||||
private static final double STOP_RADIUS = 320.0D;
|
||||
private static final float MUSIC_VOLUME_SCALE = 0.7F;
|
||||
private static QueenMusicSound music;
|
||||
private static int cooldownTicks;
|
||||
|
||||
private QueenMusicHandler() {
|
||||
}
|
||||
|
||||
public static boolean isPlaying() {
|
||||
return music != null;
|
||||
}
|
||||
|
||||
public static void tick(Minecraft minecraft, SoundEvent soundEvent) {
|
||||
if (minecraft.level == null || minecraft.player == null || minecraft.isPaused()
|
||||
|| !minecraft.player.isAlive() || minecraft.player.isRemoved()
|
||||
@@ -30,10 +33,6 @@ public final class QueenMusicHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cooldownTicks > 0) {
|
||||
cooldownTicks--;
|
||||
}
|
||||
|
||||
QueenEntity queen = minecraft.level.getEntitiesOfClass(
|
||||
QueenEntity.class,
|
||||
minecraft.player.getBoundingBox().inflate(STOP_RADIUS),
|
||||
@@ -49,10 +48,10 @@ public final class QueenMusicHandler {
|
||||
|
||||
if (music != null && !minecraft.getSoundManager().isActive(music)) {
|
||||
music = null;
|
||||
cooldownTicks = Math.max(cooldownTicks, RESTART_COOLDOWN_TICKS);
|
||||
}
|
||||
|
||||
if (music == null && cooldownTicks <= 0) {
|
||||
if (music == null) {
|
||||
minecraft.getMusicManager().stopPlaying();
|
||||
music = new QueenMusicSound(soundEvent);
|
||||
minecraft.getSoundManager().play(music);
|
||||
}
|
||||
@@ -62,7 +61,7 @@ public final class QueenMusicHandler {
|
||||
float volume = distance <= START_RADIUS
|
||||
? 1.0F
|
||||
: (float) Mth.clamp(1.0D - (distance - START_RADIUS) / (STOP_RADIUS - START_RADIUS), 0.0D, 1.0D);
|
||||
music.setVolume(volume);
|
||||
music.setVolume(volume * MUSIC_VOLUME_SCALE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,13 +74,12 @@ public final class QueenMusicHandler {
|
||||
|
||||
private static void reset(Minecraft minecraft) {
|
||||
stop(minecraft);
|
||||
cooldownTicks = 0;
|
||||
}
|
||||
|
||||
private static final class QueenMusicSound extends AbstractTickableSoundInstance {
|
||||
private QueenMusicSound(SoundEvent soundEvent) {
|
||||
super(soundEvent, SoundSource.MUSIC, RandomSource.create());
|
||||
this.looping = false;
|
||||
this.looping = true;
|
||||
this.delay = 0;
|
||||
this.relative = true;
|
||||
this.attenuation = SoundInstance.Attenuation.NONE;
|
||||
|
||||
+1
@@ -387,6 +387,7 @@ public final class CreativeTabContents {
|
||||
entry("bug_spray", "tools_and_utilities"),
|
||||
entry("music_disc_underside", "tools_and_utilities"),
|
||||
entry("music_disc_the_queen", "tools_and_utilities"),
|
||||
entry("music_disc_verdance", "tools_and_utilities"),
|
||||
entry("diamond_minecart", "tools_and_utilities", "minecart"),
|
||||
entry("bile_bucket", "tools_and_utilities"),
|
||||
entry("ichor_bucket", "tools_and_utilities"),
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.craisinlord.antarchy.mixins.client;
|
||||
|
||||
import com.craisinlord.antarchy.content.client.QueenMusicHandler;
|
||||
import net.minecraft.client.sounds.MusicManager;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(MusicManager.class)
|
||||
public abstract class QueenMusicManagerMixin {
|
||||
@Inject(method = "tick", at = @At("HEAD"), cancellable = true)
|
||||
private void antarchy$pauseVanillaMusicWhileQueenMusicIsPlaying(CallbackInfo ci) {
|
||||
if (QueenMusicHandler.isPlaying()) {
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,6 +137,7 @@
|
||||
"client.EntityLightProbeMixin",
|
||||
"client.CustomBossBarMixin",
|
||||
"client.DimensionMusicMixin",
|
||||
"client.QueenMusicManagerMixin",
|
||||
"client.CavarynSkyMixin",
|
||||
"client.CavarynHordeFogMixin",
|
||||
"client.CavarynHordeLightTextureMixin",
|
||||
|
||||
@@ -389,7 +389,9 @@
|
||||
"item.antarchy.music_disc_underside": "Music Disc",
|
||||
"jukebox_song.antarchy.underside": "docshrekbot - underside",
|
||||
"item.antarchy.music_disc_the_queen": "Music Disc",
|
||||
"jukebox_song.antarchy.the_queen": "The Queen",
|
||||
"jukebox_song.antarchy.the_queen": "Karlljp - The Queen",
|
||||
"item.antarchy.music_disc_verdance": "Music Disc",
|
||||
"jukebox_song.antarchy.verdance": "Hewo - Verdance",
|
||||
"item.antarchy.nightmare_helmet": "Nightmare Helmet",
|
||||
"item.antarchy.nightmare_chestplate": "Nightmare Chestplate",
|
||||
"item.antarchy.nightmare_leggings": "Nightmare Leggings",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "antarchy:item/music_disc_verdance"
|
||||
}
|
||||
}
|
||||
@@ -1073,6 +1073,14 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"music_disc_verdance": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "antarchy:records/verdance",
|
||||
"stream": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"lucid_lullaby": {
|
||||
"sounds": [
|
||||
{
|
||||
|
||||
Binary file not shown.
BIN
Binary file not shown.
|
After Width: | Height: | Size: 513 B |
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"sound_event": "antarchy:music_disc_verdance",
|
||||
"description": {
|
||||
"translate": "jukebox_song.antarchy.verdance"
|
||||
},
|
||||
"length_in_seconds": 135.75,
|
||||
"comparator_output": 13
|
||||
}
|
||||
+5
@@ -170,6 +170,11 @@
|
||||
"name": "minecraft:golden_apple",
|
||||
"weight": 8
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "antarchy:music_disc_verdance",
|
||||
"weight": 2
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "minecraft:book",
|
||||
|
||||
+5
@@ -94,6 +94,11 @@
|
||||
"name": "minecraft:diamond",
|
||||
"weight": 12
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "antarchy:music_disc_verdance",
|
||||
"weight": 2
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "antos:floppy_disk",
|
||||
|
||||
+5
@@ -119,6 +119,11 @@
|
||||
"name": "antarchy:fallen_king_crown",
|
||||
"weight": 2
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "antarchy:music_disc_verdance",
|
||||
"weight": 2
|
||||
},
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "antos:floppy_disk",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"replace": false,
|
||||
"values": [
|
||||
"antarchy:music_disc_underside",
|
||||
"antarchy:music_disc_the_queen"
|
||||
"antarchy:music_disc_the_queen",
|
||||
"antarchy:music_disc_verdance"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user