Armed and unprepared

- Fixed Mechanical Arms losing their configuration when placed in survival mode
This commit is contained in:
simibubi 2022-08-24 10:42:43 +02:00
parent d90682e7c3
commit a027f82252
3 changed files with 7 additions and 4 deletions

View file

@ -86,9 +86,6 @@ public class EjectorTargetHandler {
} }
public static void flushSettings(BlockPos pos) { public static void flushSettings(BlockPos pos) {
if (currentItem == null)
return;
int h = 0; int h = 0;
int v = 0; int v = 0;

View file

@ -89,7 +89,7 @@ public class ArmInteractionPointHandler {
} }
public static void flushSettings(BlockPos pos) { public static void flushSettings(BlockPos pos) {
if (currentItem == null) if (currentSelection == null)
return; return;
int removed = 0; int removed = 0;

View file

@ -66,6 +66,7 @@ public class ArmTileEntity extends KineticTileEntity implements ITransformableTE
LerpedFloat clawAngle; LerpedFloat clawAngle;
float previousBaseAngle; float previousBaseAngle;
boolean updateInteractionPoints; boolean updateInteractionPoints;
int tooltipWarmup;
// //
protected ScrollOptionBehaviour<SelectionMode> selectionMode; protected ScrollOptionBehaviour<SelectionMode> selectionMode;
@ -97,6 +98,7 @@ public class ArmTileEntity extends KineticTileEntity implements ITransformableTE
previousBaseAngle = previousTarget.baseAngle; previousBaseAngle = previousTarget.baseAngle;
updateInteractionPoints = true; updateInteractionPoints = true;
redstoneLocked = false; redstoneLocked = false;
tooltipWarmup = 15;
} }
@Override @Override
@ -118,6 +120,8 @@ public class ArmTileEntity extends KineticTileEntity implements ITransformableTE
initInteractionPoints(); initInteractionPoints();
boolean targetReached = tickMovementProgress(); boolean targetReached = tickMovementProgress();
if (tooltipWarmup > 0)
tooltipWarmup--;
if (chasedPointProgress < 1) { if (chasedPointProgress < 1) {
if (phase == Phase.MOVE_TO_INPUT) { if (phase == Phase.MOVE_TO_INPUT) {
ArmInteractionPoint point = getTargetedInteractionPoint(); ArmInteractionPoint point = getTargetedInteractionPoint();
@ -561,6 +565,8 @@ public class ArmTileEntity extends KineticTileEntity implements ITransformableTE
return true; return true;
if (isPlayerSneaking) if (isPlayerSneaking)
return false; return false;
if (tooltipWarmup > 0)
return false;
if (!inputs.isEmpty()) if (!inputs.isEmpty())
return false; return false;
if (!outputs.isEmpty()) if (!outputs.isEmpty())