Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-08 04:20:06 +01:00
Remove hardcoding of heightmap compressed long size (#1668)
Dieser Commit ist enthalten in:
Ursprung
05f80f23b9
Commit
465c81d193
@ -11,6 +11,7 @@ import com.fastasyncworldedit.core.queue.IChunkGet;
|
|||||||
import com.fastasyncworldedit.core.queue.IChunkSet;
|
import com.fastasyncworldedit.core.queue.IChunkSet;
|
||||||
import com.fastasyncworldedit.core.queue.implementation.QueueHandler;
|
import com.fastasyncworldedit.core.queue.implementation.QueueHandler;
|
||||||
import com.fastasyncworldedit.core.queue.implementation.blocks.CharGetBlocks;
|
import com.fastasyncworldedit.core.queue.implementation.blocks.CharGetBlocks;
|
||||||
|
import com.fastasyncworldedit.core.util.MathMan;
|
||||||
import com.fastasyncworldedit.core.util.collection.AdaptedMap;
|
import com.fastasyncworldedit.core.util.collection.AdaptedMap;
|
||||||
import com.google.common.base.Suppliers;
|
import com.google.common.base.Suppliers;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
@ -173,7 +174,8 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setHeightmapToGet(HeightMapType type, int[] data) {
|
public void setHeightmapToGet(HeightMapType type, int[] data) {
|
||||||
BitArrayUnstretched bitArray = new BitArrayUnstretched(9, 256);
|
// height + 1 to match server internal
|
||||||
|
BitArrayUnstretched bitArray = new BitArrayUnstretched(MathMan.log2nlz(getChunk().getHeight() + 1), 256);
|
||||||
bitArray.fromRaw(data);
|
bitArray.fromRaw(data);
|
||||||
Heightmap.Types nativeType = Heightmap.Types.valueOf(type.name());
|
Heightmap.Types nativeType = Heightmap.Types.valueOf(type.name());
|
||||||
Heightmap heightMap = getChunk().heightmaps.get(nativeType);
|
Heightmap heightMap = getChunk().heightmaps.get(nativeType);
|
||||||
|
@ -11,6 +11,7 @@ import com.fastasyncworldedit.core.queue.IChunkGet;
|
|||||||
import com.fastasyncworldedit.core.queue.IChunkSet;
|
import com.fastasyncworldedit.core.queue.IChunkSet;
|
||||||
import com.fastasyncworldedit.core.queue.implementation.QueueHandler;
|
import com.fastasyncworldedit.core.queue.implementation.QueueHandler;
|
||||||
import com.fastasyncworldedit.core.queue.implementation.blocks.CharGetBlocks;
|
import com.fastasyncworldedit.core.queue.implementation.blocks.CharGetBlocks;
|
||||||
|
import com.fastasyncworldedit.core.util.MathMan;
|
||||||
import com.fastasyncworldedit.core.util.collection.AdaptedMap;
|
import com.fastasyncworldedit.core.util.collection.AdaptedMap;
|
||||||
import com.google.common.base.Suppliers;
|
import com.google.common.base.Suppliers;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
@ -175,7 +176,8 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setHeightmapToGet(HeightMapType type, int[] data) {
|
public void setHeightmapToGet(HeightMapType type, int[] data) {
|
||||||
BitArrayUnstretched bitArray = new BitArrayUnstretched(9, 256);
|
// height + 1 to match server internal
|
||||||
|
BitArrayUnstretched bitArray = new BitArrayUnstretched(MathMan.log2nlz(getChunk().getHeight() + 1), 256);
|
||||||
bitArray.fromRaw(data);
|
bitArray.fromRaw(data);
|
||||||
Heightmap.Types nativeType = Heightmap.Types.valueOf(type.name());
|
Heightmap.Types nativeType = Heightmap.Types.valueOf(type.name());
|
||||||
Heightmap heightMap = getChunk().heightmaps.get(nativeType);
|
Heightmap heightMap = getChunk().heightmaps.get(nativeType);
|
||||||
|
@ -11,6 +11,7 @@ import com.fastasyncworldedit.core.queue.IChunkGet;
|
|||||||
import com.fastasyncworldedit.core.queue.IChunkSet;
|
import com.fastasyncworldedit.core.queue.IChunkSet;
|
||||||
import com.fastasyncworldedit.core.queue.implementation.QueueHandler;
|
import com.fastasyncworldedit.core.queue.implementation.QueueHandler;
|
||||||
import com.fastasyncworldedit.core.queue.implementation.blocks.CharGetBlocks;
|
import com.fastasyncworldedit.core.queue.implementation.blocks.CharGetBlocks;
|
||||||
|
import com.fastasyncworldedit.core.util.MathMan;
|
||||||
import com.fastasyncworldedit.core.util.collection.AdaptedMap;
|
import com.fastasyncworldedit.core.util.collection.AdaptedMap;
|
||||||
import com.google.common.base.Suppliers;
|
import com.google.common.base.Suppliers;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
@ -178,7 +179,8 @@ public class PaperweightGetBlocks extends CharGetBlocks implements BukkitGetBloc
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setHeightmapToGet(HeightMapType type, int[] data) {
|
public void setHeightmapToGet(HeightMapType type, int[] data) {
|
||||||
BitArrayUnstretched bitArray = new BitArrayUnstretched(9, 256);
|
// height + 1 to match server internal
|
||||||
|
BitArrayUnstretched bitArray = new BitArrayUnstretched(MathMan.log2nlz(getChunk().getHeight() + 1), 256);
|
||||||
bitArray.fromRaw(data);
|
bitArray.fromRaw(data);
|
||||||
Heightmap.Types nativeType = Heightmap.Types.valueOf(type.name());
|
Heightmap.Types nativeType = Heightmap.Types.valueOf(type.name());
|
||||||
Heightmap heightMap = getChunk().heightmaps.get(nativeType);
|
Heightmap heightMap = getChunk().heightmaps.get(nativeType);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren