Package dev.boze.api.render
Class PlaceRenderer
java.lang.Object
dev.boze.api.render.PlaceRenderer
PlaceRenderer handles rendering of block placement visualizations in the world.
Manages a collection of placement records and renders them with optional animations.
Automatically handles shader preparation and world rendering events.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRecord containing placement visualization data -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdds a placement record for renderingstatic voidClears all placement recordsstatic Set<PlaceRenderer.PlacementRecord> Gets the current set of placement recordsstatic net.minecraft.util.math.BlockPosgetRenderPos(net.minecraft.util.hit.BlockHitResult result) Gets the correct render position for a block placement based on the hit result.static voidRemoves a placement record
-
Constructor Details
-
PlaceRenderer
public PlaceRenderer()
-
-
Method Details
-
addPlacement
Adds a placement record for rendering- Parameters:
record- The placement record to add
-
removePlacement
Removes a placement record- Parameters:
record- The placement record to remove
-
clearPlacements
public static void clearPlacements()Clears all placement records -
getPlacements
Gets the current set of placement records- Returns:
- The set of placement records
-
getRenderPos
public static net.minecraft.util.math.BlockPos getRenderPos(net.minecraft.util.hit.BlockHitResult result) Gets the correct render position for a block placement based on the hit result. This method determines whether the placement was an air placement or a normal placement and returns the appropriate position for rendering the placement visualization.- Parameters:
result- The block hit result from the placement operation- Returns:
- The position where the block was actually placed
-