Package net.kyori.adventure.nbt
Class TagStringIO.Builder
java.lang.Object
net.kyori.adventure.nbt.TagStringIO.Builder
- Enclosing class:
- TagStringIO
Builder for a SNBT I/O handler.
- Since:
- 4.0.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull TagStringIO.BuilderacceptHeterogeneousLists(boolean heterogeneous) Configure whether or not the resulting IO configuration will accept heterogeneous lists.@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.BuilderemitHeterogeneousLists(boolean heterogeneous) Configure whether or not the resulting IO configuration will emit heterogeneous lists.@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 Details
-
indent
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
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
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
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
-
acceptHeterogeneousLists
Configure whether or not the resulting IO configuration will accept heterogeneous lists.Heterogeneous lists are lists that contain multiple types of tags, such as a list containing both strings and integers.
- Parameters:
heterogeneous- whether to accept heterogeneous lists- Returns:
- this builder
- Since:
- 4.22.0
-
emitHeterogeneousLists
Configure whether or not the resulting IO configuration will emit heterogeneous lists.Heterogeneous lists are lists that contain multiple types of tags, such as a list containing both strings and integers.
- Parameters:
heterogeneous- whether to emit heterogeneous lists- Returns:
- this builder
- Since:
- 4.22.0
-
build
Create a new IO configuration from this builder.- Returns:
- new IO configuration
- Since:
- 4.0.0
-