Class GhostBlockHandler

java.lang.Object
team.lodestar.lodestone.handlers.GhostBlockHandler

public class GhostBlockHandler extends Object
Ghost blocks are a means of displaying holograms or previews of blockstates in the world. To add a ghostblock, simply call addGhost(Object, GhostBlockRenderer, GhostBlockOptions, int) Ghost blocks naturally decay after the given time limit
  • Field Details

    • GHOSTS

      public static final Map<Object,team.lodestar.lodestone.handlers.GhostBlockHandler.GhostBlockEntry> GHOSTS
  • Constructor Details

    • GhostBlockHandler

      public GhostBlockHandler()
  • Method Details

    • addGhost

      public static team.lodestar.lodestone.handlers.GhostBlockHandler.GhostBlockEntry addGhost(Object slot, GhostBlockRenderer renderer, GhostBlockOptions options, int timeLeft)
      Places a ghost block into the world, only one ghost can exist in a given slot
      Parameters:
      slot - A key for the ghost to occupy
      renderer - A renderer that handles how the ghost block is rendered into the world
      options - A modular config parameter for the ghost block, allows you to define things like scale, transparency, and even render type
      timeLeft - Determines How long will the ghost block remain in the world
      Returns:
      The ghost block placed into the world
    • renderGhosts

      public static void renderGhosts(com.mojang.blaze3d.vertex.PoseStack poseStack)
    • tickGhosts

      public static void tickGhosts()