Class PreviewRuntimeService

java.lang.Object
dev.deepcore.challenge.preview.PreviewRuntimeService

public final class PreviewRuntimeService extends Object
Provides runtime helpers for preview scaling, transforms, and sounds.
  • Constructor Details

    • PreviewRuntimeService

      public PreviewRuntimeService(org.bukkit.plugin.java.JavaPlugin plugin)
      Creates a preview runtime service.
      Parameters:
      plugin - plugin instance used for config-backed runtime behavior
  • Method Details

    • getPreviewBlockScale

      public double getPreviewBlockScale()
      Returns the configured preview block scale within safe clamped bounds.
      Returns:
      clamped preview block scale factor
    • getPreviewSpinUpdateTicks

      public int getPreviewSpinUpdateTicks()
      Returns the configured preview spin interpolation tick interval.
      Returns:
      clamped interpolation tick interval used for preview spin updates
    • playPreviewConstructionTickSounds

      public void playPreviewConstructionTickSounds(org.bukkit.Location previewAnchor, int spawnedThisTick)
      Plays per-tick construction sounds for nearby active lobby viewers.
      Parameters:
      previewAnchor - anchor location used for proximity filtering and sound playback
      spawnedThisTick - number of blocks spawned this tick
    • playPreviewConstructionCompleteSound

      public void playPreviewConstructionCompleteSound(org.bukkit.Location previewAnchor)
      Plays completion sounds when the preview construction finishes.
      Parameters:
      previewAnchor - anchor location used for proximity filtering and sound playback
    • playPreviewDestroyStartSound

      public void playPreviewDestroyStartSound(org.bukkit.Location previewAnchor)
      Plays the destroy-start sound cue for nearby lobby viewers.
      Parameters:
      previewAnchor - anchor location used for proximity filtering and sound playback
    • applyPreviewTransform

      public void applyPreviewTransform(org.bukkit.entity.BlockDisplay display, double blockScale, float rotationRadians, double yOffset)
      Applies scale, rotation, and vertical offset transform to a preview display.
      Parameters:
      display - block display entity to transform
      blockScale - base block scale value
      rotationRadians - yaw rotation in radians
      yOffset - vertical offset from anchor origin