mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-11 18:26:11 +00:00
Cleanup
This commit is contained in:
@@ -27,7 +27,6 @@ import com.volmit.iris.util.interpolation.InterpolationMethod;
|
||||
import com.volmit.iris.util.interpolation.InterpolationMethod3D;
|
||||
import com.volmit.iris.util.interpolation.IrisInterpolation;
|
||||
import com.volmit.iris.util.math.BlockPosition;
|
||||
import com.volmit.iris.util.nbt.tag.ByteArrayTag;
|
||||
import com.volmit.iris.util.parallel.BurstExecutor;
|
||||
import com.volmit.iris.util.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.stream.interpolation.Interpolated;
|
||||
@@ -37,9 +36,7 @@ import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
||||
import org.bukkit.generator.ChunkGenerator.ChunkData;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Consumer;
|
||||
@@ -1437,8 +1434,7 @@ public interface Hunk<T> {
|
||||
return false;
|
||||
}
|
||||
|
||||
default boolean contains(int x, int y, int z)
|
||||
{
|
||||
default boolean contains(int x, int y, int z) {
|
||||
return x < getWidth() && x >= 0 && y < getHeight() && y >= 0 && z < getDepth() && z >= 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
package com.volmit.iris.util.hunk.storage;
|
||||
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.function.Consumer4;
|
||||
import com.volmit.iris.util.function.Consumer4IO;
|
||||
import com.volmit.iris.util.hunk.Hunk;
|
||||
@@ -49,15 +48,14 @@ public class MappedSyncHunk<T> extends StorageHunk<T> implements Hunk<T> {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
synchronized(data)
|
||||
{
|
||||
synchronized (data) {
|
||||
return data.isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRaw(int x, int y, int z, T t) {
|
||||
synchronized(data) {
|
||||
synchronized (data) {
|
||||
if (t == null) {
|
||||
data.remove(index(x, y, z));
|
||||
return;
|
||||
@@ -73,8 +71,7 @@ public class MappedSyncHunk<T> extends StorageHunk<T> implements Hunk<T> {
|
||||
|
||||
@Override
|
||||
public synchronized Hunk<T> iterateSync(Consumer4<Integer, Integer, Integer, T> c) {
|
||||
synchronized(data)
|
||||
{
|
||||
synchronized (data) {
|
||||
int idx, z;
|
||||
|
||||
for (Map.Entry<Integer, T> g : data.entrySet()) {
|
||||
@@ -90,8 +87,7 @@ public class MappedSyncHunk<T> extends StorageHunk<T> implements Hunk<T> {
|
||||
|
||||
@Override
|
||||
public synchronized Hunk<T> iterateSyncIO(Consumer4IO<Integer, Integer, Integer, T> c) throws IOException {
|
||||
synchronized(data)
|
||||
{
|
||||
synchronized (data) {
|
||||
int idx, z;
|
||||
|
||||
for (Map.Entry<Integer, T> g : data.entrySet()) {
|
||||
@@ -107,16 +103,14 @@ public class MappedSyncHunk<T> extends StorageHunk<T> implements Hunk<T> {
|
||||
|
||||
@Override
|
||||
public void empty(T b) {
|
||||
synchronized(data)
|
||||
{
|
||||
synchronized (data) {
|
||||
data.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public T getRaw(int x, int y, int z) {
|
||||
synchronized(data)
|
||||
{
|
||||
synchronized (data) {
|
||||
return data.get(index(x, y, z));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user