Unicopia/src/main/java/com/minelittlepony/unicopia/entity/Physics.java

29 lines
612 B
Java
Raw Normal View History

package com.minelittlepony.unicopia.entity;
import com.minelittlepony.unicopia.util.NbtSerialisable;
import net.minecraft.util.math.BlockPos;
public interface Physics extends NbtSerialisable {
double calcGravity(double worldConstant);
float getGravityModifier();
void setBaseGravityModifier(float constant);
boolean isFlying();
BlockPos getHeadPosition();
void spawnSprintingParticles();
default boolean isGravityNegative() {
return getGravityModifier() < 0;
}
default int getGravitySignum() {
return (int)Math.signum(getGravityModifier());
}
}