This commit is contained in:
cyberpwn
2021-08-24 22:28:33 -04:00
parent 432e95e4ec
commit 8df789ae34
84 changed files with 404 additions and 786 deletions

View File

@@ -32,7 +32,6 @@ import org.bukkit.NamespacedKey;
import org.bukkit.block.Biome;
import org.bukkit.block.data.BlockData;
import javax.management.RuntimeErrorException;
import java.io.File;
import java.io.IOException;
import java.util.Map;
@@ -236,8 +235,7 @@ public class NBTWorld {
getChunkSection(x >> 4, y >> 4, z >> 4).setBlockStateAt(x & 15, y & 15, z & 15, getCompound(data), false);
}
public int getBiomeId(Biome b)
{
public int getBiomeId(Biome b) {
return biomeIds.get(b);
}
@@ -257,8 +255,7 @@ public class NBTWorld {
return s;
}
public Chunk getChunk(int x, int z)
{
public Chunk getChunk(int x, int z) {
return getChunk(getMCA(x >> 5, z >> 5), x, z);
}
@@ -281,10 +278,10 @@ public class NBTWorld {
}
public long getIdleDuration(int x, int z) {
return hyperLock.withResult(x, z, () -> {
Long l = lastUse.get(Cache.key(x, z));
return l == null ? 0 : (M.ms() - l);
});
return hyperLock.withResult(x, z, () -> {
Long l = lastUse.get(Cache.key(x, z));
return l == null ? 0 : (M.ms() - l);
});
}
public MCAFile getMCA(int x, int z) {

View File

@@ -43,8 +43,7 @@ public class ListTag<T extends Tag<?>> extends Tag<List<T>> implements Iterable<
super(createEmptyValue(3));
}
public ListTag<T> makeAtomic()
{
public ListTag<T> makeAtomic() {
setValue(new CopyOnWriteArrayList<>(getValue()));
return this;
}