Class BlueprintRenderer

java.lang.Object
com.ldtteam.structurize.client.BlueprintRenderer
All Implemented Interfaces:
AutoCloseable

public class BlueprintRenderer extends Object implements AutoCloseable
The renderer for blueprint. Holds all information required to render a blueprint.
  • Method Details

    • buildRendererForBlueprint

      public static BlueprintRenderer buildRendererForBlueprint(Blueprint blueprint)
      Static factory utility method to handle the extraction of the values from the blueprint.
      Parameters:
      blueprint - The blueprint to create an instance for.
      Returns:
      The renderer.
    • updateBlueprint

      public void updateBlueprint(BlueprintPreviewData previewData)
      Updates blueprint reference if it has same hash.
      Parameters:
      previewData - blueprint and context from active structure
    • draw

      public void draw(BlueprintPreviewData previewData, net.minecraft.core.BlockPos pos, net.neoforged.neoforge.client.event.RenderLevelStageEvent ctx)
      Draws structure into world.
    • drawUnsafe

      public Map<Object,Exception> drawUnsafe(BlueprintPreviewData previewData, net.minecraft.core.BlockPos pos, net.neoforged.neoforge.client.event.RenderLevelStageEvent ctx)
      Draws structure into world.
      Returns:
      suppressed exceptions
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable