Skip to content

Commit 44f1788

Browse files
authored
Expose BlockState string representation (#2425)
* Expose BlockState string representation * Clarify BlockState#asString javadoc
1 parent a8350d6 commit 44f1788

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/org/spongepowered/api/block/BlockState.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@ default BlockState mirror(final Supplier<? extends Mirror> mirror) {
157157
return this.mirror(mirror.get());
158158
}
159159

160+
/**
161+
* Gets a string representation of this block state, including the block type and the properties.
162+
* Do not confuse with {@link #toString} which is implementation specific.
163+
*
164+
* @return A string representation of this block state.
165+
*/
166+
String asString();
167+
160168
/**
161169
* An {@link org.spongepowered.api.data.DataHolderBuilder.Immutable} for a {@link BlockState}. Just like the
162170
* {@link org.spongepowered.api.data.DataHolderBuilder.Immutable}, the {@link Value}s passed in to

0 commit comments

Comments
 (0)