Package team.lodestar.lodestone.handlers
Class GhostBlockHandler
java.lang.Object
team.lodestar.lodestone.handlers.GhostBlockHandler
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic team.lodestar.lodestone.handlers.GhostBlockHandler.GhostBlockEntryaddGhost(Object slot, GhostBlockRenderer renderer, GhostBlockOptions options, int timeLeft) Places a ghost block into the world, only one ghost can exist in a given slotstatic voidrenderGhosts(com.mojang.blaze3d.vertex.PoseStack poseStack) static void
-
Field Details
-
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 occupyrenderer- A renderer that handles how the ghost block is rendered into the worldoptions- A modular config parameter for the ghost block, allows you to define things like scale, transparency, and even render typetimeLeft- 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()
-