@@ -7,8 +7,8 @@ import org.bukkit.block.BlockFace;
|
||||
* Represents a diode/repeater in the on or off state, with a delay and facing
|
||||
* in a specific direction.
|
||||
*
|
||||
* @see Material#DIODE_BLOCK_OFF
|
||||
* @see Material#DIODE_BLOCK_ON
|
||||
* @see Material#LEGACY_DIODE_BLOCK_OFF
|
||||
* @see Material#LEGACY_DIODE_BLOCK_ON
|
||||
*/
|
||||
public class Diode extends MaterialData implements Directional, Redstone {
|
||||
|
||||
@@ -65,34 +65,15 @@ public class Diode extends MaterialData implements Directional, Redstone {
|
||||
* @see BlockFace
|
||||
*/
|
||||
public Diode(BlockFace facingDirection, int delay, boolean state) {
|
||||
super(state ? Material.DIODE_BLOCK_ON : Material.DIODE_BLOCK_OFF);
|
||||
super(state ? Material.LEGACY_DIODE_BLOCK_ON : Material.LEGACY_DIODE_BLOCK_OFF);
|
||||
setFacingDirection(facingDirection);
|
||||
setDelay(delay);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type the raw type id
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public Diode(int type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
public Diode(Material type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type the raw type id
|
||||
* @param data the raw data value
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
public Diode(int type, byte data) {
|
||||
super(type, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type the type
|
||||
* @param data the raw data value
|
||||
@@ -204,6 +185,6 @@ public class Diode extends MaterialData implements Directional, Redstone {
|
||||
*/
|
||||
@Override
|
||||
public boolean isPowered() {
|
||||
return getItemType() == Material.DIODE_BLOCK_ON;
|
||||
return getItemType() == Material.LEGACY_DIODE_BLOCK_ON;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user