Package net.kyori.adventure.nbt
Class TagStringIO.Builder
- java.lang.Object
-
- net.kyori.adventure.nbt.TagStringIO.Builder
-
- Enclosing class:
- TagStringIO
public static class TagStringIO.Builder extends java.lang.ObjectBuilder for a SNBT I/O handler.- Since:
- 4.0.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull TagStringIO.BuilderacceptLegacy(boolean legacy)Configure whether or not the resulting IO configuration will accept legacy-formatted data.@NotNull TagStringIObuild()Create a new IO configuration from this builder.@NotNull TagStringIO.BuilderemitLegacy(boolean legacy)Configure whether or not the resulting IO configuration will emit legacy-formatted data.@NotNull TagStringIO.Builderindent(int spaces)Set the indent for new levels of pretty-printing.@NotNull TagStringIO.BuilderindentTab(int tabs)Set the indent for new levels of pretty-printing.
-
-
-
Method Detail
-
indent
@NotNull public @NotNull TagStringIO.Builder indent(int spaces)
Set the indent for new levels of pretty-printing.Providing a level of
0will disable pretty-printing- Parameters:
spaces- Spaces to indent each level with- Returns:
- this builder
- Since:
- 4.0.0
-
indentTab
@NotNull public @NotNull TagStringIO.Builder indentTab(int tabs)
Set the indent for new levels of pretty-printing.Providing a level of
0will disable pretty-printing- Parameters:
tabs- Tabs to indent each level with- Returns:
- this builder
- Since:
- 4.0.0
-
acceptLegacy
@NotNull public @NotNull TagStringIO.Builder acceptLegacy(boolean legacy)
Configure whether or not the resulting IO configuration will accept legacy-formatted data.The legacy format was used in versions of Minecraft prior to 1.13
Be aware that because the legacy int array and modern list are ambiguous with each other, the deserializer will always return legacy-format integer arrays as a list tag.
- Parameters:
legacy- whether to accept legacy formatting- Returns:
- this builder
- Since:
- 4.0.0
-
emitLegacy
@NotNull public @NotNull TagStringIO.Builder emitLegacy(boolean legacy)
Configure whether or not the resulting IO configuration will emit legacy-formatted data.- Parameters:
legacy- whether to emit legacy formatting- Returns:
- this builder
- Since:
- 4.0.0
-
build
@NotNull public @NotNull TagStringIO build()
Create a new IO configuration from this builder.- Returns:
- new IO configuration
- Since:
- 4.0.0
-
-