Class LayerBlueprintIterator
java.lang.Object
com.ldtteam.structurize.placement.AbstractBlueprintIterator
com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
com.minecolonies.core.entity.ai.workers.util.LayerBlueprintIterator
- All Implemented Interfaces:
com.ldtteam.structurize.placement.IBlueprintIterator
public class LayerBlueprintIterator
extends com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
A BlueprintIterator which only iterates over one Y-level (layer) of a blueprint, using the iterator pattern of a different iterator
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIterator
com.ldtteam.structurize.placement.AbstractBlueprintIterator.Result -
Field Summary
Fields inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
delegateFields inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIterator
NULL_POS, prevProgressPos, progressPos, size -
Constructor Summary
ConstructorsConstructorDescriptionLayerBlueprintIterator(String iteratorId, com.ldtteam.structurize.placement.structure.IStructureHandler handler) Construct a new LayerBlueprintIterator, based on the given iterator strategy and using the given handler -
Method Summary
Modifier and TypeMethodDescriptioncom.ldtteam.structurize.util.BlueprintPositionInfogetBluePrintPositionInfo(net.minecraft.core.BlockPos localPos) intgetLayer()Get the current layernet.minecraft.core.BlockPosnet.minecraft.core.BlockPosnet.minecraft.core.BlockPosgetSize()protected com.ldtteam.structurize.placement.structure.IStructureHandlervoidsetLayer(int newLevel) Set the layer of this iterator.voidsetProgressPos(net.minecraft.core.BlockPos localPosition) Methods inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
decrement, hasEntities, includeEntities, increment, isRemoving, reset, setRemovingMethods inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIterator
decrement, increment
-
Constructor Details
-
LayerBlueprintIterator
public LayerBlueprintIterator(String iteratorId, com.ldtteam.structurize.placement.structure.IStructureHandler handler) Construct a new LayerBlueprintIterator, based on the given iterator strategy and using the given handler- Parameters:
iteratorId- The iterator strategy. It accepts any of the names of the registered iterators (e.g. inwardcircle, hilbert, default, ...)handler- The IStructureHandler to be used with this iterator
-
-
Method Details
-
setLayer
public void setLayer(int newLevel) Set the layer of this iterator. It resets the blueprint slice used by the wrapped iterator, and resets it to the beginning- Parameters:
newLevel- the new layer
-
getLayer
public int getLayer()Get the current layer- Returns:
- the current layer
-
setProgressPos
public void setProgressPos(net.minecraft.core.BlockPos localPosition) - Specified by:
setProgressPosin interfacecom.ldtteam.structurize.placement.IBlueprintIterator- Overrides:
setProgressPosin classcom.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
-
getProgressPos
public net.minecraft.core.BlockPos getProgressPos()- Specified by:
getProgressPosin interfacecom.ldtteam.structurize.placement.IBlueprintIterator- Overrides:
getProgressPosin classcom.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
-
getPrevProgressPos
public net.minecraft.core.BlockPos getPrevProgressPos()- Specified by:
getPrevProgressPosin interfacecom.ldtteam.structurize.placement.IBlueprintIterator- Overrides:
getPrevProgressPosin classcom.ldtteam.structurize.placement.AbstractBlueprintIterator
-
getBluePrintPositionInfo
public com.ldtteam.structurize.util.BlueprintPositionInfo getBluePrintPositionInfo(net.minecraft.core.BlockPos localPos) - Specified by:
getBluePrintPositionInfoin interfacecom.ldtteam.structurize.placement.IBlueprintIterator- Overrides:
getBluePrintPositionInfoin classcom.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
-
getSize
public net.minecraft.core.BlockPos getSize()- Specified by:
getSizein interfacecom.ldtteam.structurize.placement.IBlueprintIterator- Overrides:
getSizein classcom.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
-
getStructureHandler
protected com.ldtteam.structurize.placement.structure.IStructureHandler getStructureHandler()- Overrides:
getStructureHandlerin classcom.ldtteam.structurize.placement.AbstractBlueprintIterator
-