mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Variable renames
This commit is contained in:
		@@ -30,8 +30,8 @@ public class Schematic {
 | 
			
		||||
 | 
			
		||||
    public boolean setBlock(BlockVector3 position, BaseBlock block) throws WorldEditException {
 | 
			
		||||
        if (clipboard.getRegion().contains(position)) {
 | 
			
		||||
            BlockVector3 v = position.subtract(clipboard.getRegion().getMinimumPoint());
 | 
			
		||||
            clipboard.setBlock(v, block);
 | 
			
		||||
            BlockVector3 vector3 = position.subtract(clipboard.getRegion().getMinimumPoint());
 | 
			
		||||
            clipboard.setBlock(vector3, block);
 | 
			
		||||
            return true;
 | 
			
		||||
        } else {
 | 
			
		||||
            return false;
 | 
			
		||||
@@ -39,9 +39,9 @@ public class Schematic {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void save(File file) throws IOException {
 | 
			
		||||
        try (SpongeSchematicWriter ssw = new SpongeSchematicWriter(
 | 
			
		||||
        try (SpongeSchematicWriter schematicWriter = new SpongeSchematicWriter(
 | 
			
		||||
            new NBTOutputStream(new FileOutputStream(file)))) {
 | 
			
		||||
            ssw.write(clipboard);
 | 
			
		||||
            schematicWriter.write(clipboard);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -327,9 +327,9 @@ public abstract class SchematicHandler {
 | 
			
		||||
 | 
			
		||||
    public Schematic getSchematic(@NotNull URL url) {
 | 
			
		||||
        try {
 | 
			
		||||
            ReadableByteChannel rbc = Channels.newChannel(url.openStream());
 | 
			
		||||
            InputStream is = Channels.newInputStream(rbc);
 | 
			
		||||
            return getSchematic(is);
 | 
			
		||||
            ReadableByteChannel readableByteChannel = Channels.newChannel(url.openStream());
 | 
			
		||||
            InputStream inputStream = Channels.newInputStream(readableByteChannel);
 | 
			
		||||
            return getSchematic(inputStream);
 | 
			
		||||
        } catch (IOException e) {
 | 
			
		||||
            e.printStackTrace();
 | 
			
		||||
        }
 | 
			
		||||
@@ -338,15 +338,15 @@ public abstract class SchematicHandler {
 | 
			
		||||
 | 
			
		||||
    public Schematic getSchematic(@NotNull InputStream is) {
 | 
			
		||||
        try {
 | 
			
		||||
            SpongeSchematicReader ssr =
 | 
			
		||||
            SpongeSchematicReader schematicReader =
 | 
			
		||||
                new SpongeSchematicReader(new NBTInputStream(new GZIPInputStream(is)));
 | 
			
		||||
            BlockArrayClipboard clip = (BlockArrayClipboard) ssr.read();
 | 
			
		||||
            BlockArrayClipboard clip = (BlockArrayClipboard) schematicReader.read();
 | 
			
		||||
            return new Schematic(clip);
 | 
			
		||||
        } catch (IOException ignored) {
 | 
			
		||||
            try {
 | 
			
		||||
                MCEditSchematicReader msr =
 | 
			
		||||
                MCEditSchematicReader schematicReader =
 | 
			
		||||
                    new MCEditSchematicReader(new NBTInputStream(new GZIPInputStream(is)));
 | 
			
		||||
                BlockArrayClipboard clip = (BlockArrayClipboard) msr.read();
 | 
			
		||||
                BlockArrayClipboard clip = (BlockArrayClipboard) schematicReader.read();
 | 
			
		||||
                return new Schematic(clip);
 | 
			
		||||
            } catch (IOException e) {
 | 
			
		||||
                e.printStackTrace();
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,6 @@ public abstract class BasicLocalBlockQueue extends LocalBlockQueue {
 | 
			
		||||
    private int lastZ = Integer.MIN_VALUE;
 | 
			
		||||
 | 
			
		||||
    public BasicLocalBlockQueue(String world) {
 | 
			
		||||
        super(world);
 | 
			
		||||
        this.world = world;
 | 
			
		||||
        this.modified = System.currentTimeMillis();
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,6 @@ public class DelegateLocalBlockQueue extends LocalBlockQueue {
 | 
			
		||||
    private final LocalBlockQueue parent;
 | 
			
		||||
 | 
			
		||||
    public DelegateLocalBlockQueue(LocalBlockQueue parent) {
 | 
			
		||||
        super(parent == null ? null : parent.getWorld());
 | 
			
		||||
        this.parent = parent;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,10 +16,6 @@ import java.util.Map;
 | 
			
		||||
 | 
			
		||||
public abstract class LocalBlockQueue {
 | 
			
		||||
 | 
			
		||||
    public LocalBlockQueue(String world) {
 | 
			
		||||
        // Implement this elsewhere
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public ScopedLocalBlockQueue getForChunk(int x, int z) {
 | 
			
		||||
        int bx = x << 4;
 | 
			
		||||
        int bz = z << 4;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user