This commit is contained in:
Paldiu 2021-03-26 13:33:15 -05:00
parent e5e62fe8e1
commit e628393d23

View File

@ -3,19 +3,42 @@ package io.github.simplexdev.simplexcore.structures;
import io.github.simplexdev.api.IStructure; import io.github.simplexdev.api.IStructure;
import io.github.simplexdev.simplexcore.math.Size; import io.github.simplexdev.simplexcore.math.Size;
import io.github.simplexdev.simplexcore.module.SimplexModule; import io.github.simplexdev.simplexcore.module.SimplexModule;
import io.github.simplexdev.simplexcore.structures.block.NBTBlock;
import io.github.simplexdev.simplexcore.structures.exception.InvalidSchematic;
import io.github.simplexdev.simplexcore.structures.exception.SchematicNotLoaded;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.NamespacedKey; import org.bukkit.NamespacedKey;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.util.Vector;
import java.io.File; import java.io.File;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class Structure implements IStructure { public class Structure implements IStructure {
private final SimplexModule<?> plugin; private final SimplexModule<?> plugin;
private File schematic;
private short width, height, length = 0;
private byte[] blockdatacontainer;
public Structure(SimplexModule<?> plugin) { private HashMap<Vector, NBTBlock> nbtBlocks = new HashMap<>();
private HashMap<Integer, BlockData> blocks = new HashMap<>();
public Structure(SimplexModule<?> plugin, File schematic) {
this.plugin = plugin; this.plugin = plugin;
this.schematic = schematic;
}
public void load() throws InvalidSchematic {
}
public void paste(Location loc, PasteType pasteType) throws SchematicNotLoaded {
if (width == 0 || height == 0 || length == 0 || blocks.isEmpty()) {
throw new SchematicNotLoaded("Schematic not loaded please load schematic first...");
}
} }
@Override @Override