Interface ISpectacleBlock


public interface ISpectacleBlock
Implement this interface on your block entities so that players wearing Spectacles can see them more easily.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    isHighlighted(net.minecraft.world.entity.player.Player player)
    Determines whether a highlight should be drawn around this block.
    default boolean
    usesFlashingHighlight(net.minecraft.world.entity.player.Player player)
    Selects which highlight style the renderer draws for this block.
  • Method Details

    • isHighlighted

      default boolean isHighlighted(net.minecraft.world.entity.player.Player player)
      Determines whether a highlight should be drawn around this block.
      Parameters:
      player - The player wearing spectacles.
      Returns:
      true if a highlighted bounding box should be drawn around this block, false otherwise.
    • usesFlashingHighlight

      default boolean usesFlashingHighlight(net.minecraft.world.entity.player.Player player)
      Selects which highlight style the renderer draws for this block. The default is a steady rainbow outline (pollinated leaves, assembled multiblock anchors); returning true draws a pulsing white outline instead, used to flag work-in-progress markers such as the parts of an unformed multiblock.
      Parameters:
      player - The player wearing spectacles.
      Returns:
      true for the flashing-white outline, false for the steady rainbow outline.