Fixed #259 intermittent hyperspace jump issue
This commit is contained in:
parent
122b1f1049
commit
7d150811f0
1 changed files with 7 additions and 6 deletions
|
@ -121,12 +121,13 @@ public class TileEntityShipController extends TileEntityAbstractInterfaced {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setMode(final int mode) {
|
private void setMode(final int mode) {
|
||||||
EnumShipCoreMode[] modes = EnumShipCoreMode.values();
|
for(EnumShipCoreMode enumShipCoreMode : EnumShipCoreMode.values()) {
|
||||||
if (mode >= 0 && mode <= modes.length) {
|
if (enumShipCoreMode.getCode() == mode) {
|
||||||
this.mode = modes[mode];
|
this.mode = enumShipCoreMode;
|
||||||
markDirty();
|
markDirty();
|
||||||
if (WarpDriveConfig.LOGGING_JUMP && hasWorldObj()) {
|
if (WarpDriveConfig.LOGGING_JUMP && hasWorldObj()) {
|
||||||
WarpDrive.logger.info(this + " Mode set to " + this.mode + " (" + this.mode.getCode() + ")");
|
WarpDrive.logger.info(this + " Mode set to " + this.mode + " (" + this.mode.getCode() + ")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue