107 lines
3.3 KiB
Java
107 lines
3.3 KiB
Java
package org.bukkit.entity;
|
|
|
|
import org.bukkit.TreeSpecies;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/**
|
|
* Represents a boat entity.
|
|
*/
|
|
public interface Boat extends Vehicle {
|
|
|
|
/**
|
|
* Gets the wood type of the boat.
|
|
*
|
|
* @return the wood type
|
|
*/
|
|
@NotNull
|
|
TreeSpecies getWoodType();
|
|
|
|
/**
|
|
* Sets the wood type of the boat.
|
|
*
|
|
* @param species the new wood type
|
|
*/
|
|
void setWoodType(@NotNull TreeSpecies species);
|
|
|
|
/**
|
|
* Gets the maximum speed of a boat. The speed is unrelated to the
|
|
* velocity.
|
|
*
|
|
* @return The max speed.
|
|
* @deprecated boats are complex and many of these methods do not work correctly across multiple versions.
|
|
*/
|
|
@Deprecated
|
|
public double getMaxSpeed();
|
|
|
|
/**
|
|
* Sets the maximum speed of a boat. Must be nonnegative. Default is 0.4D.
|
|
*
|
|
* @param speed The max speed.
|
|
* @deprecated boats are complex and many of these methods do not work correctly across multiple versions.
|
|
*/
|
|
@Deprecated
|
|
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
|
|
* @deprecated boats are complex and many of these methods do not work correctly across multiple versions.
|
|
*/
|
|
@Deprecated
|
|
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
|
|
* @deprecated boats are complex and many of these methods do not work correctly across multiple versions.
|
|
*/
|
|
@Deprecated
|
|
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
|
|
* @deprecated boats are complex and many of these methods do not work correctly across multiple versions.
|
|
*/
|
|
@Deprecated
|
|
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
|
|
* @deprecated boats are complex and many of these methods do not work correctly across multiple versions.
|
|
*/
|
|
@Deprecated
|
|
public void setUnoccupiedDeceleration(double rate);
|
|
|
|
/**
|
|
* Get whether boats can work on land.
|
|
*
|
|
* @return whether boats can work on land
|
|
* @deprecated boats are complex and many of these methods do not work correctly across multiple versions.
|
|
*/
|
|
@Deprecated
|
|
public boolean getWorkOnLand();
|
|
|
|
/**
|
|
* Set whether boats can work on land.
|
|
*
|
|
* @param workOnLand whether boats can work on land
|
|
* @deprecated boats are complex and many of these methods do not work correctly across multiple versions.
|
|
*/
|
|
@Deprecated
|
|
public void setWorkOnLand(boolean workOnLand);
|
|
}
|