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

29 lines
612 B
Java
Raw Normal View History

2020-06-26 11:44:47 +02:00
package com.minelittlepony.unicopia.equine;
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());
}
}