Update to 1.14.3

This commit is contained in:
KennyTV 2019-06-24 17:24:21 +02:00
parent 5e1143af4b
commit b4c30dbff3
11 changed files with 63 additions and 10 deletions

View File

@ -15,7 +15,7 @@
<parent>
<artifactId>viabackwards-parent</artifactId>
<groupId>nl.matsv</groupId>
<version>3.0.0-1.14.2</version>
<version>3.0.0-1.14.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -15,7 +15,7 @@
<parent>
<artifactId>viabackwards-parent</artifactId>
<groupId>nl.matsv</groupId>
<version>3.0.0-1.14.2</version>
<version>3.0.0-1.14.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -15,7 +15,7 @@
<parent>
<artifactId>viabackwards-parent</artifactId>
<groupId>nl.matsv</groupId>
<version>3.0.0-1.14.2</version>
<version>3.0.0-1.14.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -15,7 +15,7 @@
<parent>
<artifactId>viabackwards-parent</artifactId>
<groupId>nl.matsv</groupId>
<version>3.0.0-1.14.2</version>
<version>3.0.0-1.14.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -21,6 +21,7 @@ import nl.matsv.viabackwards.protocol.protocol1_13_1to1_13_2.Protocol1_13_1To1_1
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.Protocol1_13_2To1_14;
import nl.matsv.viabackwards.protocol.protocol1_13to1_13_1.Protocol1_13To1_13_1;
import nl.matsv.viabackwards.protocol.protocol1_14_1to1_14_2.Protocol1_14_1To1_14_2;
import nl.matsv.viabackwards.protocol.protocol1_14_2to1_14_3.Protocol1_14_2To1_14_3;
import nl.matsv.viabackwards.protocol.protocol1_14to1_14_1.Protocol1_14To1_14_1;
import nl.matsv.viabackwards.protocol.protocol1_9_4to1_10.Protocol1_9_4To1_10;
import us.myles.ViaVersion.api.protocol.ProtocolRegistry;
@ -50,6 +51,7 @@ public interface ViaBackwardsPlatform {
ProtocolRegistry.registerProtocol(new Protocol1_13_2To1_14(), Collections.singletonList(ProtocolVersion.v1_13_2.getId()), ProtocolVersion.v1_14.getId());
ProtocolRegistry.registerProtocol(new Protocol1_14To1_14_1(), Collections.singletonList(ProtocolVersion.v1_14.getId()), ProtocolVersion.v1_14_1.getId());
ProtocolRegistry.registerProtocol(new Protocol1_14_1To1_14_2(), Collections.singletonList(ProtocolVersion.v1_14_1.getId()), ProtocolVersion.v1_14_2.getId());
ProtocolRegistry.registerProtocol(new Protocol1_14_2To1_14_3(), Collections.singletonList(ProtocolVersion.v1_14_2.getId()), ProtocolVersion.v1_14_3.getId());
}
}

View File

@ -527,7 +527,7 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
}
});
// Uunload chunk
// Unload chunk
protocol.registerOutgoing(State.PLAY, 0x1D, 0x1F, new PacketRemapper() {
@Override
public void registerMap() {

View File

@ -0,0 +1,51 @@
package nl.matsv.viabackwards.protocol.protocol1_14_2to1_14_3;
import nl.matsv.viabackwards.api.BackwardsProtocol;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.remapper.PacketHandler;
import us.myles.ViaVersion.api.remapper.PacketRemapper;
import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.packets.State;
public class Protocol1_14_2To1_14_3 extends BackwardsProtocol {
@Override
protected void registerPackets() {
// Trade list
registerOutgoing(State.PLAY, 0x27, 0x27, new PacketRemapper() {
@Override
public void registerMap() {
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
wrapper.passthrough(Type.VAR_INT);
int size = wrapper.passthrough(Type.UNSIGNED_BYTE);
for (int i = 0; i < size; i++) {
wrapper.passthrough(Type.FLAT_VAR_INT_ITEM);
wrapper.passthrough(Type.FLAT_VAR_INT_ITEM);
if (wrapper.passthrough(Type.BOOLEAN)) {
wrapper.passthrough(Type.FLAT_VAR_INT_ITEM);
}
wrapper.passthrough(Type.BOOLEAN);
wrapper.passthrough(Type.INT);
wrapper.passthrough(Type.INT);
wrapper.passthrough(Type.INT);
wrapper.passthrough(Type.INT);
wrapper.passthrough(Type.FLOAT);
}
wrapper.passthrough(Type.VAR_INT);
wrapper.passthrough(Type.VAR_INT);
wrapper.read(Type.BOOLEAN);
wrapper.read(Type.BOOLEAN);
}
});
}
});
}
@Override
public void init(UserConnection userConnection) {
}
}

View File

@ -15,7 +15,7 @@
<parent>
<artifactId>viabackwards-parent</artifactId>
<groupId>nl.matsv</groupId>
<version>3.0.0-1.14.2</version>
<version>3.0.0-1.14.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -16,7 +16,7 @@
<groupId>nl.matsv</groupId>
<artifactId>viabackwards-parent</artifactId>
<version>3.0.0-1.14.2</version>
<version>3.0.0-1.14.3</version>
<packaging>pom</packaging>
<description>Allow newer clients to join older server versions.</description>
@ -61,7 +61,7 @@
<dependency>
<groupId>us.myles</groupId>
<artifactId>viaversion</artifactId>
<version>2.1.1</version>
<version>2.1.2</version>
<scope>provided</scope>
</dependency>
</dependencies>

View File

@ -15,7 +15,7 @@
<parent>
<artifactId>viabackwards-parent</artifactId>
<groupId>nl.matsv</groupId>
<version>3.0.0-1.14.2</version>
<version>3.0.0-1.14.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -15,7 +15,7 @@
<parent>
<artifactId>viabackwards-parent</artifactId>
<groupId>nl.matsv</groupId>
<version>3.0.0-1.14.2</version>
<version>3.0.0-1.14.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>