Class PartTarget

java.lang.Object
org.cyclops.integrateddynamics.api.part.PartTarget

public class PartTarget extends Object
Object holder to refer to another block side and its origin.
  • Method Details

    • fromCenter

      public static PartTarget fromCenter(org.cyclops.cyclopscore.datastructure.DimPos pos, @Nullable net.minecraft.core.Direction side)
      Get the target from a center block that is targeted at another block.
      Parameters:
      pos - The central position that is referring to the target.
      side - The side on the central position that points to the target.
      Returns:
      The target referral.
    • fromCenter

      public static PartTarget fromCenter(PartPos pos)
      Get the target from a center block that is targeted at another block.
      Parameters:
      pos - The central position that is referring to the target.
      Returns:
      The target referral.
    • fromCenter

      public static PartTarget fromCenter(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side)
      Get the target from a center block that is targeted at another block.
      Parameters:
      world - The world.
      pos - The central position that is referring to the target.
      side - The side on the central position that points to the target.
      Returns:
      The target referral.
    • of

      public static PartTarget of(PartPos center, PartPos target)
      Create a new instance.
      Parameters:
      center - The center position.
      target - The target position.
      Returns:
      The target.
    • getCenter

      public PartPos getCenter()
    • getTarget

      public PartPos getTarget()
    • isDefaultTarget

      public boolean isDefaultTarget()
    • forTargetSide

      public PartTarget forTargetSide(net.minecraft.core.Direction targetSide)
      Create a new instance with the given target side.
      Parameters:
      targetSide - The side of the target.
      Returns:
      A new PartTarget instance.
    • forOffset

      public PartTarget forOffset(net.minecraft.core.Vec3i offset)
      Create a new instance with the given target offset.
      Parameters:
      offset - The offset of the target.
      Returns:
      A new PartTarget instance.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object