mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
Region slice fixes
This commit is contained in:
parent
3292dc47ab
commit
6c8db56474
@ -1,6 +1,7 @@
|
||||
package com.volmit.iris.v2.scaffold.hunk.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.atomic.AtomicIntegerArray;
|
||||
|
||||
import com.volmit.iris.util.*;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
@ -10,9 +11,9 @@ import com.volmit.iris.v2.scaffold.hunk.Hunk;
|
||||
|
||||
public class HunkRegionSlice<T>
|
||||
{
|
||||
public static final Function2<Integer, CompoundTag, HunkRegionSlice<BlockData>> BLOCKDATA = (h, c) -> new HunkRegionSlice<>(h, Hunk::newMappedHunk, new BlockDataHunkIOAdapter(), c, "blockdata");
|
||||
public static final Function3<Integer, CompoundTag, String, HunkRegionSlice<String>> STRING = (h, c, t) -> new HunkRegionSlice<>(h, Hunk::newMappedHunk, new StringHunkIOAdapter(), c, t);
|
||||
public static final Function3<Integer, CompoundTag, String, HunkRegionSlice<Boolean>> BOOLEAN = (h, c, t) -> new HunkRegionSlice<>(h, Hunk::newMappedHunk, new BooleanHunkIOAdapter(), c, t);
|
||||
public static final Function2<Integer, CompoundTag, HunkRegionSlice<BlockData>> BLOCKDATA = (h, c) -> new HunkRegionSlice<>(h, Hunk::newAtomicHunk, new BlockDataHunkIOAdapter(), c, "blockdata");
|
||||
public static final Function3<Integer, CompoundTag, String, HunkRegionSlice<String>> STRING = (h, c, t) -> new HunkRegionSlice<>(h, Hunk::newAtomicHunk, new StringHunkIOAdapter(), c, t);
|
||||
public static final Function3<Integer, CompoundTag, String, HunkRegionSlice<Boolean>> BOOLEAN = (h, c, t) -> new HunkRegionSlice<>(h, Hunk::newAtomicHunk, new BooleanHunkIOAdapter(), c, t);
|
||||
private final Function3<Integer, Integer, Integer, Hunk<T>> factory;
|
||||
private final HunkIOAdapter<T> adapter;
|
||||
private final CompoundTag compound;
|
||||
@ -229,4 +230,8 @@ public class HunkRegionSlice<T>
|
||||
|
||||
return key + "." + Integer.toString(((short) (((x & 0xFF) << 8) | (z & 0xFF))), 36);
|
||||
}
|
||||
|
||||
public int getLoadCount() {
|
||||
return loadedChunks.size();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user