Add value operation
This commit is contained in:
parent
8fca5aab41
commit
f4a88c277b
1 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,6 @@ import net.minecraft.world.level.block.state.properties.Property;
|
|||
import java.util.*;
|
||||
|
||||
public class StringProperty extends Property<String> {
|
||||
|
||||
private final Set<String> values;
|
||||
|
||||
public static StringProperty create(String name, String... values) {
|
||||
|
@ -17,6 +16,10 @@ public class StringProperty extends Property<String> {
|
|||
super(string, String.class);
|
||||
this.values = Sets.newHashSet(values);
|
||||
}
|
||||
|
||||
public void addValue(String name) {
|
||||
values.add(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<String> getPossibleValues() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue