Package commoble.morered.wire_post

# Class SlackInterpolator

java.lang.Object
commoble.morered.wire_post.SlackInterpolator

public class SlackInterpolator extends Object

## Constructor Summary

Constructors
Constructor
Description
`SlackInterpolator()`

## Method Summary

Modifier and Type
Method
Description
`static net.minecraft.world.phys.Vec3`
`doesBlockStateIntersectAnyWireOfPost(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos postPos, net.minecraft.core.BlockPos placePos, net.minecraft.world.level.block.state.BlockState placeState, Map<net.minecraft.core.BlockPos,NestedBoundingBox> remoteConnections, Set<net.minecraft.core.BlockPos> checkedPostPositions)`
Checks if a placed block would intersect any of a given post block's connections.
`static net.minecraft.world.phys.Vec3`
`doesBlockStateIntersectConnection(net.minecraft.core.BlockPos startPos, net.minecraft.core.BlockPos endPos, net.minecraft.core.BlockPos placePos, net.minecraft.world.level.block.state.BlockState placeState, NestedBoundingBox box, net.minecraft.world.level.BlockGetter world)`
`static double`
`getFractionalLerp(int current, int max)`
`static net.minecraft.world.phys.Vec3[]`
`getInterpolatedDifferences(net.minecraft.world.phys.Vec3 vector)`
`static net.minecraft.world.phys.Vec3[]`
`getInterpolatedPoints(net.minecraft.world.phys.Vec3 lower, net.minecraft.world.phys.Vec3 upper)`
`static net.minecraft.world.phys.Vec3`
`getWireRaytraceHit(net.minecraft.core.BlockPos lower, net.minecraft.core.BlockPos upper, net.minecraft.world.level.BlockGetter world)`
`static double`
`getYLerp(double lerp, double dY)`
`static net.minecraft.world.phys.BlockHitResult`
`rayTraceBlocks(net.minecraft.world.level.BlockGetter world, WireRayTraceContext context)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SlackInterpolator

public SlackInterpolator()

## Method Details

### getInterpolatedDifferences

public static net.minecraft.world.phys.Vec3[] getInterpolatedDifferences(net.minecraft.world.phys.Vec3 vector)

### getInterpolatedPoints

public static net.minecraft.world.phys.Vec3[] getInterpolatedPoints(net.minecraft.world.phys.Vec3 lower, net.minecraft.world.phys.Vec3 upper)

### getFractionalLerp

public static double getFractionalLerp(int current, int max)

### getYLerp

public static double getYLerp(double lerp, double dY)

### doesBlockStateIntersectAnyWireOfPost

@Nullable public static net.minecraft.world.phys.Vec3 doesBlockStateIntersectAnyWireOfPost(net.minecraft.world.level.BlockGetter world, net.minecraft.core.BlockPos postPos, net.minecraft.core.BlockPos placePos, net.minecraft.world.level.block.state.BlockState placeState, Map<net.minecraft.core.BlockPos,NestedBoundingBox> remoteConnections, Set<net.minecraft.core.BlockPos> checkedPostPositions)
Checks if a placed block would intersect any of a given post block's connections.

Parameters:
  `world` - The world object
  `postPos` - the position of the post block whose connections we want to check the intersections of
  `placePos` - The position the block is being placed at
  `placeState` - The blockstate being placed
  `remoteConnections` - The remote connections of the post block
  `checkedPostPositions` - The positions of wire posts that have already been checked. Any posts in this list that this post is connected to is also connected to this post, and this connection has been verified to not intersect the placed block, so we don't need to check again.
Returns:
  A Vector3d of the intersecting hit, or null if there was no intersecting hit

### doesBlockStateIntersectConnection

@Nullable public static net.minecraft.world.phys.Vec3 doesBlockStateIntersectConnection(net.minecraft.core.BlockPos startPos, net.minecraft.core.BlockPos endPos, net.minecraft.core.BlockPos placePos, net.minecraft.world.level.block.state.BlockState placeState, NestedBoundingBox box, net.minecraft.world.level.BlockGetter world)

### getWireRaytraceHit

@Nullable public static net.minecraft.world.phys.Vec3 getWireRaytraceHit(net.minecraft.core.BlockPos lower, net.minecraft.core.BlockPos upper, net.minecraft.world.level.BlockGetter world)

### rayTraceBlocks

public static net.minecraft.world.phys.BlockHitResult rayTraceBlocks(net.minecraft.world.level.BlockGetter world, WireRayTraceContext context)