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 TypeMethodDescriptionbooleanforOffset(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 PartTargetfromCenter(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 PartTargetfromCenter(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 PartTargetfromCenter(PartPos pos) Get the target from a center block that is targeted at another block.inthashCode()booleanstatic PartTargetCreate 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
PartTargetinstance.
-
forOffset
Create a new instance with the given target offset.- Parameters:
offset- The offset of the target.- Returns:
- A new
PartTargetinstance.
-
equals
-
hashCode
public int hashCode() -
toString
-