Package com.ldtteam.structurize.client
Class BlueprintRenderer
java.lang.Object
com.ldtteam.structurize.client.BlueprintRenderer
- All Implemented Interfaces:
AutoCloseable
The renderer for blueprint.
Holds all information required to render a blueprint.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAssuming there's no blend function active let's take advantage of OpenGL blend color constant which doesnt require any shader changes at all. -
Method Summary
Modifier and TypeMethodDescriptionstatic BlueprintRendererbuildRendererForBlueprint(Blueprint blueprint) Static factory utility method to handle the extraction of the values from the blueprint.voidclose()voiddraw(BlueprintPreviewData previewData, net.minecraft.core.BlockPos pos, net.neoforged.neoforge.client.event.RenderLevelStageEvent ctx) Draws structure into world.drawUnsafe(BlueprintPreviewData previewData, net.minecraft.core.BlockPos pos, net.neoforged.neoforge.client.event.RenderLevelStageEvent ctx) Draws structure into world.voidupdateBlueprint(BlueprintPreviewData previewData) Updates blueprint reference if it has same hash.
-
Method Details
-
buildRendererForBlueprint
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
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:
closein interfaceAutoCloseable
-