From e628393d234ef0b2c876b514b97185ea281f608c Mon Sep 17 00:00:00 2001 From: Paldiu Date: Fri, 26 Mar 2021 13:33:15 -0500 Subject: [PATCH] Fix --- .../simplexcore/structures/Structure.java | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/simplexdev/simplexcore/structures/Structure.java b/src/main/java/io/github/simplexdev/simplexcore/structures/Structure.java index 1e78487..5fc00ec 100644 --- a/src/main/java/io/github/simplexdev/simplexcore/structures/Structure.java +++ b/src/main/java/io/github/simplexdev/simplexcore/structures/Structure.java @@ -3,19 +3,42 @@ package io.github.simplexdev.simplexcore.structures; import io.github.simplexdev.api.IStructure; import io.github.simplexdev.simplexcore.math.Size; 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.NamespacedKey; import org.bukkit.World; import org.bukkit.block.Block; +import org.bukkit.block.data.BlockData; +import org.bukkit.util.Vector; import java.io.File; +import java.util.HashMap; import java.util.Map; public class Structure implements IStructure { private final SimplexModule plugin; + private File schematic; + private short width, height, length = 0; + private byte[] blockdatacontainer; - public Structure(SimplexModule plugin) { + private HashMap nbtBlocks = new HashMap<>(); + private HashMap blocks = new HashMap<>(); + + public Structure(SimplexModule plugin, File schematic) { 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