Added new Materials
This commit is contained in:
parent
3eec4bba3b
commit
8a6ea6ffdc
@ -42,6 +42,8 @@ public enum Material {
|
|||||||
POWERED_RAIL(27, PoweredRail.class),
|
POWERED_RAIL(27, PoweredRail.class),
|
||||||
DETECTOR_RAIL(28, DetectorRail.class),
|
DETECTOR_RAIL(28, DetectorRail.class),
|
||||||
WEB(30),
|
WEB(30),
|
||||||
|
LONG_GRASS(31),
|
||||||
|
DEAD_BUSH(32),
|
||||||
WOOL(35, Wool.class),
|
WOOL(35, Wool.class),
|
||||||
YELLOW_FLOWER(37),
|
YELLOW_FLOWER(37),
|
||||||
RED_ROSE(38),
|
RED_ROSE(38),
|
||||||
@ -102,6 +104,7 @@ public enum Material {
|
|||||||
DIODE_BLOCK_OFF(93, Diode.class),
|
DIODE_BLOCK_OFF(93, Diode.class),
|
||||||
DIODE_BLOCK_ON(94, Diode.class),
|
DIODE_BLOCK_ON(94, Diode.class),
|
||||||
LOCKED_CHEST(95),
|
LOCKED_CHEST(95),
|
||||||
|
TRAP_DOOR(96, TrapDoor.class),
|
||||||
// ----- Item Separator -----
|
// ----- Item Separator -----
|
||||||
IRON_SPADE(256, 1, 250),
|
IRON_SPADE(256, 1, 250),
|
||||||
IRON_PICKAXE(257, 1, 250),
|
IRON_PICKAXE(257, 1, 250),
|
||||||
@ -205,6 +208,7 @@ public enum Material {
|
|||||||
BED(355),
|
BED(355),
|
||||||
DIODE(356),
|
DIODE(356),
|
||||||
COOKIE(357),
|
COOKIE(357),
|
||||||
|
MAP(358),
|
||||||
GOLD_RECORD(2256, 1),
|
GOLD_RECORD(2256, 1),
|
||||||
GREEN_RECORD(2257, 1);
|
GREEN_RECORD(2257, 1);
|
||||||
|
|
||||||
|
44
src/main/java/org/bukkit/material/TrapDoor.java
Normal file
44
src/main/java/org/bukkit/material/TrapDoor.java
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
|
||||||
|
package org.bukkit.material;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a trap door
|
||||||
|
*/
|
||||||
|
public class TrapDoor extends MaterialData implements Redstone {
|
||||||
|
public TrapDoor() {
|
||||||
|
super(Material.TRAP_DOOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TrapDoor(final int type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TrapDoor(final Material type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TrapDoor(final int type, final byte data) {
|
||||||
|
super(type, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public TrapDoor(final Material type, final byte data) {
|
||||||
|
super(type, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the current state of this Material, indicating if it's powered or
|
||||||
|
* unpowered
|
||||||
|
*
|
||||||
|
* @return true if powered, otherwise false
|
||||||
|
*/
|
||||||
|
public boolean isPowered() {
|
||||||
|
return (getData() & 0x8) == 0x8;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return super.toString() + "[powered=" + isPowered() + "]";
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user