Class PhysicsValues
java.lang.Object
com.hypixel.hytale.server.core.modules.physics.component.PhysicsValues
- All Implemented Interfaces:
Component<EntityStore>,Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<PhysicsValues> private static final doubleprivate static final booleanprivate static final doubleprotected doubleprotected booleanprotected doublestatic final DoubleFields inherited from interface com.hypixel.hytale.component.Component
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionPhysicsValues(double mass, double dragCoefficient, boolean invertedGravity) PhysicsValues(PhysicsValues other) -
Method Summary
Modifier and TypeMethodDescriptionclone()static ComponentType<EntityStore, PhysicsValues> static PhysicsValuesdoubledoublegetMass()booleanvoidreplaceValues(PhysicsValues other) voidvoidscale(float scale) toString()Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.hypixel.hytale.component.Component
cloneSerializable
-
Field Details
-
ZERO
-
CODEC
-
DEFAULT_MASS
private static final double DEFAULT_MASS- See Also:
-
DEFAULT_DRAG_COEFFICIENT
private static final double DEFAULT_DRAG_COEFFICIENT- See Also:
-
DEFAULT_INVERTED_GRAVITY
private static final boolean DEFAULT_INVERTED_GRAVITY- See Also:
-
mass
protected double mass -
dragCoefficient
protected double dragCoefficient -
invertedGravity
protected boolean invertedGravity
-
-
Constructor Details
-
PhysicsValues
public PhysicsValues() -
PhysicsValues
-
PhysicsValues
public PhysicsValues(double mass, double dragCoefficient, boolean invertedGravity)
-
-
Method Details
-
getComponentType
-
replaceValues
-
resetToDefault
public void resetToDefault() -
scale
public void scale(float scale) -
getMass
public double getMass() -
getDragCoefficient
public double getDragCoefficient() -
isInvertedGravity
public boolean isInvertedGravity() -
getDefault
-
toString
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Overrides:
clonein classObject
-