Minor contraption annoyances
- Fixed belts sometimes popping off when disassembling a contraption - Made Portable Storage Interfaces a little more lenient to engage at funny angles
This commit is contained in:
parent
2a56bb76be
commit
8ec74ee96d
2 changed files with 4 additions and 3 deletions
|
@ -142,7 +142,7 @@ public class PortableStorageInterfaceMovement extends MovementBehaviour {
|
|||
.getDirectionVec());
|
||||
directionVec = context.rotation.apply(directionVec);
|
||||
Direction facingFromVector = Direction.getFacingFromVector(directionVec.x, directionVec.y, directionVec.z);
|
||||
if (directionVec.distanceTo(new Vec3d(facingFromVector.getDirectionVec())) > 1 / 8f)
|
||||
if (directionVec.distanceTo(new Vec3d(facingFromVector.getDirectionVec())) > 1 / 2f)
|
||||
return Optional.empty();
|
||||
return Optional.of(facingFromVector);
|
||||
}
|
||||
|
|
|
@ -250,6 +250,8 @@ public class StructureTransform {
|
|||
newDirection = direction;
|
||||
if (direction.getAxis() == rotationAxis)
|
||||
newSlope = BeltSlope.SIDEWAYS;
|
||||
else if (direction.getAxis() != Axis.Z)
|
||||
newDirection = direction.getOpposite();
|
||||
}
|
||||
|
||||
state = state.with(BeltBlock.HORIZONTAL_FACING, newDirection);
|
||||
|
@ -332,8 +334,7 @@ public class StructureTransform {
|
|||
int readAngle = buffer.readInt();
|
||||
int axisIndex = buffer.readVarInt();
|
||||
int rotationIndex = buffer.readVarInt();
|
||||
return new StructureTransform(readBlockPos, readAngle,
|
||||
axisIndex == -1 ? null : Axis.values()[axisIndex],
|
||||
return new StructureTransform(readBlockPos, readAngle, axisIndex == -1 ? null : Axis.values()[axisIndex],
|
||||
rotationIndex == -1 ? null : Rotation.values()[rotationIndex]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue