Merge pull request #851 from creeper123123321/dev

1.13-pre8
This commit is contained in:
Myles 2018-07-13 19:35:30 +01:00 committed by GitHub
commit e8cb0f561e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 542 additions and 484 deletions

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.4.0-1.13-pre7</version>
<version>1.4.0-1.13-pre8</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.4.0-1.13-pre7</version>
<version>1.4.0-1.13-pre8</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.4.0-1.13-pre7</version>
<version>1.4.0-1.13-pre8</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -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(389, "1.13-pre7"));
register(v1_13 = new ProtocolVersion(390, "1.13-pre8"));
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
}

View File

@ -336,7 +336,10 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
byte mode = wrapper.get(Type.BYTE, 0);
// On create or update
if (mode == 0 || mode == 2) {
wrapper.passthrough(Type.STRING); // Value
String value = wrapper.read(Type.STRING); // Value
value = legacyTextToJson(value);
wrapper.write(Type.STRING, value);
String type = wrapper.read(Type.STRING);
// integer or hearts
wrapper.write(Type.VAR_INT, type.equals("integer") ? 0 : 1);
@ -360,7 +363,9 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
byte action = wrapper.get(Type.BYTE, 0);
if (action == 0 || action == 2) {
wrapper.passthrough(Type.STRING); // Display Name
String displayName = wrapper.read(Type.STRING); // Display Name
displayName = legacyTextToJson(displayName);
wrapper.write(Type.STRING, displayName);
String prefix = wrapper.read(Type.STRING); // Prefix moved
String suffix = wrapper.read(Type.STRING); // Suffix moved

View File

@ -111,17 +111,20 @@ public class InventoryPackets {
int size = wrapper.passthrough(Type.UNSIGNED_BYTE);
for (int i = 0; i < size; i++) {
// Input Item
Item input = wrapper.passthrough(Type.ITEM);
Item input = wrapper.read(Type.ITEM);
InventoryPackets.toClient(input);
wrapper.write(Type.FLAT_ITEM, input);
// Output Item
Item output = wrapper.passthrough(Type.ITEM);
Item output = wrapper.read(Type.ITEM);
InventoryPackets.toClient(output);
wrapper.write(Type.FLAT_ITEM, output);
boolean secondItem = wrapper.passthrough(Type.BOOLEAN); // Has second item
if (secondItem) {
// Second Item
Item second = wrapper.passthrough(Type.ITEM);
Item second = wrapper.read(Type.ITEM);
InventoryPackets.toClient(second);
wrapper.write(Type.FLAT_ITEM, second);
}
wrapper.passthrough(Type.BOOLEAN); // Trade disabled

View File

@ -1141,8 +1141,8 @@
"2597": "minecraft:dark_oak_log[axis=x]",
"2600": "minecraft:acacia_log[axis=z]",
"2601": "minecraft:dark_oak_log[axis=z]",
"2604": "minecraft:acacia_bark[axis=y]",
"2605": "minecraft:dark_oak_bark[axis=y]",
"2604": "minecraft:acacia_wood[axis=y]",
"2605": "minecraft:dark_oak_wood[axis=y]",
"2608": "minecraft:acacia_stairs[facing=east,half=bottom,shape=straight,waterlogged=false]",
"2609": "minecraft:acacia_stairs[facing=west,half=bottom,shape=straight,waterlogged=false]",
"2610": "minecraft:acacia_stairs[facing=south,half=bottom,shape=straight,waterlogged=false]",
@ -1792,7 +1792,7 @@
"768": "minecraft:mossy_cobblestone",
"784": "minecraft:obsidian",
"800": "minecraft:torch",
"832": "minecraft:mob_spawner",
"832": "minecraft:spawner",
"848": "minecraft:oak_stairs",
"864": "minecraft:chest",
"896": "minecraft:diamond_ore",
@ -2344,7 +2344,7 @@
"25100295": "minecraft:elder_guardian_spawn_egg",
"25100296": "minecraft:enderman_spawn_egg",
"25100297": "minecraft:endermite_spawn_egg",
"25100298": "minecraft:evoker_illager_spawn_egg",
"25100298": "minecraft:evoker_spawn_egg",
"25100299": "minecraft:ghast_spawn_egg",
"25100300": "minecraft:guardian_spawn_egg",
"25100301": "minecraft:horse_spawn_egg",
@ -2369,7 +2369,7 @@
"25100320": "minecraft:stray_spawn_egg",
"25100321": "minecraft:vex_spawn_egg",
"25100322": "minecraft:villager_spawn_egg",
"25100323": "minecraft:vindicator_illager_spawn_egg",
"25100323": "minecraft:vindicator_spawn_egg",
"25100324": "minecraft:witch_spawn_egg",
"25100325": "minecraft:wither_skeleton_spawn_egg",
"25100326": "minecraft:wolf_spawn_egg",

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.4.0-1.13-pre7</version>
<version>1.4.0-1.13-pre8</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>1.4.0-1.13-pre7</version>
<version>1.4.0-1.13-pre8</version>
<packaging>pom</packaging>
<name>viaversion-parent</name>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.4.0-1.13-pre7</version>
<version>1.4.0-1.13-pre8</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>viaversion-parent</artifactId>
<groupId>us.myles</groupId>
<version>1.4.0-1.13-pre7</version>
<version>1.4.0-1.13-pre8</version>
</parent>
<modelVersion>4.0.0</modelVersion>