Search in sources :

Example 1 with MemoryDataContainer

use of org.spongepowered.common.data.MemoryDataContainer in project SpongeCommon by SpongePowered.

the class SpongeSchematicBuilder method build.

@Override
public Schematic build() throws IllegalArgumentException {
    if (this.volume instanceof SpongeArchetypeVolume) {
        final SpongeArchetypeVolume archetypeVolume = (SpongeArchetypeVolume) this.volume;
        final Vector3i start = archetypeVolume.min();
        final Vector3i blockSize = archetypeVolume.size();
        return new SpongeSchematic(start, blockSize, archetypeVolume, this.metadata == null ? new MemoryDataContainer() : this.metadata);
    }
    throw new IllegalThreadStateException("Unimplemented");
}
Also used : SpongeArchetypeVolume(org.spongepowered.common.world.volume.buffer.archetype.SpongeArchetypeVolume) Vector3i(org.spongepowered.math.vector.Vector3i) MemoryDataContainer(org.spongepowered.common.data.MemoryDataContainer)

Aggregations

MemoryDataContainer (org.spongepowered.common.data.MemoryDataContainer)1 SpongeArchetypeVolume (org.spongepowered.common.world.volume.buffer.archetype.SpongeArchetypeVolume)1 Vector3i (org.spongepowered.math.vector.Vector3i)1