Fixed energy exploit
Fixed energy gain when using negative distance in jump core
This commit is contained in:
parent
43653c9edd
commit
69a01f00e6
1 changed files with 2 additions and 1 deletions
|
@ -304,7 +304,7 @@ public class TileEntityProtocol extends TileEntity implements IPeripheral
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDistance(int distance) {
|
public void setDistance(int distance) {
|
||||||
this.distance = Math.min(WarpDriveConfig.WC_MAX_JUMP_DISTANCE, distance);
|
this.distance = Math.max(1, Math.min(WarpDriveConfig.WC_MAX_JUMP_DISTANCE, distance));
|
||||||
WarpDrive.debugPrint(this + " Jump distance updated to " + distance);
|
WarpDrive.debugPrint(this + " Jump distance updated to " + distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -495,6 +495,7 @@ public class TileEntityProtocol extends TileEntity implements IPeripheral
|
||||||
|
|
||||||
setDistance(argInt0);
|
setDistance(argInt0);
|
||||||
|
|
||||||
|
return new Integer[] { getDistance() };
|
||||||
} else if (methodName.equals("set_direction")) {// set_direction (dir)
|
} else if (methodName.equals("set_direction")) {// set_direction (dir)
|
||||||
if (arguments.length != 1) {
|
if (arguments.length != 1) {
|
||||||
return new Integer[] { -1 };
|
return new Integer[] { -1 };
|
||||||
|
|
Loading…
Reference in a new issue