Variable renames

This commit is contained in:
MattBDev 2019-08-13 18:10:04 -04:00
parent 265f0c6615
commit d7c72d5f75
5 changed files with 11 additions and 17 deletions

View File

@ -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);
}
}
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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;
}

View File

@ -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;