Files
Paper/paper-api/src/main/java/org/bukkit/material/RedstoneWire.java
2024-11-25 07:52:33 +11:00

52 lines
1.2 KiB
Java

package org.bukkit.material;
import org.bukkit.Material;
/**
* Represents redstone wire
*
* @deprecated all usage of MaterialData is deprecated and subject to removal.
* Use {@link org.bukkit.block.data.BlockData}.
*/
@Deprecated(since = "1.14.1")
public class RedstoneWire extends MaterialData implements Redstone {
public RedstoneWire() {
super(Material.LEGACY_REDSTONE_WIRE);
}
public RedstoneWire(final Material type) {
super(type);
}
/**
* @param type the type
* @param data the raw data value
* @deprecated Magic value
*/
@Deprecated(since = "1.6.2")
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
*/
@Override
public boolean isPowered() {
return getData() > 0;
}
@Override
public String toString() {
return super.toString() + " " + (isPowered() ? "" : "NOT ") + "POWERED";
}
@Override
public RedstoneWire clone() {
return (RedstoneWire) super.clone();
}
}