State system is done. It works. Finally. Still a few rough edges that need fixing however.

This commit is contained in:
Matthew Miller
2018-07-18 17:39:25 +10:00
parent 6b5f218809
commit c3d832c3fd
8 changed files with 42 additions and 20 deletions

View File

@ -76,7 +76,9 @@ public interface BlockStateHolder<T extends BlockStateHolder> {
if (getStates().isEmpty()) {
return this.getBlockType().getId();
} else {
String properties = getStates().entrySet().stream().map(entry -> entry.getKey() + "=" + entry.getValue()).collect(Collectors.joining(","));
String properties =
getStates().entrySet().stream().map(entry -> entry.getKey().getName() + "=" + entry.getValue().toString().toLowerCase()).collect(Collectors.joining(
","));
return this.getBlockType().getId() + "[" + properties + "]";
}
}