Class FlyBySoundHub

java.lang.Object
net.frozenblock.lib.sound.api.FlyBySoundHub

@Environment(CLIENT) public final class FlyBySoundHub extends Object
  • Field Details

    • AUTO_ENTITIES_AND_SOUNDS

      public static final Map<net.minecraft.world.entity.EntityType<?>,FlyBySoundHub.FlyBySound> AUTO_ENTITIES_AND_SOUNDS
      Plays sounds automatically when a certain entity is near.
    • FLYBY_ENTITIES_AND_SOUNDS

      public static final Map<net.minecraft.world.entity.Entity,FlyBySoundHub.FlyBySound> FLYBY_ENTITIES_AND_SOUNDS
      The currently playing flyby sounds.
    • ENTITY_COOLDOWNS

      public static final Map<net.minecraft.world.entity.Entity,Integer> ENTITY_COOLDOWNS
      Cooldowns for playing a sound from the same entity.
  • Constructor Details

    • FlyBySoundHub

      public FlyBySoundHub()
  • Method Details

    • update

      public static void update(@NotNull @NotNull net.minecraft.client.Minecraft client, net.minecraft.world.entity.Entity cameraEntity, boolean autoSounds)
    • hasPassed

      public static boolean hasPassed(@NotNull @NotNull net.minecraft.world.phys.Vec3 cameraPos, double cameraWidth, @NotNull @NotNull net.minecraft.world.phys.Vec3 oldCoord, @NotNull @NotNull net.minecraft.world.phys.Vec3 newCoord)
    • hasPassedCoordinate

      public static boolean hasPassedCoordinate(double cameraCoord, double cameraWidth, double triggerWidth, double oldCoord, double newCoord)
    • addEntity

      public static void addEntity(net.minecraft.world.entity.Entity entity, FlyBySoundHub.FlyBySound flyBySound)
    • addEntityType

      public static void addEntityType(net.minecraft.world.entity.EntityType<?> type, FlyBySoundHub.FlyBySound flyBySound)