Class PartTarget
java.lang.Object
org.cyclops.integrateddynamics.api.part.PartTarget
Object holder to refer to another block side and its origin.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
forOffset
(net.minecraft.core.Vec3i offset) Create a new instance with the given target offset.forTargetSide
(net.minecraft.core.Direction targetSide) Create a new instance with the given target side.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.static PartTarget
fromCenter
(org.cyclops.cyclopscore.datastructure.DimPos pos, net.minecraft.core.Direction side) Get the target from a center block that is targeted at another block.static PartTarget
fromCenter
(PartPos pos) Get the target from a center block that is targeted at another block.int
hashCode()
boolean
static PartTarget
Create a new instance.toString()
-
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
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
Create a new instance.- Parameters:
center
- The center position.target
- The target position.- Returns:
- The target.
-
getCenter
-
getTarget
-
isDefaultTarget
public boolean isDefaultTarget() -
forTargetSide
Create a new instance with the given target side.- Parameters:
targetSide
- The side of the target.- Returns:
- A new
PartTarget
instance.
-
forOffset
Create a new instance with the given target offset.- Parameters:
offset
- The offset of the target.- Returns:
- A new
PartTarget
instance.
-
equals
-
hashCode
public int hashCode() -
toString
-