Interface IEventStructureManager

All Known Implementing Classes:
EventStructureManager

public interface IEventStructureManager
Interface for the Event structure manager The manager takes care of structures spawned for events, takes a backup before spawning and loads the backup when the event is done.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    loadBackupForEvent(int eventID)
    Restores backup schematics for the given event ID, may be more than one.
    void
    readFromNBT(@NotNull net.minecraft.nbt.CompoundTag compound)
    Reads all saved schematics from nbt, needs to happen before the event managers nbt read.
    boolean
    spawnTemporaryStructure(com.ldtteam.structurize.blueprints.v1.Blueprint structure, net.minecraft.core.BlockPos targetSpawnPoint, int eventID)
    Spawns a temporary structure to place in the world, saves a backup of the previous blocks and restores them after the event ends.
    void
    writeToNBT(@NotNull net.minecraft.nbt.CompoundTag compound)
    Writes all backup schematics to NBT
  • Method Details

    • spawnTemporaryStructure

      boolean spawnTemporaryStructure(com.ldtteam.structurize.blueprints.v1.Blueprint structure, net.minecraft.core.BlockPos targetSpawnPoint, int eventID)
      Spawns a temporary structure to place in the world, saves a backup of the previous blocks and restores them after the event ends.
      Parameters:
      structure - structure thats going to be spawned
      targetSpawnPoint - position to spawn at
      eventID - eventID to spawn for
      Returns:
      true if successfully spawned
    • loadBackupForEvent

      void loadBackupForEvent(int eventID)
      Restores backup schematics for the given event ID, may be more than one.
      Parameters:
      eventID - the id of the event.
    • readFromNBT

      void readFromNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Reads all saved schematics from nbt, needs to happen before the event managers nbt read.
      Parameters:
      compound - the compound to read from.
    • writeToNBT

      void writeToNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Writes all backup schematics to NBT
      Parameters:
      compound - the compound to write to.