Package com.ldtteam.structurize.client
Class BlueprintHandler
java.lang.Object
com.ldtteam.structurize.client.BlueprintHandler
The Blueprint render handler on the client side.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHow often should cache cleanup happenstatic final intHow long are cache entries valid -
Method Summary
Modifier and TypeMethodDescriptionvoidCleans entries that are older than CACHE_EVICT_TIME.voidClear all entries.voiddraw(BlueprintPreviewData previewData, net.minecraft.core.BlockPos pos, net.minecraftforge.client.event.RenderLevelStageEvent ctx) Draw a blueprint at given pos.voiddrawAtListOfPositions(BlueprintPreviewData previewData, List<net.minecraft.core.BlockPos> points, net.minecraftforge.client.event.RenderLevelStageEvent ctx) Draw a blueprint at list of given pos.static BlueprintHandlerGet the static instance.voidinternalBackportDraw(BlueprintPreviewData previewData, net.minecraft.core.BlockPos pos, net.minecraftforge.client.event.RenderLevelStageEvent ctx) DO NOT USE IN MCOL
-
Field Details
-
CACHE_EXPIRE_SECONDS
public static final int CACHE_EXPIRE_SECONDSHow long are cache entries valid- See Also:
-
CACHE_EXPIRE_CHECK_SECONDS
public static final int CACHE_EXPIRE_CHECK_SECONDSHow often should cache cleanup happen- See Also:
-
-
Method Details
-
getInstance
Get the static instance.- Returns:
- a static instance of this class.
-
draw
public void draw(BlueprintPreviewData previewData, net.minecraft.core.BlockPos pos, net.minecraftforge.client.event.RenderLevelStageEvent ctx) Draw a blueprint at given pos.- Parameters:
previewData- the blueprint and context to draw.pos- position to render atctx- rendering event
-
internalBackportDraw
public void internalBackportDraw(BlueprintPreviewData previewData, net.minecraft.core.BlockPos pos, net.minecraftforge.client.event.RenderLevelStageEvent ctx) DO NOT USE IN MCOL -
cleanCache
public void cleanCache()Cleans entries that are older than CACHE_EVICT_TIME. -
clearCache
public void clearCache()Clear all entries. -
drawAtListOfPositions
public void drawAtListOfPositions(BlueprintPreviewData previewData, List<net.minecraft.core.BlockPos> points, net.minecraftforge.client.event.RenderLevelStageEvent ctx) Draw a blueprint at list of given pos.- Parameters:
previewData- the blueprint and context to draw.points- list of positions to render atctx- rendering event
-