public enum MinecartType extends Enum<MinecartType>
By Adam Matthew Creation time: 2017/7/17 19:55.
| Enum Constant and Description |
|---|
MINECART_CHEST
Represents a chest holder.
|
MINECART_COMMAND_BLOCK
Represents a command block minecart.
|
MINECART_EMPTY
Represents an empty vehicle.
|
MINECART_FURNACE
Represents a furnace minecart.
|
MINECART_HOPPER
Represents a hopper minecart.
|
MINECART_MOB_SPAWNER
Represents a mob spawner minecart.
|
MINECART_TNT
Represents a TNT minecart.
|
MINECART_UNKNOWN
Represents an unknown minecart.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getId()
Get the variants of the current minecart
|
String |
getName()
Get the name of the minecart variants
|
boolean |
hasBlockInside()
Gets if the minecart contains block
|
static MinecartType |
valueOf(int types)
Returns of an instance of Minecart-variants
|
static MinecartType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MinecartType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MinecartType MINECART_EMPTY
public static final MinecartType MINECART_CHEST
public static final MinecartType MINECART_FURNACE
public static final MinecartType MINECART_TNT
public static final MinecartType MINECART_MOB_SPAWNER
public static final MinecartType MINECART_HOPPER
public static final MinecartType MINECART_COMMAND_BLOCK
public static final MinecartType MINECART_UNKNOWN
public static MinecartType[] values()
for (MinecartType c : MinecartType.values()) System.out.println(c);
public static MinecartType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getId()
public String getName()
public boolean hasBlockInside()
public static MinecartType valueOf(int types)
types - The number of minecartCopyright © 2021. All rights reserved.