Class EventStructureManager

java.lang.Object
com.minecolonies.core.colony.managers.EventStructureManager
All Implemented Interfaces:
IEventStructureManager

public class EventStructureManager extends Object implements IEventStructureManager
Manager for event structures
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Backup schematics folder name.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • 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 the given structure at the blockpos and saves a backup for the previous blocks.
    void
    writeToNBT(@NotNull net.minecraft.nbt.CompoundTag compound)
    Writes all backup schematics to NBT

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • STRUCTURE_BACKUP_FOLDER

      public static final String STRUCTURE_BACKUP_FOLDER
      Backup schematics folder name.
      See Also:
  • Constructor Details

    • EventStructureManager

      public EventStructureManager(EventManager eventManager, IColony colony)
  • Method Details

    • spawnTemporaryStructure

      public boolean spawnTemporaryStructure(com.ldtteam.structurize.blueprints.v1.Blueprint structure, net.minecraft.core.BlockPos targetSpawnPoint, int eventID)
      Spawns the given structure at the blockpos and saves a backup for the previous blocks.
      Specified by:
      spawnTemporaryStructure in interface IEventStructureManager
      Parameters:
      structure - the structure to spawn.
      eventID - the id of the event.
      targetSpawnPoint - position to spawn at
      Returns:
      true if successfully spawned
    • loadBackupForEvent

      public void loadBackupForEvent(int eventID)
      Description copied from interface: IEventStructureManager
      Restores backup schematics for the given event ID, may be more than one.
      Specified by:
      loadBackupForEvent in interface IEventStructureManager
      Parameters:
      eventID - the id of the event.
    • readFromNBT

      public void readFromNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: IEventStructureManager
      Reads all saved schematics from nbt, needs to happen before the event managers nbt read.
      Specified by:
      readFromNBT in interface IEventStructureManager
      Parameters:
      compound - the compound to read from.
    • writeToNBT

      public void writeToNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound)
      Description copied from interface: IEventStructureManager
      Writes all backup schematics to NBT
      Specified by:
      writeToNBT in interface IEventStructureManager
      Parameters:
      compound - the compound to write to.