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

    delegate

    Fields inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIterator

    NULL_POS, prevProgressPos, progressPos, size
  • Constructor Summary

    Constructors
    Constructor
    Description
    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
  • Method Summary

    Modifier and Type
    Method
    Description
    com.ldtteam.structurize.util.BlueprintPositionInfo
    getBluePrintPositionInfo(net.minecraft.core.BlockPos localPos)
     
    int
    Get the current layer
    net.minecraft.core.BlockPos
     
    net.minecraft.core.BlockPos
     
    net.minecraft.core.BlockPos
     
    protected com.ldtteam.structurize.placement.structure.IStructureHandler
     
    void
    setLayer(int newLevel)
    Set the layer of this iterator.
    void
    setProgressPos(net.minecraft.core.BlockPos localPosition)
     

    Methods inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper

    decrement, hasEntities, includeEntities, increment, isRemoving, reset, setRemoving

    Methods inherited from class com.ldtteam.structurize.placement.AbstractBlueprintIterator

    decrement, increment

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      setProgressPos in interface com.ldtteam.structurize.placement.IBlueprintIterator
      Overrides:
      setProgressPos in class com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
    • getProgressPos

      public net.minecraft.core.BlockPos getProgressPos()
      Specified by:
      getProgressPos in interface com.ldtteam.structurize.placement.IBlueprintIterator
      Overrides:
      getProgressPos in class com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
    • getPrevProgressPos

      public net.minecraft.core.BlockPos getPrevProgressPos()
      Specified by:
      getPrevProgressPos in interface com.ldtteam.structurize.placement.IBlueprintIterator
      Overrides:
      getPrevProgressPos in class com.ldtteam.structurize.placement.AbstractBlueprintIterator
    • getBluePrintPositionInfo

      public com.ldtteam.structurize.util.BlueprintPositionInfo getBluePrintPositionInfo(net.minecraft.core.BlockPos localPos)
      Specified by:
      getBluePrintPositionInfo in interface com.ldtteam.structurize.placement.IBlueprintIterator
      Overrides:
      getBluePrintPositionInfo in class com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
    • getSize

      public net.minecraft.core.BlockPos getSize()
      Specified by:
      getSize in interface com.ldtteam.structurize.placement.IBlueprintIterator
      Overrides:
      getSize in class com.ldtteam.structurize.placement.AbstractBlueprintIteratorWrapper
    • getStructureHandler

      protected com.ldtteam.structurize.placement.structure.IStructureHandler getStructureHandler()
      Overrides:
      getStructureHandler in class com.ldtteam.structurize.placement.AbstractBlueprintIterator