summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/material/RedstoneWire.java
blob: b429af0071e22b37e9e92367974ab974dd662f4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package org.bukkit.material;

import org.bukkit.Material;

/**
 * Represents redstone wire
 */
public class RedstoneWire extends MaterialData implements Redstone {
    public RedstoneWire() {
        super(Material.REDSTONE_WIRE);
    }

    /**
     *
     * @deprecated Magic value
     */
    @Deprecated
    public RedstoneWire(final int type) {
        super(type);
    }

    public RedstoneWire(final Material type) {
        super(type);
    }

    /**
     *
     * @deprecated Magic value
     */
    @Deprecated
    public RedstoneWire(final int type, final byte data) {
        super(type, data);
    }

    /**
     *
     * @deprecated Magic value
     */
    @Deprecated
    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;
    }

    @Override
    public String toString() {
        return super.toString() + " " + (isPowered() ? "" : "NOT ") + "POWERED";
    }

    @Override
    public RedstoneWire clone() {
        return (RedstoneWire) super.clone();
    }
}