2020-09-22 15:11:20 +02:00
|
|
|
package com.minelittlepony.unicopia.entity;
|
2020-05-10 17:18:45 +02:00
|
|
|
|
|
|
|
import com.minelittlepony.unicopia.util.NbtSerialisable;
|
|
|
|
|
|
|
|
import net.minecraft.util.math.BlockPos;
|
2020-10-14 21:07:36 +02:00
|
|
|
import net.minecraft.util.math.Vec3d;
|
2020-05-10 17:18:45 +02:00
|
|
|
|
|
|
|
public interface Physics extends NbtSerialisable {
|
|
|
|
|
|
|
|
double calcGravity(double worldConstant);
|
|
|
|
|
2020-10-14 21:07:36 +02:00
|
|
|
Vec3d getMotionAngle();
|
|
|
|
|
2020-05-10 17:18:45 +02:00
|
|
|
float getGravityModifier();
|
|
|
|
|
2021-02-22 14:54:24 +01:00
|
|
|
float getBaseGravityModifier();
|
|
|
|
|
2020-05-10 19:52:43 +02:00
|
|
|
void setBaseGravityModifier(float constant);
|
2020-05-10 17:18:45 +02:00
|
|
|
|
|
|
|
boolean isFlying();
|
|
|
|
|
|
|
|
BlockPos getHeadPosition();
|
|
|
|
|
|
|
|
void spawnSprintingParticles();
|
|
|
|
|
|
|
|
default boolean isGravityNegative() {
|
|
|
|
return getGravityModifier() < 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
default int getGravitySignum() {
|
|
|
|
return (int)Math.signum(getGravityModifier());
|
|
|
|
}
|
|
|
|
}
|