Class EventStructureManager
java.lang.Object
com.minecolonies.core.colony.managers.EventStructureManager
- All Implemented Interfaces:
IEventStructureManager
Manager for event structures
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidloadBackupForEvent(int eventID) Restores backup schematics for the given event ID, may be more than one.voidreadFromNBT(@NotNull net.minecraft.nbt.CompoundTag compound) Reads all saved schematics from nbt, needs to happen before the event managers nbt read.booleanspawnTemporaryStructure(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.voidwriteToNBT(@NotNull net.minecraft.nbt.CompoundTag compound) Writes all backup schematics to NBT
-
Field Details
-
STRUCTURE_BACKUP_FOLDER
Backup schematics folder name.- See Also:
-
-
Constructor Details
-
EventStructureManager
-
-
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:
spawnTemporaryStructurein interfaceIEventStructureManager- Parameters:
structure- the structure to spawn.targetSpawnPoint- position to spawn ateventID- the id of the event.- Returns:
- true if successfully spawned
-
loadBackupForEvent
public void loadBackupForEvent(int eventID) Description copied from interface:IEventStructureManagerRestores backup schematics for the given event ID, may be more than one.- Specified by:
loadBackupForEventin interfaceIEventStructureManager- Parameters:
eventID- the id of the event.
-
readFromNBT
public void readFromNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound) Description copied from interface:IEventStructureManagerReads all saved schematics from nbt, needs to happen before the event managers nbt read.- Specified by:
readFromNBTin interfaceIEventStructureManager- Parameters:
compound- the compound to read from.
-
writeToNBT
public void writeToNBT(@NotNull @NotNull net.minecraft.nbt.CompoundTag compound) Description copied from interface:IEventStructureManagerWrites all backup schematics to NBT- Specified by:
writeToNBTin interfaceIEventStructureManager- Parameters:
compound- the compound to write to.
-