Added gravity max value until collision lag can be fixed

This commit is contained in:
LemADEC 2017-07-01 12:59:20 +02:00
parent 8daa2d20f4
commit 2bc81d93ae
2 changed files with 3 additions and 3 deletions

View file

@ -278,10 +278,10 @@ public class CelestialObject implements Cloneable, IStringSerializable {
case "normal" : return GRAVITY_NORMAL; case "normal" : return GRAVITY_NORMAL;
default: default:
final double gravity = Double.parseDouble(stringGravity); final double gravity = Double.parseDouble(stringGravity);
if (gravity < 0) { if (gravity < 0.0D) {
throw new RuntimeException(); throw new RuntimeException();
} }
return gravity; return Math.min(gravity, 1.0D);
} }
} catch (Exception exception) { } catch (Exception exception) {
WarpDrive.logger.error("Invalid gravity value, expecting none, legacySpace, legacyHyperspace, normal or a positive double. Found: " + stringGravity); WarpDrive.logger.error("Invalid gravity value, expecting none, legacySpace, legacyHyperspace, normal or a positive double. Found: " + stringGravity);

View file

@ -25,7 +25,7 @@
dimension defines an actual game world. If it's missing, that celestialObject remains visible but you can't "land" on it. dimension defines an actual game world. If it's missing, that celestialObject remains visible but you can't "land" on it.
dimension.id: this is the id of the dimension. 0 is the Overworld, -1 is the Nether, 1 is the End. dimension.id: this is the id of the dimension. 0 is the Overworld, -1 is the Nether, 1 is the End.
dimension.isBreathable: this is a boolean flag defining if ambient atmosphere is breathable. dimension.isBreathable: this is a boolean flag defining if ambient atmosphere is breathable.
dimension.gravity: this is the gravity simulation type. 0 is vanilla, 1 is space, 2 is hyperspace. dimension.gravity: this is the gravity simulation type. Valid keywords are none (0.0), legacySpace, legacyHyperspace, normal (1.0).
dimension.center.x, dimension.center.z: those are the center coordinate of that dimension world border, measured in blocks. For convenience, it's usually 0, 0. dimension.center.x, dimension.center.z: those are the center coordinate of that dimension world border, measured in blocks. For convenience, it's usually 0, 0.
dimension.isProvidedByWarpDrive (optional): this is a boolean flag defining if WarpDrive provides this dimension or not. dimension.isProvidedByWarpDrive (optional): this is a boolean flag defining if WarpDrive provides this dimension or not.
Currently only Space and Hyperspace can be provided: use other mods to generate planet world. Currently only Space and Hyperspace can be provided: use other mods to generate planet world.