diff --git a/api/src/main/java/com/floralquafloral/PlayerPooper.java b/api/src/main/java/com/floralquafloral/PlayerPooper.java deleted file mode 100644 index 87bcd28..0000000 --- a/api/src/main/java/com/floralquafloral/PlayerPooper.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.floralquafloral; - - -import net.minecraft.entity.player.PlayerEntity; - -public interface PlayerPooper { - void stinky(); - PlayerEntity getStinker(); -} diff --git a/mod/src/main/java/com/floralquafloral/mariodata/MarioClientSideData.java b/mod/src/main/java/com/floralquafloral/mariodata/MarioClientSideData.java index 7d6b2f3..33145c7 100644 --- a/mod/src/main/java/com/floralquafloral/mariodata/MarioClientSideData.java +++ b/mod/src/main/java/com/floralquafloral/mariodata/MarioClientSideData.java @@ -34,6 +34,7 @@ PositionedSoundInstance playSoundEvent( PositionedSoundInstance playSoundEvent(SoundEvent event, Entity entity, SoundCategory category, long seed); void playJumpSound(long seed); + void fadeJumpSound(); PositionedSoundInstance voice(VoiceLine line, long seed); float getVoicePitch(); diff --git a/mod/src/main/java/com/floralquafloral/mariodata/MarioClientSideDataImplementation.java b/mod/src/main/java/com/floralquafloral/mariodata/MarioClientSideDataImplementation.java index c685b85..4e12bda 100644 --- a/mod/src/main/java/com/floralquafloral/mariodata/MarioClientSideDataImplementation.java +++ b/mod/src/main/java/com/floralquafloral/mariodata/MarioClientSideDataImplementation.java @@ -93,10 +93,12 @@ default PositionedSoundInstance voice(MarioClientSideData.VoiceLine line, long s return newSoundInstance; } - @Override - default void playJumpSound(long seed) { + @Override default void playJumpSound(long seed) { JumpSoundPlayer.playJumpSfx(this, seed); } + @Override default void fadeJumpSound() { + JumpSoundPlayer.fadeJumpSfx(this); + } EnumMap> VOICE_SOUND_EVENTS = new EnumMap<>(VoiceLine.class); class VoiceSoundEventInitializer { diff --git a/mod/src/main/java/com/floralquafloral/registries/states/action/AirborneActionDefinition.java b/mod/src/main/java/com/floralquafloral/registries/states/action/AirborneActionDefinition.java index 57ab48e..a3052f9 100644 --- a/mod/src/main/java/com/floralquafloral/registries/states/action/AirborneActionDefinition.java +++ b/mod/src/main/java/com/floralquafloral/registries/states/action/AirborneActionDefinition.java @@ -11,8 +11,6 @@ import static com.floralquafloral.stats.StatCategory.*; public abstract class AirborneActionDefinition implements ActionDefinition { - public static boolean jumpCapped; - public abstract static class AerialTransitions { public static ActionTransitionDefinition makeJumpCapTransition(ActionDefinition forAction, double capThreshold) { CharaStat cap = new CharaStat(capThreshold, JUMP_CAP); @@ -23,7 +21,7 @@ public static ActionTransitionDefinition makeJumpCapTransition(ActionDefinition data.setYVel(Math.min(cap.get(data), data.getYVel())); data.getTimers().jumpCapped = true; }, - (data, isSelf, seed) -> JumpSoundPlayer.fadeJumpSfx(data) + (data, isSelf, seed) -> data.fadeJumpSound() ); } @@ -94,19 +92,6 @@ public abstract static class AerialStats { CharaStat useGravity = (ACTION_JUMP_GRAVITY == null || data.getTimers().jumpCapped) ? ACTION_GRAVITY : ACTION_JUMP_GRAVITY; yVel += useGravity.get(data); -// if(data.isClient()) { -// if (!jumpCapped) { -// if (!aboveJumpCap) { -// jumpCapped = true; -// JumpSoundPlayer.fadeJumpSfx(data); -// } else if (!data.getInputs().JUMP.isHeld()) { -// yVel = ACTION_JUMP_CAP.get(data); -// jumpCapped = true; -// JumpSoundPlayer.fadeJumpSfx(data); -// } -// } -// } - data.setYVel(Math.max(terminalVelocity, yVel)); }