mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
#836: Add missing API for explosive minecarts
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
0b65fda2e0
commit
d432386d58
1 changed files with 45 additions and 0 deletions
|
@ -6,4 +6,49 @@ import org.bukkit.entity.Minecart;
|
|||
* Represents a Minecart with TNT inside it that can explode when triggered.
|
||||
*/
|
||||
public interface ExplosiveMinecart extends Minecart {
|
||||
|
||||
/**
|
||||
* Set the fuse ticks of this minecart.
|
||||
*
|
||||
* If the fuse ticks are set to a non-zero value, this will ignite the
|
||||
* explosive.
|
||||
*
|
||||
* @param ticks the ticks
|
||||
*/
|
||||
public void setFuseTicks(int ticks);
|
||||
|
||||
/**
|
||||
* Get the fuse ticks of this minecart.
|
||||
*
|
||||
* If the fuse ticks reach 0, the minecart will explode.
|
||||
*
|
||||
* @return the fuse ticks, or -1 if this minecart's fuse has not yet been
|
||||
* ignited
|
||||
*/
|
||||
public int getFuseTicks();
|
||||
|
||||
/**
|
||||
* Ignite this minecart's fuse naturally.
|
||||
*/
|
||||
public void ignite();
|
||||
|
||||
/**
|
||||
* Check whether or not this minecart's fuse has been ignited.
|
||||
*
|
||||
* @return true if ignited, false otherwise
|
||||
*/
|
||||
public boolean isIgnited();
|
||||
|
||||
/**
|
||||
* Immediately explode this minecart with the power assumed by its current
|
||||
* movement.
|
||||
*/
|
||||
public void explode();
|
||||
|
||||
/**
|
||||
* Immediately explode this minecart with the given power.
|
||||
*
|
||||
* @param power the power to use. Must be positive and cannot exceed 5.0
|
||||
*/
|
||||
public void explode(double power);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue