4.1.0 Release

This commit is contained in:
Nassim Jahnke 2021-11-26 10:44:56 +01:00
parent e70f595f76
commit 8d35d16575
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
5 changed files with 14 additions and 8 deletions

View File

@ -11,7 +11,7 @@ Supported Versions
**Green** = ViaVersion\
**Purple** = ViaBackwards addition
![supported_versions](https://i.imgur.com/MGmk8Yp.png)
![supported_versions](https://i.imgur.com/O2KAFFL.png)
Releases / Dev Builds
-

View File

@ -5,7 +5,7 @@ plugins {
allprojects {
group = "com.viaversion"
version = "4.1.0-1.18-pre5-SNAPSHOT"
version = "4.1.0"
description = "Allow older clients to join newer server versions."
}

View File

@ -56,7 +56,7 @@ import java.util.logging.Logger;
public interface ViaBackwardsPlatform {
String MINIMUM_VV_VERSION = "4.0.1";
String MINIMUM_VV_VERSION = "4.1.0";
String IMPL_VERSION = "$IMPL_VERSION";
/**

View File

@ -161,15 +161,23 @@ public final class BlockItemPackets1_18 extends ItemRewriter<Protocol1_17_1To1_1
MathUtil.ceilLog2(tracker.biomesSent()));
final Chunk oldChunk = wrapper.read(chunkType);
final ChunkSection[] sections = oldChunk.getSections();
final BitSet mask = new BitSet(oldChunk.getSections().length);
final int[] biomeData = new int[sections.length * ChunkSection.BIOME_SIZE];
int biomeIndex = 0;
for (final ChunkSection section : sections) {
// TODO remove empty sections (always initialized because of biomes in 1.18)?
for (int j = 0; j < sections.length; j++) {
final ChunkSection section = sections[j];
// Write biome palette into biome array
final DataPalette biomePalette = section.palette(PaletteType.BIOMES);
for (int i = 0; i < ChunkSection.BIOME_SIZE; i++) {
biomeData[biomeIndex++] = biomePalette.idAt(i);
}
// Rewrite to empty section
if (section.getNonAirBlocksCount() == 0) {
sections[j] = null;
} else {
mask.set(j);
}
}
final List<CompoundTag> blockEntityTags = new ArrayList<>(oldChunk.blockEntities().size());
@ -195,8 +203,6 @@ public final class BlockItemPackets1_18 extends ItemRewriter<Protocol1_17_1To1_1
tag.put("id", new StringTag(id));
}
final BitSet mask = new BitSet(oldChunk.getSections().length);
mask.set(0, oldChunk.getSections().length);
final Chunk chunk = new BaseChunk(oldChunk.getX(), oldChunk.getZ(), true, false, mask,
oldChunk.getSections(), biomeData, oldChunk.getHeightMap(), blockEntityTags);
wrapper.write(new Chunk1_17Type(tracker.currentWorldSectionHeight()), chunk);

View File

@ -3,7 +3,7 @@ metadata.format.version = "1.1"
[versions]
# ViaVersion
viaver = "4.1.0-1.18-pre2-SNAPSHOT"
viaver = "4.1.0-1.18-pre8-SNAPSHOT"
# Common provided
netty = "4.0.20.Final"