Class TubeSpline
java.lang.Object
petrolpark.mc.library.util.ClampedCubicSpline
petrolpark.mc.library.compat.create.core.world.block.tube.TubeSpline
A Clamped Cubic Spline with each end in the middle of a Block Face
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Set<net.minecraft.core.BlockPos> final BlockFacestatic final intstatic final doublestatic final intstatic final doublefinal doubleprotected TubeSpline.TubePlacementResultfinal doublefinal BlockFaceprotected booleanFields inherited from class petrolpark.mc.library.util.ClampedCubicSpline
controlPoints, endTangent, occupiedVolume, points, segmentLength, startTangent, tangents, totalLength -
Constructor Summary
ConstructorsConstructorDescriptionTubeSpline(BlockFace start, BlockFace end, double maxAngle, double segmentLength, double segmentRadius) TubeSpline(BlockFace start, BlockFace end, List<net.minecraft.world.phys.Vec3> middleControlPoints, double maxAngle, double segmentLength, double segmentRadius) -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckBlocked(net.minecraft.world.level.Level level, Consumer<net.minecraft.core.BlockPos> forEachObstructingBlock) booleancheckCanAfford(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item requiredItem, ITubeBlock block) protected voidforEachSegment(int index, net.minecraft.world.phys.Vec3 point, net.minecraft.world.phys.Vec3 tangent) Set<net.minecraft.core.BlockPos> List<net.minecraft.world.phys.Vec3> net.minecraft.world.phys.AABBbooleanmoveControlPoint(int controlPointIndex, net.minecraft.world.phys.Vec3 newLocation) voidvoidvalidate(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item requiredItem, ITubeBlock block) Methods inherited from class petrolpark.mc.library.util.ClampedCubicSpline
addControlPoint, addInterpolatedControlPoint, getControlPoints, getEndTangent, getLength, getPoints, getStartTangent, getTangents, removeControlPoint
-
Field Details
-
MAX_LENGTH
public static final double MAX_LENGTH- See Also:
-
MAX_VOLUME
public static final double MAX_VOLUME- See Also:
-
MAX_SQUARE_SEPARATION
public static final int MAX_SQUARE_SEPARATION- See Also:
-
MAX_CONTROL_POINTS
public static final int MAX_CONTROL_POINTS- See Also:
-
start
-
end
-
maxAngle
public final double maxAngle -
segmentRadius
public final double segmentRadius -
tooSharp
protected boolean tooSharp -
blockedPositions
-
result
-
-
Constructor Details
-
TubeSpline
-
TubeSpline
-
-
Method Details
-
moveControlPoint
public boolean moveControlPoint(int controlPointIndex, net.minecraft.world.phys.Vec3 newLocation) - Overrides:
moveControlPointin classClampedCubicSpline
-
recalculate
public void recalculate()- Overrides:
recalculatein classClampedCubicSpline
-
forEachSegment
protected void forEachSegment(int index, net.minecraft.world.phys.Vec3 point, net.minecraft.world.phys.Vec3 tangent) - Overrides:
forEachSegmentin classClampedCubicSpline
-
getMiddleControlPoints
-
getBlockedPositions
-
getOccupiedVolume
public net.minecraft.world.phys.AABB getOccupiedVolume()- Overrides:
getOccupiedVolumein classClampedCubicSpline
-
getProvider
-
getResult
-
validate
public void validate(net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item requiredItem, ITubeBlock block) -
checkBlocked
public boolean checkBlocked(net.minecraft.world.level.Level level, Consumer<net.minecraft.core.BlockPos> forEachObstructingBlock) -
checkCanAfford
public boolean checkCanAfford(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.Item requiredItem, ITubeBlock block)
-