Class MultiblockHelper
java.lang.Object
com.portingdeadmods.portingdeadlibs.utils.MultiblockHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanform(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level) static booleanform(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level, @Nullable net.minecraft.world.entity.player.Player player) static net.minecraft.core.BlockPosgetCurPos(net.minecraft.core.Vec3i firstPos, net.minecraft.core.Vec3i relativePos, HorizontalDirection direction) static net.minecraft.core.BlockPosgetFirstBlockPos(HorizontalDirection direction, net.minecraft.core.BlockPos controllerPos, net.minecraft.core.Vec3i relativeControllerPos) static net.minecraft.core.Vec3igetRelativeControllerPos(Multiblock multiblock) static MultiblockDatagetUnformedMultiblock(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level, @Nullable net.minecraft.world.entity.player.Player player, boolean sendErrorMsg) Check if all multiblock parts are placed correctlystatic booleanunform(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level) static booleanunform(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level, @Nullable net.minecraft.world.entity.player.Player player)
-
Method Details
-
getUnformedMultiblock
public static MultiblockData getUnformedMultiblock(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.world.entity.player.Player player, boolean sendErrorMsg) Check if all multiblock parts are placed correctly- Parameters:
multiblock- multiblocks controller (multiblock to check)controllerPos- blockPos of the multiblock controllerlevel- level of the controller blockplayer- player that is trying to form the multi- Returns:
- Multiblock data that contains bunch of important information :3
-
getCurPos
public static net.minecraft.core.BlockPos getCurPos(net.minecraft.core.Vec3i firstPos, net.minecraft.core.Vec3i relativePos, HorizontalDirection direction) -
getFirstBlockPos
public static net.minecraft.core.BlockPos getFirstBlockPos(HorizontalDirection direction, net.minecraft.core.BlockPos controllerPos, net.minecraft.core.Vec3i relativeControllerPos) -
getRelativeControllerPos
- Returns:
- x, y, z
-
form
public static boolean form(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.world.entity.player.Player player) - Returns:
- Whether the forming was successful
-
form
public static boolean form(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level) -
unform
public static boolean unform(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level, @Nullable @Nullable net.minecraft.world.entity.player.Player player) - Returns:
- Whether the unforming was successful
-
unform
public static boolean unform(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level) - Returns:
- Whether the unforming was successful
-