Class ScryingLensOverlayRegistry

java.lang.Object
at.petrak.hexcasting.api.client.ScryingLensOverlayRegistry

public final class ScryingLensOverlayRegistry extends Object
Use this to make things display when the player looks at things with a Scrying Lens.

Client-side only.

  • Constructor Details

    • ScryingLensOverlayRegistry

      public ScryingLensOverlayRegistry()
  • Method Details

    • addDisplayer

      public static void addDisplayer(net.minecraft.world.level.block.Block block, ScryingLensOverlayRegistry.OverlayBuilder displayer)
      Add the block to display things when the player is holding a lens and looking at it.
      Throws:
      IllegalArgumentException - if the block is already registered.
    • addDisplayer

      public static void addDisplayer(net.minecraft.resources.ResourceLocation blockID, ScryingLensOverlayRegistry.OverlayBuilder displayer)
      Add the block to display things when the player is holding a lens and looking at it.
      Throws:
      IllegalArgumentException - if the block ID is already registered.
    • addPredicateDisplayer

      public static void addPredicateDisplayer(ScryingLensOverlayRegistry.OverlayPredicate predicate, ScryingLensOverlayRegistry.OverlayBuilder displayer)
      Display things when the player is holding a lens and looking at some block via a predicate.

      These have a lower priority than the standard ID-based displays, so if an ID and predicate both match, this won't be displayed.

    • getLines

      @NotNull public static @NotNull List<com.mojang.datafixers.util.Pair<net.minecraft.world.item.ItemStack,net.minecraft.network.chat.Component>> getLines(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player observer, net.minecraft.world.level.Level world, net.minecraft.core.Direction hitFace)
      Internal use only.