mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-10-31 15:49:32 +01:00
18w07b - MISSING MAPPINGS
This commit is contained in:
parent
b9e4466ef0
commit
172ac19585
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w03b</version>
|
||||
<version>1.4.0-18w07c</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w03b</version>
|
||||
<version>1.4.0-18w07c</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
<dependency>
|
||||
<groupId>us.myles</groupId>
|
||||
<artifactId>viaversion-common</artifactId>
|
||||
<version>1.4.0-18w03b</version>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w03b</version>
|
||||
<version>1.4.0-18w07c</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -62,7 +62,7 @@ public class ProtocolVersion {
|
||||
register(v1_12 = new ProtocolVersion(335, "1.12"));
|
||||
register(v1_12_1 = new ProtocolVersion(338, "1.12.1"));
|
||||
register(v1_12_2 = new ProtocolVersion(340, "1.12.2"));
|
||||
register(v1_13 = new ProtocolVersion(355, "18w03b"));
|
||||
register(v1_13 = new ProtocolVersion(360, "18w07c"));
|
||||
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,7 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
||||
suggestion = suggestion.substring(1);
|
||||
}
|
||||
wrapper.write(Type.STRING, suggestion);
|
||||
wrapper.write(Type.BOOLEAN, false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -20,6 +20,7 @@ import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.data.MappingData;
|
||||
import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.providers.BlockEntityProvider;
|
||||
import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.providers.PaintingProvider;
|
||||
import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.storage.BlockStorage;
|
||||
import us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.type.Chunk1_13Type;
|
||||
|
||||
public class WorldPackets {
|
||||
public static void register(Protocol protocol) {
|
||||
@ -136,7 +137,8 @@ public class WorldPackets {
|
||||
BlockStorage storage = wrapper.user().get(BlockStorage.class);
|
||||
|
||||
Chunk1_9_3_4Type type = new Chunk1_9_3_4Type(clientWorld);
|
||||
Chunk chunk = wrapper.passthrough(type);
|
||||
Chunk1_13Type type1_13 = new Chunk1_13Type(clientWorld);
|
||||
Chunk chunk = wrapper.read(type);
|
||||
|
||||
for (int i = 0; i < chunk.getSections().length; i++) {
|
||||
ChunkSection section = chunk.getSections()[i];
|
||||
@ -181,6 +183,7 @@ public class WorldPackets {
|
||||
chunk.getSections()[y >> 4].setFlatBlock(x, y, z, newId);
|
||||
}
|
||||
}
|
||||
wrapper.write(type1_13,chunk);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,73 @@
|
||||
package us.myles.ViaVersion.protocols.protocolsnapshotto1_12_2.type;
|
||||
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import us.myles.ViaVersion.api.Via;
|
||||
import us.myles.ViaVersion.api.minecraft.Environment;
|
||||
import us.myles.ViaVersion.api.minecraft.chunks.Chunk;
|
||||
import us.myles.ViaVersion.api.minecraft.chunks.ChunkSection;
|
||||
import us.myles.ViaVersion.api.type.PartialType;
|
||||
import us.myles.ViaVersion.api.type.Type;
|
||||
import us.myles.ViaVersion.api.type.types.minecraft.BaseChunkType;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.chunks.Chunk1_9_3_4;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.chunks.ChunkSection1_9_3_4;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.BitSet;
|
||||
import java.util.List;
|
||||
|
||||
public class Chunk1_13Type extends PartialType<Chunk, ClientWorld> {
|
||||
public Chunk1_13Type(ClientWorld param) {
|
||||
super(param, Chunk.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Chunk read(ByteBuf input, ClientWorld world) throws Exception {
|
||||
throw new UnsupportedOperationException(); // TODO
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(ByteBuf output, ClientWorld world, Chunk chunk) throws Exception {
|
||||
output.writeInt(chunk.getX());
|
||||
output.writeInt(chunk.getZ());
|
||||
|
||||
output.writeBoolean(chunk.isGroundUp());
|
||||
Type.VAR_INT.write(output, chunk.getBitmask());
|
||||
|
||||
ByteBuf buf = Unpooled.buffer();
|
||||
for (int i = 0; i < 16; i++) {
|
||||
ChunkSection section = chunk.getSections()[i];
|
||||
if (section == null) continue; // Section not set
|
||||
section.writeBlocks(buf);
|
||||
section.writeBlockLight(buf);
|
||||
|
||||
if (!section.hasSkyLight()) continue; // No sky light, we're done here.
|
||||
section.writeSkyLight(buf);
|
||||
|
||||
}
|
||||
buf.readerIndex(0);
|
||||
Type.VAR_INT.write(output, buf.readableBytes() + (chunk.isBiomeData() ? 256 * 4 : 0));
|
||||
output.writeBytes(buf);
|
||||
buf.release(); // release buffer
|
||||
|
||||
// Write biome data
|
||||
if (chunk.isBiomeData()) {
|
||||
for (byte value : chunk.getBiomeData()) {
|
||||
Type.INT.write(output,value & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
// Write Block Entities
|
||||
Type.NBT_ARRAY.write(output, chunk.getBlockEntities().toArray(new CompoundTag[0]));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Type> getBaseClass() {
|
||||
return BaseChunkType.class;
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w03b</version>
|
||||
<version>1.4.0-18w07c</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>viaversion-jar</name>
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>us.myles</groupId>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<version>1.4.0-18w03b</version>
|
||||
<version>1.4.0-18w07c</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>viaversion-parent</name>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w03b</version>
|
||||
<version>1.4.0-18w07c</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w03b</version>
|
||||
<version>1.4.0-18w07c</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user