Class ConstructionTapeHelper
java.lang.Object
com.minecolonies.core.entity.ai.workers.util.ConstructionTapeHelper
Helper class to place and remove constructionTapes from the buildings.
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable net.minecraft.core.BlockPosfirstValidPosition(@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 voidplaceConstructionTape(@NotNull IBuilding building) Calculates the borders for the workOrderBuildDecoration and sends it to the placement.static voidplaceConstructionTape(@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 voidplaceConstructionTape(net.minecraft.util.Tuple<net.minecraft.core.BlockPos, net.minecraft.core.BlockPos> orgCorners, IColony colony) Place construction tape.static voidremoveConstructionTape(@NotNull IWorkOrder workOrder, @NotNull net.minecraft.world.level.Level world) Calculates the borders for the workOrderBuildDecoration and sends it to the removal.static voidremoveConstructionTape(net.minecraft.util.Tuple<net.minecraft.core.BlockPos, net.minecraft.core.BlockPos> orgCorners, @NotNull net.minecraft.world.level.Level world) Remove construction tape.static voidremoveTapeIfNecessary(@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)
-
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
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 blockworld- 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.
-