mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 04:46:40 +00:00
Fix palette / region iteration
This commit is contained in:
@ -115,7 +115,7 @@ public class CharFilterBlock extends ChunkFilterBlock {
|
||||
|
||||
@Override
|
||||
public void filter(Filter filter, int yStart, int yEnd) {
|
||||
for (y = yStart, index = yStart << 8; y < yEnd; y++) {
|
||||
for (y = yStart, index = yStart << 8; y <= yEnd; y++) {
|
||||
for (z = 0; z < 16; z++) {
|
||||
for (x = 0; x < 16; x++, index++) {
|
||||
filter.applyBlock(this);
|
||||
|
@ -57,7 +57,7 @@ public class ChunkPacket implements Function<byte[], byte[]>, Supplier<byte[]> {
|
||||
return chunk;
|
||||
}
|
||||
|
||||
private byte[] getSectionBytes() {
|
||||
public byte[] getSectionBytes() {
|
||||
byte[] tmp = this.sectionBytes;
|
||||
if (tmp == null) {
|
||||
synchronized (this) {
|
||||
@ -107,7 +107,6 @@ public class ChunkPacket implements Function<byte[], byte[]>, Supplier<byte[]> {
|
||||
|
||||
fos.writeVarInt(getChunk().getBitMask());
|
||||
|
||||
|
||||
fos.writeNBT("", getHeightMap());
|
||||
|
||||
fos.writeVarInt(sectionBytes.length);
|
||||
|
@ -8,6 +8,7 @@ import com.boydti.fawe.beta.implementation.packet.ChunkPacket;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Stream;
|
||||
@ -25,7 +26,7 @@ public class ChunkSendProcessor implements IBatchProcessor {
|
||||
public IChunkSet processSet(IChunk chunk, IChunkGet get, IChunkSet set) {
|
||||
int chunkX = chunk.getX();
|
||||
int chunkZ = chunk.getZ();
|
||||
boolean replaceAll = true;
|
||||
boolean replaceAll = set.getBiomeType(0, 0) != null;
|
||||
ChunkPacket packet = new ChunkPacket(chunkX, chunkZ, () -> set, replaceAll);
|
||||
Stream<Player> stream = this.players.get();
|
||||
if (stream == null) {
|
||||
@ -41,4 +42,4 @@ public class ChunkSendProcessor implements IBatchProcessor {
|
||||
public Extent construct(Extent child) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user