Class AbstractBlueprintIteratorWrapper
java.lang.Object
com.ldtteam.structurize.placement.AbstractBlueprintIterator
com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
- All Implemented Interfaces:
IBlueprintIterator
This is a base class for BlueprintIterators based on a delegated iterator
All methods are implemented through the delegate. Subclasses are expected to override one or multiple of the methods, to override logic
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIterator
AbstractBlueprintIterator.Result -
Field Summary
FieldsFields inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIterator
NULL_POS, prevProgressPos, progressPos, size -
Constructor Summary
ConstructorsConstructorDescriptionInitialise the blueprint iterator with a delegate blueprint iterator -
Method Summary
Modifier and TypeMethodDescriptionDecrement method, create in implementation.getBluePrintPositionInfo(net.minecraft.core.BlockPos localPos) Get the blueprint info from the position.net.minecraft.core.BlockPosGet the progress pos of the iterator.net.minecraft.core.BlockPosgetSize()Get the size of the blueprint which is iterated overbooleanRetrieve whether the iterator is taking entities into account as wellvoidSet the iterator to include entities.Increment method, create in implementation.booleanRetrieve whether we're removing blocks at the momentvoidreset()Reset the progressPos.voidsetProgressPos(net.minecraft.core.BlockPos localPosition) Change the current progressPos.voidSet the iterator to removal mode.Methods inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIterator
decrement, getPrevProgressPos, getStructureHandler, increment
-
Field Details
-
delegate
The delegate blueprint iterator
-
-
Constructor Details
-
AbstractBlueprintIteratorWrapper
Initialise the blueprint iterator with a delegate blueprint iterator- Parameters:
delegate- The delegate blueprint iterator
-
-
Method Details
-
increment
Description copied from interface:IBlueprintIteratorIncrement method, create in implementation.- Returns:
- increment the structure position (y++).
-
decrement
Description copied from interface:IBlueprintIteratorDecrement method, create in implementation.- Returns:
- decrement the structure position (y--).
-
setProgressPos
public void setProgressPos(net.minecraft.core.BlockPos localPosition) Description copied from interface:IBlueprintIteratorChange the current progressPos. Used when loading progress.- Specified by:
setProgressPosin interfaceIBlueprintIterator- Overrides:
setProgressPosin classAbstractBlueprintIterator- Parameters:
localPosition- new progressPos.
-
getBluePrintPositionInfo
Description copied from interface:IBlueprintIteratorGet the blueprint info from the position.- Specified by:
getBluePrintPositionInfoin interfaceIBlueprintIterator- Overrides:
getBluePrintPositionInfoin classAbstractBlueprintIterator- Parameters:
localPos- the position.- Returns:
- the info object.
-
includeEntities
public void includeEntities()Description copied from interface:IBlueprintIteratorSet the iterator to include entities.- Specified by:
includeEntitiesin interfaceIBlueprintIterator- Overrides:
includeEntitiesin classAbstractBlueprintIterator
-
hasEntities
public boolean hasEntities()Description copied from interface:IBlueprintIteratorRetrieve whether the iterator is taking entities into account as well- Specified by:
hasEntitiesin interfaceIBlueprintIterator- Overrides:
hasEntitiesin classAbstractBlueprintIterator- Returns:
- whether the iterator is taking entities into account as well
-
setRemoving
public void setRemoving()Description copied from interface:IBlueprintIteratorSet the iterator to removal mode.- Specified by:
setRemovingin interfaceIBlueprintIterator- Overrides:
setRemovingin classAbstractBlueprintIterator
-
isRemoving
public boolean isRemoving()Description copied from interface:IBlueprintIteratorRetrieve whether we're removing blocks at the moment- Specified by:
isRemovingin interfaceIBlueprintIterator- Overrides:
isRemovingin classAbstractBlueprintIterator- Returns:
- Whether we are removing blocks at the moment
-
reset
public void reset()Description copied from interface:IBlueprintIteratorReset the progressPos.- Specified by:
resetin interfaceIBlueprintIterator- Overrides:
resetin classAbstractBlueprintIterator
-
getSize
public net.minecraft.core.BlockPos getSize()Description copied from interface:IBlueprintIteratorGet the size of the blueprint which is iterated over- Specified by:
getSizein interfaceIBlueprintIterator- Overrides:
getSizein classAbstractBlueprintIterator- Returns:
- the size
-
getProgressPos
public net.minecraft.core.BlockPos getProgressPos()Description copied from interface:IBlueprintIteratorGet the progress pos of the iterator.- Specified by:
getProgressPosin interfaceIBlueprintIterator- Overrides:
getProgressPosin classAbstractBlueprintIterator- Returns:
- the progress pos.
-