mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-31 21:37:39 +01:00
RedstoneWire MaterialData
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
7314f0ade2
commit
f8decbe750
@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
package org.bukkit.material;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents redstone wire
|
||||||
|
*/
|
||||||
|
public class RedstoneWire extends MaterialData implements Redstone {
|
||||||
|
public RedstoneWire(final int type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RedstoneWire(final Material type) {
|
||||||
|
super(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RedstoneWire(final int type, final byte data) {
|
||||||
|
super(type, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RedstoneWire(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() > 0;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user