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) {
|
||||
EnumShipCoreMode[] modes = EnumShipCoreMode.values();
|
||||
if (mode >= 0 && mode <= modes.length) {
|
||||
this.mode = modes[mode];
|
||||
markDirty();
|
||||
if (WarpDriveConfig.LOGGING_JUMP && hasWorldObj()) {
|
||||
WarpDrive.logger.info(this + " Mode set to " + this.mode + " (" + this.mode.getCode() + ")");
|
||||
for(EnumShipCoreMode enumShipCoreMode : EnumShipCoreMode.values()) {
|
||||
if (enumShipCoreMode.getCode() == mode) {
|
||||
this.mode = enumShipCoreMode;
|
||||
markDirty();
|
||||
if (WarpDriveConfig.LOGGING_JUMP && hasWorldObj()) {
|
||||
WarpDrive.logger.info(this + " Mode set to " + this.mode + " (" + this.mode.getCode() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue