Class StructureStorage

java.lang.Object
net.glowstone.io.structure.StructureStorage

public final class StructureStorage extends Object
The class responsible for mapping structure types to their storage methods and reading and writing structure data using those storage methods.
  • Method Details

    • getStructureStores

      public static Collection<StructureStore<?>> getStructureStores()
      Returns all known structure stores.
      Returns:
      A collection containing all structure stores.
    • loadStructure

      public static GlowStructure loadStructure(GlowWorld world, CompoundTag compound)
      Load a structure in the given world from the given data tag.
      Parameters:
      world - The target world.
      compound - The tag to load from.
      Returns:
      The newly constructed structure.
      Throws:
      IllegalArgumentException - if there is an error in the data.
    • saveStructure

      public static StructureStore<GlowStructure> saveStructure(GlowStructure structure, CompoundTag compound)
      Save a structure data to the given compound tag.
      Parameters:
      structure - The structure to save.
      compound - The target tag.
      Returns:
      The structure store for the saved structure.