Class AbstractBlockShapeBase
java.lang.Object
net.rodofire.easierworldcreator.shape.block.instanciator.AbstractBlockShapeBase
- Direct Known Subclasses:
AbstractBlockShapePlaceType
Basic Class for Block Shape generation. This includes the basic needs for the shape generation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefine the moment the shape will be placed. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanboolean used to determine if we have to use the custom chunk building provided by the mod or notprotected static final intget the number of availible threads -
Constructor Summary
ConstructorsConstructorDescriptionAbstractBlockShapeBase(@NotNull net.minecraft.world.StructureWorldAccess world, @NotNull net.minecraft.util.math.BlockPos pos, @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment) init the ShapeBase -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPosOffset(net.minecraft.util.math.BlockPos pos1) Adds the given offset to the currentBlockPos.Returns theBlockLayerComparatorassociated with this object.getBlockPosList(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> posSetMap) method to get the list of a set of blockPos based on a Map with chunkPos@NotNull AbstractBlockShapeBase.PlaceMomentRetrieves thePlaceMomentassociated with this object.@NotNull net.minecraft.util.math.BlockPosgetPos()Retrieves theBlockPosassociated with this object.@NotNull net.minecraft.world.StructureWorldAccessgetWorld()Retrieves theStructureWorldAccessassociated with this object.voidsetBlockLayer(BlockLayerComparator blockLayer) Sets theBlockLayerComparatorfor this object.voidsetPlaceMoment(@NotNull AbstractBlockShapeBase.PlaceMoment placeMoment) allow you to set and change the place momentvoidsetPos(@NotNull net.minecraft.util.math.BlockPos pos) Sets theBlockPosfor this object.
-
Field Details
-
multiChunk
protected boolean multiChunkboolean used to determine if we have to use the custom chunk building provided by the mod or not -
THREAD_COUNT
protected static final int THREAD_COUNTget the number of availible threads
-
-
Constructor Details
-
AbstractBlockShapeBase
public AbstractBlockShapeBase(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull AbstractBlockShapeBase.PlaceMoment placeMoment) init the ShapeBase- Parameters:
world- the world of the shapepos- the pos of the shape (usually the center of the structure)placeMoment- define the moment where the shape will be placed
-
-
Method Details
-
getBlockLayer
Returns theBlockLayerComparatorassociated with this object.- Returns:
- the current
BlockLayerComparator
-
setBlockLayer
Sets theBlockLayerComparatorfor this object.- Parameters:
blockLayer- theBlockLayerComparatorto set
-
getPos
@NotNull public @NotNull net.minecraft.util.math.BlockPos getPos()Retrieves theBlockPosassociated with this object.- Returns:
- the current
BlockPos
-
setPos
public void setPos(@NotNull @NotNull net.minecraft.util.math.BlockPos pos) Sets theBlockPosfor this object.- Parameters:
pos- theBlockPosto set- Throws:
NullPointerException- if the providedposis null
-
addPosOffset
public void addPosOffset(net.minecraft.util.math.BlockPos pos1) Adds the given offset to the currentBlockPos.- Parameters:
pos1- theBlockPosto add as an offset
-
getWorld
@NotNull public @NotNull net.minecraft.world.StructureWorldAccess getWorld()Retrieves theStructureWorldAccessassociated with this object.- Returns:
- the current
StructureWorldAccess
-
getPlaceMoment
Retrieves thePlaceMomentassociated with this object.- Returns:
- the current
PlaceMoment
-
setPlaceMoment
allow you to set and change the place moment- Parameters:
placeMoment- the changed parameter
-
getBlockPosList
public List<Set<net.minecraft.util.math.BlockPos>> getBlockPosList(Map<net.minecraft.util.math.ChunkPos, Set<net.minecraft.util.math.BlockPos>> posSetMap) method to get the list of a set of blockPos based on a Map with chunkPos- Parameters:
posSetMap- the map that will be converted- Returns:
- the converted collection
-