diff --git a/src/main/java/cr0s/warpdrive/data/CelestialObject.java b/src/main/java/cr0s/warpdrive/data/CelestialObject.java index ce3ba298..4c63baf1 100644 --- a/src/main/java/cr0s/warpdrive/data/CelestialObject.java +++ b/src/main/java/cr0s/warpdrive/data/CelestialObject.java @@ -278,10 +278,10 @@ public class CelestialObject implements Cloneable, IStringSerializable { case "normal" : return GRAVITY_NORMAL; default: final double gravity = Double.parseDouble(stringGravity); - if (gravity < 0) { + if (gravity < 0.0D) { throw new RuntimeException(); } - return gravity; + return Math.min(gravity, 1.0D); } } catch (Exception exception) { WarpDrive.logger.error("Invalid gravity value, expecting none, legacySpace, legacyHyperspace, normal or a positive double. Found: " + stringGravity); diff --git a/src/main/resources/config/celestialObjects-default.xml b/src/main/resources/config/celestialObjects-default.xml index 119d4198..60c24b18 100644 --- a/src/main/resources/config/celestialObjects-default.xml +++ b/src/main/resources/config/celestialObjects-default.xml @@ -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.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.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.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.