Class SimplePlacementContext
java.lang.Object
com.ldtteam.structurize.placement.SimplePlacementContext
- All Implemented Interfaces:
IPlacementContext
Simple placement context for non blueprint handling.
-
Constructor Summary
ConstructorsConstructorDescriptionSimplePlacementContext(boolean fancyPlacement, RotationMirror rotationMirror) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this is supposed to be fancy placement (player facing) or builder facing (complete).Get the bluerint from the handler.net.minecraft.core.BlockPosGet the world position this is placed at.Getter for the placement settings.net.minecraft.world.level.block.state.BlockStategetSolidBlockForPos(net.minecraft.core.BlockPos worldPos, Function<net.minecraft.core.BlockPos, @Nullable net.minecraft.world.level.block.state.BlockState> virtualBlocks) Get the solid worldgen block for given pos while using data from handler.
-
Constructor Details
-
SimplePlacementContext
-
-
Method Details
-
getRotationMirror
Description copied from interface:IPlacementContextGetter for the placement settings.- Specified by:
getRotationMirrorin interfaceIPlacementContext- Returns:
- the settings object.
-
fancyPlacement
public boolean fancyPlacement()Description copied from interface:IPlacementContextIf this is supposed to be fancy placement (player facing) or builder facing (complete).- Specified by:
fancyPlacementin interfaceIPlacementContext- Returns:
- true if fancy placement.
-
getSolidBlockForPos
public net.minecraft.world.level.block.state.BlockState getSolidBlockForPos(net.minecraft.core.BlockPos worldPos, Function<net.minecraft.core.BlockPos, @Nullable net.minecraft.world.level.block.state.BlockState> virtualBlocks) Description copied from interface:IPlacementContextGet the solid worldgen block for given pos while using data from handler.- Specified by:
getSolidBlockForPosin interfaceIPlacementContext- Parameters:
worldPos- the world pos.virtualBlocks- blueprint blocks, fnc may return null if virtual block is not available (then use level instead for getting surrounding block states), pos argument is using world coords- Returns:
- the solid worldgen block (classically biome dependent).
-
getCenterPos
public net.minecraft.core.BlockPos getCenterPos()Description copied from interface:IPlacementContextGet the world position this is placed at.- Specified by:
getCenterPosin interfaceIPlacementContext- Returns:
- the position.
-
getBluePrint
Description copied from interface:IPlacementContextGet the bluerint from the handler.- Specified by:
getBluePrintin interfaceIPlacementContext- Returns:
- the blueprint
-