This commit is contained in:
Gerrygames 2019-02-20 18:01:21 +01:00
parent 755e8a007a
commit 3de06c269d
14 changed files with 140 additions and 128 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>2.0.0-19w07a</version>
<version>2.0.0-19w08a</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>2.0.0-19w07a</version>
<version>2.0.0-19w08a</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>2.0.0-19w07a</version>
<version>2.0.0-19w08a</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -67,7 +67,7 @@ public class ProtocolVersion {
register(v1_13 = new ProtocolVersion(393, "1.13"));
register(v1_13_1 = new ProtocolVersion(401, "1.13.1"));
register(v1_13_2 = new ProtocolVersion(404, "1.13.2"));
register(v1_14 = new ProtocolVersion(460, "1.14"));
register(v1_14 = new ProtocolVersion(461, "1.14"));
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
}

View File

@ -36,34 +36,35 @@ public class Protocol1_14To1_13_2 extends Protocol {
registerOutgoing(State.PLAY, 0x31, 0x32);
registerOutgoing(State.PLAY, 0x32, 0x33);
registerOutgoing(State.PLAY, 0x34, 0x35);
//TODO remove if packet ids stay unchanged in 1.14 release
registerOutgoing(State.PLAY, 0x34, 0x34);
registerOutgoing(State.PLAY, 0x36, 0x37);
registerOutgoing(State.PLAY, 0x37, 0x38);
registerOutgoing(State.PLAY, 0x36, 0x36);
registerOutgoing(State.PLAY, 0x37, 0x37);
registerOutgoing(State.PLAY, 0x39, 0x3A);
registerOutgoing(State.PLAY, 0x3A, 0x3B);
registerOutgoing(State.PLAY, 0x3B, 0x3C);
registerOutgoing(State.PLAY, 0x3C, 0x3D);
registerOutgoing(State.PLAY, 0x3D, 0x3E);
registerOutgoing(State.PLAY, 0x3E, 0x3F);
registerOutgoing(State.PLAY, 0x39, 0x39);
registerOutgoing(State.PLAY, 0x3A, 0x3A);
registerOutgoing(State.PLAY, 0x3B, 0x3B);
registerOutgoing(State.PLAY, 0x3C, 0x3C);
registerOutgoing(State.PLAY, 0x3D, 0x3D);
registerOutgoing(State.PLAY, 0x3E, 0x3E);
registerOutgoing(State.PLAY, 0x40, 0x41);
registerOutgoing(State.PLAY, 0x41, 0x42);
registerOutgoing(State.PLAY, 0x40, 0x40);
registerOutgoing(State.PLAY, 0x41, 0x41);
registerOutgoing(State.PLAY, 0x43, 0x44);
registerOutgoing(State.PLAY, 0x44, 0x45);
registerOutgoing(State.PLAY, 0x45, 0x46);
registerOutgoing(State.PLAY, 0x46, 0x47);
registerOutgoing(State.PLAY, 0x47, 0x48);
registerOutgoing(State.PLAY, 0x48, 0x49);
registerOutgoing(State.PLAY, 0x43, 0x43);
registerOutgoing(State.PLAY, 0x44, 0x44);
registerOutgoing(State.PLAY, 0x45, 0x45);
registerOutgoing(State.PLAY, 0x46, 0x46);
registerOutgoing(State.PLAY, 0x47, 0x47);
registerOutgoing(State.PLAY, 0x48, 0x48);
registerOutgoing(State.PLAY, 0x4A, 0x4B);
registerOutgoing(State.PLAY, 0x4B, 0x4C);
registerOutgoing(State.PLAY, 0x4C, 0x4D);
registerOutgoing(State.PLAY, 0x4A, 0x4A);
registerOutgoing(State.PLAY, 0x4B, 0x4B);
registerOutgoing(State.PLAY, 0x4C, 0x4C);
// Sound Effect
registerOutgoing(State.PLAY, 0x4D, 0x4E, new PacketRemapper() {
registerOutgoing(State.PLAY, 0x4D, 0x4D, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.VAR_INT); // Sound Id
@ -75,11 +76,11 @@ public class Protocol1_14To1_13_2 extends Protocol {
});
}
});
registerOutgoing(State.PLAY, 0x4E, 0x50);
registerOutgoing(State.PLAY, 0x4F, 0x51);
registerOutgoing(State.PLAY, 0x50, 0x52);
registerOutgoing(State.PLAY, 0x4E, 0x4F);
registerOutgoing(State.PLAY, 0x4F, 0x50);
registerOutgoing(State.PLAY, 0x50, 0x51);
registerOutgoing(State.PLAY, 0x51, 0x53, new PacketRemapper() {
registerOutgoing(State.PLAY, 0x51, 0x52, new PacketRemapper() {
@Override
public void registerMap() {
handler(new PacketHandler() {
@ -120,10 +121,10 @@ public class Protocol1_14To1_13_2 extends Protocol {
}
});
registerOutgoing(State.PLAY, 0x52, 0x54);
registerOutgoing(State.PLAY, 0x53, 0x55);
registerOutgoing(State.PLAY, 0x52, 0x53);
registerOutgoing(State.PLAY, 0x53, 0x54);
registerOutgoing(State.PLAY, 0x55, 0x57, new PacketRemapper() {
registerOutgoing(State.PLAY, 0x55, 0x56, new PacketRemapper() {
@Override
public void registerMap() {
handler(new PacketHandler() {

View File

@ -144,16 +144,22 @@ public class EntityPackets {
});
// Use bed
protocol.registerOutgoing(State.PLAY, 0x33, 0x34, new PacketRemapper() {
protocol.registerOutgoing(State.PLAY, 0x33, -1, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.VAR_INT);
map(Type.POSITION, Type.POSITION1_14);
handler(new PacketHandler() {
@Override
public void handle(PacketWrapper wrapper) throws Exception {
wrapper.cancel(); //TODO packet was removed - probably uses metadata now
}
});
}
});
// Destroy entities
protocol.registerOutgoing(State.PLAY, 0x35, 0x36, new PacketRemapper() {
protocol.registerOutgoing(State.PLAY, 0x35, 0x35, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.VAR_INT_ARRAY); // 0 - Entity IDS
@ -169,7 +175,7 @@ public class EntityPackets {
});
// Metadata packet
protocol.registerOutgoing(State.PLAY, 0x3F, 0x40, new PacketRemapper() {
protocol.registerOutgoing(State.PLAY, 0x3F, 0x3F, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.VAR_INT); // 0 - Entity ID

View File

@ -47,7 +47,7 @@ public class InventoryPackets {
wrapper.write(Type.VAR_INT, slots.intValue());
wrapper.write(Type.INT, entityId);
} else {
wrapper.setId(0x59);
wrapper.setId(0x58);
wrapper.write(Type.VAR_INT, windowsId.intValue());
int typeId = -1;
@ -152,7 +152,7 @@ public class InventoryPackets {
public void handle(PacketWrapper wrapper) throws Exception {
String channel = wrapper.get(Type.STRING, 0);
if (channel.equals("minecraft:trader_list") || channel.equals("trader_list")) {
wrapper.setId(0x5A);
wrapper.setId(0x59);
wrapper.resetReader();
wrapper.read(Type.STRING); // Remove channel
@ -188,7 +188,7 @@ public class InventoryPackets {
});
// Entity Equipment Packet
protocol.registerOutgoing(State.PLAY, 0x42, 0x43, new PacketRemapper() {
protocol.registerOutgoing(State.PLAY, 0x42, 0x42, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.VAR_INT); // 0 - Entity ID
@ -205,7 +205,7 @@ public class InventoryPackets {
});
// Declare Recipes
protocol.registerOutgoing(State.PLAY, 0x54, 0x56, new PacketRemapper() {
protocol.registerOutgoing(State.PLAY, 0x54, 0x55, new PacketRemapper() {
@Override
public void registerMap() {
handler(new PacketHandler() {

View File

@ -140,7 +140,7 @@ public class WorldPackets {
section.setNonAirBlocksCount(nonAirBlockCount);
}
PacketWrapper lightPacket = wrapper.create(0x58);
PacketWrapper lightPacket = wrapper.create(0x57);
lightPacket.write(Type.VAR_INT, chunk.getX());
lightPacket.write(Type.VAR_INT, chunk.getZ());
int skyLightMask = 0;
@ -275,7 +275,7 @@ public class WorldPackets {
});
//respawn
protocol.registerOutgoing(State.PLAY, 0x38, 0x39, new PacketRemapper() {
protocol.registerOutgoing(State.PLAY, 0x38, 0x38, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.INT); // 0 - Dimension ID
@ -291,7 +291,7 @@ public class WorldPackets {
});
// Spawn position
protocol.registerOutgoing(State.PLAY, 0x49, 0x4A, new PacketRemapper() {
protocol.registerOutgoing(State.PLAY, 0x49, 0x49, new PacketRemapper() {
@Override
public void registerMap() {
map(Type.POSITION, Type.POSITION1_14);

View File

@ -11754,86 +11754,87 @@
"790": "minecraft:iron_horse_armor",
"791": "minecraft:golden_horse_armor",
"792": "minecraft:diamond_horse_armor",
"793": "minecraft:lead",
"794": "minecraft:name_tag",
"795": "minecraft:command_block_minecart",
"796": "minecraft:mutton",
"797": "minecraft:cooked_mutton",
"798": "minecraft:white_banner",
"799": "minecraft:orange_banner",
"800": "minecraft:magenta_banner",
"801": "minecraft:light_blue_banner",
"802": "minecraft:yellow_banner",
"803": "minecraft:lime_banner",
"804": "minecraft:pink_banner",
"805": "minecraft:gray_banner",
"806": "minecraft:light_gray_banner",
"807": "minecraft:cyan_banner",
"808": "minecraft:purple_banner",
"809": "minecraft:blue_banner",
"810": "minecraft:brown_banner",
"811": "minecraft:green_banner",
"812": "minecraft:red_banner",
"813": "minecraft:black_banner",
"814": "minecraft:end_crystal",
"815": "minecraft:chorus_fruit",
"816": "minecraft:popped_chorus_fruit",
"817": "minecraft:beetroot",
"818": "minecraft:beetroot_seeds",
"819": "minecraft:beetroot_soup",
"820": "minecraft:dragon_breath",
"821": "minecraft:splash_potion",
"822": "minecraft:spectral_arrow",
"823": "minecraft:tipped_arrow",
"824": "minecraft:lingering_potion",
"825": "minecraft:shield",
"826": "minecraft:elytra",
"827": "minecraft:spruce_boat",
"828": "minecraft:birch_boat",
"829": "minecraft:jungle_boat",
"830": "minecraft:acacia_boat",
"831": "minecraft:dark_oak_boat",
"832": "minecraft:totem_of_undying",
"833": "minecraft:shulker_shell",
"834": "minecraft:iron_nugget",
"835": "minecraft:knowledge_book",
"836": "minecraft:debug_stick",
"837": "minecraft:music_disc_13",
"838": "minecraft:music_disc_cat",
"839": "minecraft:music_disc_blocks",
"840": "minecraft:music_disc_chirp",
"841": "minecraft:music_disc_far",
"842": "minecraft:music_disc_mall",
"843": "minecraft:music_disc_mellohi",
"844": "minecraft:music_disc_stal",
"845": "minecraft:music_disc_strad",
"846": "minecraft:music_disc_ward",
"847": "minecraft:music_disc_11",
"848": "minecraft:music_disc_wait",
"849": "minecraft:trident",
"850": "minecraft:phantom_membrane",
"851": "minecraft:nautilus_shell",
"852": "minecraft:heart_of_the_sea",
"853": "minecraft:crossbow",
"854": "minecraft:suspicious_stew",
"855": "minecraft:loom",
"856": "minecraft:flower_banner_pattern",
"857": "minecraft:creeper_banner_pattern",
"858": "minecraft:skull_banner_pattern",
"859": "minecraft:mojang_banner_pattern",
"860": "minecraft:barrel",
"861": "minecraft:smoker",
"862": "minecraft:blast_furnace",
"863": "minecraft:cartography_table",
"864": "minecraft:fletching_table",
"865": "minecraft:grindstone",
"866": "minecraft:lectern",
"867": "minecraft:smithing_table",
"868": "minecraft:stonecutter",
"869": "minecraft:bell",
"870": "minecraft:lantern",
"871": "minecraft:sweet_berries",
"872": "minecraft:campfire"
"793": "minecraft:leather_horse_armor",
"794": "minecraft:lead",
"795": "minecraft:name_tag",
"796": "minecraft:command_block_minecart",
"797": "minecraft:mutton",
"798": "minecraft:cooked_mutton",
"799": "minecraft:white_banner",
"800": "minecraft:orange_banner",
"801": "minecraft:magenta_banner",
"802": "minecraft:light_blue_banner",
"803": "minecraft:yellow_banner",
"804": "minecraft:lime_banner",
"805": "minecraft:pink_banner",
"806": "minecraft:gray_banner",
"807": "minecraft:light_gray_banner",
"808": "minecraft:cyan_banner",
"809": "minecraft:purple_banner",
"810": "minecraft:blue_banner",
"811": "minecraft:brown_banner",
"812": "minecraft:green_banner",
"813": "minecraft:red_banner",
"814": "minecraft:black_banner",
"815": "minecraft:end_crystal",
"816": "minecraft:chorus_fruit",
"817": "minecraft:popped_chorus_fruit",
"818": "minecraft:beetroot",
"819": "minecraft:beetroot_seeds",
"820": "minecraft:beetroot_soup",
"821": "minecraft:dragon_breath",
"822": "minecraft:splash_potion",
"823": "minecraft:spectral_arrow",
"824": "minecraft:tipped_arrow",
"825": "minecraft:lingering_potion",
"826": "minecraft:shield",
"827": "minecraft:elytra",
"828": "minecraft:spruce_boat",
"829": "minecraft:birch_boat",
"830": "minecraft:jungle_boat",
"831": "minecraft:acacia_boat",
"832": "minecraft:dark_oak_boat",
"833": "minecraft:totem_of_undying",
"834": "minecraft:shulker_shell",
"835": "minecraft:iron_nugget",
"836": "minecraft:knowledge_book",
"837": "minecraft:debug_stick",
"838": "minecraft:music_disc_13",
"839": "minecraft:music_disc_cat",
"840": "minecraft:music_disc_blocks",
"841": "minecraft:music_disc_chirp",
"842": "minecraft:music_disc_far",
"843": "minecraft:music_disc_mall",
"844": "minecraft:music_disc_mellohi",
"845": "minecraft:music_disc_stal",
"846": "minecraft:music_disc_strad",
"847": "minecraft:music_disc_ward",
"848": "minecraft:music_disc_11",
"849": "minecraft:music_disc_wait",
"850": "minecraft:trident",
"851": "minecraft:phantom_membrane",
"852": "minecraft:nautilus_shell",
"853": "minecraft:heart_of_the_sea",
"854": "minecraft:crossbow",
"855": "minecraft:suspicious_stew",
"856": "minecraft:loom",
"857": "minecraft:flower_banner_pattern",
"858": "minecraft:creeper_banner_pattern",
"859": "minecraft:skull_banner_pattern",
"860": "minecraft:mojang_banner_pattern",
"861": "minecraft:barrel",
"862": "minecraft:smoker",
"863": "minecraft:blast_furnace",
"864": "minecraft:cartography_table",
"865": "minecraft:fletching_table",
"866": "minecraft:grindstone",
"867": "minecraft:lectern",
"868": "minecraft:smithing_table",
"869": "minecraft:stonecutter",
"870": "minecraft:bell",
"871": "minecraft:lantern",
"872": "minecraft:sweet_berries",
"873": "minecraft:campfire"
},
"sounds": [
"ambient.cave",
@ -12063,11 +12064,11 @@
"item.flintandsteel.use",
"entity.fox.aggro",
"entity.fox.ambient",
"entity.fox.bark",
"entity.fox.bite",
"entity.fox.death",
"entity.fox.eat",
"entity.fox.hurt",
"entity.fox.screech",
"entity.fox.sleep",
"entity.fox.sniff",
"entity.fox.spit",
@ -12218,6 +12219,10 @@
"block.metal.step",
"entity.minecart.inside",
"entity.minecart.riding",
"entity.mooshroom.convert",
"entity.mooshroom.eat",
"entity.mooshroom.milk",
"entity.mooshroom.suspicious_milk",
"entity.mooshroom.shear",
"entity.mule.ambient",
"entity.mule.chest",

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>2.0.0-19w07a</version>
<version>2.0.0-19w08a</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<name>viaversion-jar</name>

View File

@ -6,7 +6,7 @@
<groupId>us.myles</groupId>
<artifactId>viaversion-parent</artifactId>
<version>2.0.0-19w07a</version>
<version>2.0.0-19w08a</version>
<packaging>pom</packaging>
<name>viaversion-parent</name>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>2.0.0-19w07a</version>
<version>2.0.0-19w08a</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>2.0.0-19w07a</version>
<version>2.0.0-19w08a</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>2.0.0-19w07a</version>
<version>2.0.0-19w08a</version>
</parent>
<modelVersion>4.0.0</modelVersion>