Skip to content

Commit

Permalink
Preparing to migrate API things into API
Browse files Browse the repository at this point in the history
  • Loading branch information
floral-qua-floral committed Nov 20, 2024
1 parent cf2f34b commit 241a1cb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 27 deletions.
9 changes: 0 additions & 9 deletions api/src/main/java/com/floralquafloral/PlayerPooper.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<VoiceLine, Map<Identifier, SoundEvent>> VOICE_SOUND_EVENTS = new EnumMap<>(VoiceLine.class);
class VoiceSoundEventInitializer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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()
);
}

Expand Down Expand Up @@ -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));
}

Expand Down

0 comments on commit 241a1cb

Please sign in to comment.