Like this @mattbdev ?

This commit is contained in:
Jesse Boyd 2019-10-30 20:01:18 +01:00
parent 50b7b4fb54
commit bddf92cd9b
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 684 additions and 677 deletions

View File

@ -47,6 +47,7 @@ import java.util.stream.IntStream;
import javax.annotation.Nullable;
public class BlockType implements FawePattern, Keyed {
protected static final BlockType DUMMY = new BlockType();
public static final NamespacedRegistry<BlockType> REGISTRY = new NamespacedRegistry<>("block type");
@ -56,6 +57,12 @@ public class BlockType implements FawePattern, Keyed {
private boolean initItemType;
private ItemType itemType;
// Dummy
private BlockType() {
this.id = null;
this.settings = null;
}
protected BlockType(String id, int internalId, List<BlockState> states) {
int i = id.indexOf("[");
this.id = i == -1 ? id : id.substring(0, i);