Class PlaceRenderer

java.lang.Object
dev.boze.api.render.PlaceRenderer

public class PlaceRenderer extends Object
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.
  • Constructor Details

    • PlaceRenderer

      public PlaceRenderer()
  • Method Details

    • addPlacement

      public static void addPlacement(PlaceRenderer.PlacementRecord record)
      Adds a placement record for rendering
      Parameters:
      record - The placement record to add
    • removePlacement

      public static void removePlacement(PlaceRenderer.PlacementRecord record)
      Removes a placement record
      Parameters:
      record - The placement record to remove
    • clearPlacements

      public static void clearPlacements()
      Clears all placement records
    • getPlacements

      public static Set<PlaceRenderer.PlacementRecord> 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