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;
|
|
|
|
|
|
|
|
public interface Physics extends NbtSerialisable {
|
|
|
|
|
|
|
|
double calcGravity(double worldConstant);
|
|
|
|
|
|
|
|
float getGravityModifier();
|
|
|
|
|
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());
|
|
|
|
}
|
|
|
|
}
|