MineColonies

MineColonies

57M Downloads

Generic Raiders - Save environment where structure was placed

Raycoms opened this issue ยท 0 comments

commented

At the moment barbarian raiders spawn in the middle of nowhere and pirates spawn on their ships.

In the future it would be nice if we could add support for barbarian camps, vikings, mammelukes etc for the different biomes there are.

For this reason we have to add a way to store the schematic of the place we paste this schematic to be able to roll the changes back after a bit.

Structures are placed with:

StructureWrapper.loadAndPlaceStructureWithRotation(world, Structures.SCHEMATICS_PREFIX + "/Ships/" + shipSize, targetSpawnPoint.down(3), 0, Mirror.NONE, false);

What we would need would be a method which is.

backUpWorld(world, Structures.SCHEMATICS_PREFIX + "/Ships/" + shipSize, targetSpawnPoint.down(3), 0, Mirror.NONE, false)

Ahin the StructureWrapper which would do a small backup of the world matching the size of the structure before pasting the structure. This address would then be registered in the IRaidManager together with the existing structure data to roll the changes back afterwards.