mirror of
https://github.com/PaperMC/Paper.git
synced 2025-04-08 13:05:55 +02:00
A special thanks goes to @aerouk for almost all of the changes found here. By: Wesley Wolfe <weswolf@aol.com>
73 lines
2.0 KiB
Java
73 lines
2.0 KiB
Java
package org.bukkit.entity;
|
|
|
|
/**
|
|
* Represents a boat entity.
|
|
*/
|
|
public interface Boat extends Vehicle {
|
|
|
|
/**
|
|
* Gets the maximum speed of a boat. The speed is unrelated to the
|
|
* velocity.
|
|
*
|
|
* @return The max speed.
|
|
*/
|
|
public double getMaxSpeed();
|
|
|
|
/**
|
|
* Sets the maximum speed of a boat. Must be nonnegative. Default is 0.4D.
|
|
*
|
|
* @param speed The max speed.
|
|
*/
|
|
public void setMaxSpeed(double speed);
|
|
|
|
/**
|
|
* Gets the deceleration rate (newSpeed = curSpeed * rate) of occupied
|
|
* boats. The default is 0.2.
|
|
*
|
|
* @return The rate of deceleration
|
|
*/
|
|
public double getOccupiedDeceleration();
|
|
|
|
/**
|
|
* Sets the deceleration rate (newSpeed = curSpeed * rate) of occupied
|
|
* boats. Setting this to a higher value allows for quicker acceleration.
|
|
* The default is 0.2.
|
|
*
|
|
* @param rate deceleration rate
|
|
*/
|
|
public void setOccupiedDeceleration(double rate);
|
|
|
|
/**
|
|
* Gets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied
|
|
* boats. The default is -1. Values below 0 indicate that no additional
|
|
* deceleration is imposed.
|
|
*
|
|
* @return The rate of deceleration
|
|
*/
|
|
public double getUnoccupiedDeceleration();
|
|
|
|
/**
|
|
* Sets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied
|
|
* boats. Setting this to a higher value allows for quicker deceleration
|
|
* of boats when a player disembarks. The default is -1. Values below 0
|
|
* indicate that no additional deceleration is imposed.
|
|
*
|
|
* @param rate deceleration rate
|
|
*/
|
|
public void setUnoccupiedDeceleration(double rate);
|
|
|
|
/**
|
|
* Get whether boats can work on land.
|
|
*
|
|
* @return whether boats can work on land
|
|
*/
|
|
public boolean getWorkOnLand();
|
|
|
|
/**
|
|
* Set whether boats can work on land.
|
|
*
|
|
* @param workOnLand whether boats can work on land
|
|
*/
|
|
public void setWorkOnLand(boolean workOnLand);
|
|
}
|