Class ConstructionTapeHelper

java.lang.Object
com.minecolonies.core.entity.ai.workers.util.ConstructionTapeHelper

public final class ConstructionTapeHelper extends Object
Helper class to place and remove constructionTapes from the buildings.
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable net.minecraft.core.BlockPos
    firstValidPosition(@NotNull net.minecraft.core.BlockPos target, @NotNull net.minecraft.world.level.Level world, int height)
    Find and return the highest position that is directly above a non-replaceable block.
    static void
    placeConstructionTape(@NotNull IBuilding building)
    Calculates the borders for the workOrderBuildDecoration and sends it to the placement.
    static void
    placeConstructionTape(@NotNull IWorkOrder workOrder, @NotNull net.minecraft.world.level.Level world, IColony colony)
    Calculates the borders for the workOrderBuildDecoration and sends it to the placement.
    static void
    placeConstructionTape(net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> orgCorners, IColony colony)
    Place construction tape.
    static void
    removeConstructionTape(@NotNull IWorkOrder workOrder, @NotNull net.minecraft.world.level.Level world)
    Calculates the borders for the workOrderBuildDecoration and sends it to the removal.
    static void
    removeConstructionTape(net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> orgCorners, @NotNull net.minecraft.world.level.Level world)
    Remove construction tape.
    static void
    removeTapeIfNecessary(@NotNull net.minecraft.world.level.Level world, @NotNull net.minecraft.core.BlockPos block, @NotNull net.minecraft.world.level.block.Block tapeOrTapeCorner, int minHeight, int maxHeight)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • placeConstructionTape

      public static void placeConstructionTape(@NotNull @NotNull IWorkOrder workOrder, @NotNull @NotNull net.minecraft.world.level.Level world, IColony colony)
      Calculates the borders for the workOrderBuildDecoration and sends it to the placement.
      Parameters:
      workOrder - the workOrder.
      world - the world.
    • placeConstructionTape

      public static void placeConstructionTape(@NotNull @NotNull IBuilding building)
      Calculates the borders for the workOrderBuildDecoration and sends it to the placement.
      Parameters:
      building - the building.
    • placeConstructionTape

      public static void placeConstructionTape(net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> orgCorners, IColony colony)
      Place construction tape.
      Parameters:
      orgCorners - the corner positions.
    • firstValidPosition

      @Nullable public static @Nullable net.minecraft.core.BlockPos firstValidPosition(@NotNull @NotNull net.minecraft.core.BlockPos target, @NotNull @NotNull net.minecraft.world.level.Level world, int height)
      Find and return the highest position that is directly above a non-replaceable block.
      Parameters:
      target - the target position for the block
      world - the world.
      Returns:
      The new block position or null if no valid one is found.
    • removeConstructionTape

      public static void removeConstructionTape(@NotNull @NotNull IWorkOrder workOrder, @NotNull @NotNull net.minecraft.world.level.Level world)
      Calculates the borders for the workOrderBuildDecoration and sends it to the removal.
      Parameters:
      workOrder - the workOrder.
      world - the world.
    • removeConstructionTape

      public static void removeConstructionTape(net.minecraft.util.Tuple<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> orgCorners, @NotNull @NotNull net.minecraft.world.level.Level world)
      Remove construction tape.
      Parameters:
      orgCorners - the corner positions.
      world - the world.
    • removeTapeIfNecessary

      public static void removeTapeIfNecessary(@NotNull @NotNull net.minecraft.world.level.Level world, @NotNull @NotNull net.minecraft.core.BlockPos block, @NotNull @NotNull net.minecraft.world.level.block.Block tapeOrTapeCorner, int minHeight, int maxHeight)
      Parameters:
      world - the world.
      block - the block.
      tapeOrTapeCorner - Is the checked block supposed to be ConstructionTape or ConstructionTapeCorner.