Package net.hollowcube.polar
Interface PolarDataConverter
public interface PolarDataConverter
Allows for upgrading world data from one game version to another.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionconvertBlockEntityData(@NotNull String id, @NotNull net.kyori.adventure.nbt.CompoundBinaryTag data, int fromVersion, int toVersion) default voidconvertBlockPalette(@NotNull String[] palette, int fromVersion, int toVersion) Converts the block palette from one version to another.default intReturns the current data version of the world.default intReturns the data version to use on worlds lower thanPolarWorld.VERSION_DATA_CONVERTERwhich do not store a data version.
-
Field Details
-
NOOP
-
-
Method Details
-
defaultDataVersion
default int defaultDataVersion()Returns the data version to use on worlds lower thanPolarWorld.VERSION_DATA_CONVERTERwhich do not store a data version. Defaults to the current Minestom data version. -
dataVersion
default int dataVersion()Returns the current data version of the world. -
convertBlockPalette
default void convertBlockPalette(@NotNull @NotNull String[] palette, int fromVersion, int toVersion) Converts the block palette from one version to another. Implementations are expected to modify the palette array in place.
- Parameters:
palette- An array of block namespaces, eg "minecraft:stone_stairs[facing=north]"fromVersion- The data version of the palettetoVersion- The data version to convert the palette to
-
convertBlockEntityData
-