PropertyBool .java

net.minecraft.block.properties.PropertyBool (class, 33 lines): members: allowedValues, getAllowedValues, create, getName. imports: ImmutableSet.

net.minecraft.block.propertiesclass33 linescommonextends PropertyHelper<Boolean>743 B

API Surface (3)

Collection<Boolean> getAllowedValues()
PropertyBool create(String name)
String getName(Boolean value)

Fields & Constants (1)

allowedValues

Code Graph: Dependencies (1)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

PropertyBool.java33 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.block.properties;
2
3
import com.google.common.collect.ImmutableSet;
4
import java.util.Collection;
5
6
public class PropertyBool extends PropertyHelper<Boolean>
7
{
8
    private final ImmutableSet<Boolean> allowedValues = ImmutableSet.<Boolean>of(Boolean.valueOf(true), Boolean.valueOf(false));
9
10
    protected PropertyBool(String name)
11
    {
12
        super(name, Boolean.class);
13
    }
14
15
    public Collection<Boolean> getAllowedValues()
16
    {
17
        return this.allowedValues;
18
    }
19
20
    public static PropertyBool create(String name)
21
    {
22
        return new PropertyBool(name);
23
    }
24
25
    /**
26
     * Get the name for the given value.
27
     */
28
    public String getName(Boolean value)
29
    {
30
        return value.toString();
31
    }
32
}
33

Deobfuscated MCP 1.8.9 source of PropertyBool from Marcelektro/MavenMCP-1.8.9 (net/minecraft/block/properties/PropertyBool.java), stored verbatim.