Contents
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> The codec used to parsePhysicsValuesinstances.static final DoubleA constant representing zero value for validation.Fields inherited from interface 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 interface Component
cloneSerializable
-
Field Details
-
ZERO
A constant representing zero value for validation. -
CODEC
The codec used to parsePhysicsValuesinstances.
-
-
Constructor Details
-
PhysicsValues
public PhysicsValues() -
PhysicsValues
-
PhysicsValues
public PhysicsValues(double mass, double dragCoefficient, boolean invertedGravity)
-
-
Method Details
-
getComponentType
- Returns:
- the component type for
PhysicsValuescomponents
-
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>- Returns:
- a clone instance of the original component instance.
-