Class MultiblockHelper

java.lang.Object
com.portingdeadmods.portingdeadlibs.utils.MultiblockHelper

public final class MultiblockHelper extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    form(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level)
     
    static boolean
    form(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.BlockPos
    getCurPos(net.minecraft.core.Vec3i firstPos, net.minecraft.core.Vec3i relativePos, HorizontalDirection direction)
     
    static net.minecraft.core.BlockPos
    getFirstBlockPos(HorizontalDirection direction, net.minecraft.core.BlockPos controllerPos, net.minecraft.core.Vec3i relativeControllerPos)
     
    static net.minecraft.core.Vec3i
     
    getUnformedMultiblock(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 correctly
    static boolean
    unform(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level)
     
    static boolean
    unform(Multiblock multiblock, net.minecraft.core.BlockPos controllerPos, net.minecraft.world.level.Level level, @Nullable net.minecraft.world.entity.player.Player player)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 controller
      level - level of the controller block
      player - 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

      public static net.minecraft.core.Vec3i getRelativeControllerPos(Multiblock multiblock)
      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