mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-28 11:28:02 +01:00
commit
aa2ff4b741
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>2.0.0-18w49a</version>
|
||||
<version>2.0.0-18w50a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>2.0.0-18w49a</version>
|
||||
<version>2.0.0-18w50a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>2.0.0-18w49a</version>
|
||||
<version>2.0.0-18w50a</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -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(450, "1.14"));
|
||||
register(v1_14 = new ProtocolVersion(451, "1.14"));
|
||||
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,41 @@ public class Protocol1_14To1_13_2 extends Protocol {
|
||||
WorldPackets.register(this);
|
||||
PlayerPackets.register(this);
|
||||
|
||||
registerOutgoing(State.PLAY, 0x2D, 0x2E);
|
||||
registerOutgoing(State.PLAY, 0x2E, 0x2F);
|
||||
registerOutgoing(State.PLAY, 0x2F, 0x30);
|
||||
registerOutgoing(State.PLAY, 0x30, 0x31);
|
||||
registerOutgoing(State.PLAY, 0x31, 0x32);
|
||||
registerOutgoing(State.PLAY, 0x32, 0x33);
|
||||
|
||||
registerOutgoing(State.PLAY, 0x34, 0x35);
|
||||
|
||||
registerOutgoing(State.PLAY, 0x36, 0x37);
|
||||
registerOutgoing(State.PLAY, 0x37, 0x38);
|
||||
|
||||
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, 0x40, 0x41);
|
||||
registerOutgoing(State.PLAY, 0x41, 0x42);
|
||||
|
||||
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, 0x4A, 0x4B);
|
||||
registerOutgoing(State.PLAY, 0x4B, 0x4C);
|
||||
registerOutgoing(State.PLAY, 0x4C, 0x4D);
|
||||
|
||||
// Sound Effect
|
||||
registerOutgoing(State.PLAY, 0x4D, 0x4D, new PacketRemapper() {
|
||||
registerOutgoing(State.PLAY, 0x4D, 0x4E, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // Sound Id
|
||||
@ -42,11 +75,11 @@ public class Protocol1_14To1_13_2 extends Protocol {
|
||||
});
|
||||
}
|
||||
});
|
||||
registerOutgoing(State.PLAY, 0x4E, 0x4F);
|
||||
registerOutgoing(State.PLAY, 0x4F, 0x50);
|
||||
registerOutgoing(State.PLAY, 0x50, 0x51);
|
||||
registerOutgoing(State.PLAY, 0x4E, 0x50);
|
||||
registerOutgoing(State.PLAY, 0x4F, 0x51);
|
||||
registerOutgoing(State.PLAY, 0x50, 0x52);
|
||||
|
||||
registerOutgoing(State.PLAY, 0x51, 0x52, new PacketRemapper() {
|
||||
registerOutgoing(State.PLAY, 0x51, 0x53, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(new PacketHandler() {
|
||||
@ -87,10 +120,10 @@ public class Protocol1_14To1_13_2 extends Protocol {
|
||||
}
|
||||
});
|
||||
|
||||
registerOutgoing(State.PLAY, 0x52, 0x53);
|
||||
registerOutgoing(State.PLAY, 0x53, 0x54);
|
||||
registerOutgoing(State.PLAY, 0x52, 0x54);
|
||||
registerOutgoing(State.PLAY, 0x53, 0x55);
|
||||
|
||||
registerOutgoing(State.PLAY, 0x55, 0x56, new PacketRemapper() {
|
||||
registerOutgoing(State.PLAY, 0x55, 0x57, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(new PacketHandler() {
|
||||
|
@ -132,7 +132,7 @@ public class EntityPackets {
|
||||
});
|
||||
|
||||
// Use bed
|
||||
protocol.registerOutgoing(State.PLAY, 0x33, 0x33, new PacketRemapper() {
|
||||
protocol.registerOutgoing(State.PLAY, 0x33, 0x34, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT);
|
||||
@ -141,7 +141,7 @@ public class EntityPackets {
|
||||
});
|
||||
|
||||
// Destroy entities
|
||||
protocol.registerOutgoing(State.PLAY, 0x35, 0x35, new PacketRemapper() {
|
||||
protocol.registerOutgoing(State.PLAY, 0x35, 0x36, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT_ARRAY); // 0 - Entity IDS
|
||||
@ -157,7 +157,7 @@ public class EntityPackets {
|
||||
});
|
||||
|
||||
// Metadata packet
|
||||
protocol.registerOutgoing(State.PLAY, 0x3F, 0x3F, new PacketRemapper() {
|
||||
protocol.registerOutgoing(State.PLAY, 0x3F, 0x40, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // 0 - Entity ID
|
||||
|
@ -92,7 +92,7 @@ public class InventoryPackets {
|
||||
});
|
||||
|
||||
// Entity Equipment Packet
|
||||
protocol.registerOutgoing(State.PLAY, 0x42, 0x42, new PacketRemapper() {
|
||||
protocol.registerOutgoing(State.PLAY, 0x42, 0x43, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // 0 - Entity ID
|
||||
@ -109,7 +109,7 @@ public class InventoryPackets {
|
||||
});
|
||||
|
||||
// Declare Recipes
|
||||
protocol.registerOutgoing(State.PLAY, 0x54, 0x55, new PacketRemapper() {
|
||||
protocol.registerOutgoing(State.PLAY, 0x54, 0x56, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(new PacketHandler() {
|
||||
|
@ -1,6 +1,8 @@
|
||||
package us.myles.ViaVersion.protocols.protocol1_14to1_13_2.packets;
|
||||
|
||||
import us.myles.ViaVersion.api.PacketWrapper;
|
||||
import us.myles.ViaVersion.api.protocol.Protocol;
|
||||
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;
|
||||
@ -10,7 +12,7 @@ public class PlayerPackets {
|
||||
public static void register(Protocol protocol) {
|
||||
|
||||
// Open Sign Editor
|
||||
protocol.registerOutgoing(State.PLAY, 0x2C, 0x2C, new PacketRemapper() {
|
||||
protocol.registerOutgoing(State.PLAY, 0x2C, 0x2D, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.POSITION, Type.POSITION1_14);
|
||||
@ -36,6 +38,34 @@ public class PlayerPackets {
|
||||
}
|
||||
});
|
||||
|
||||
// Recipe Book Data
|
||||
protocol.registerIncoming(State.PLAY, 0x1B, 0x1B, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT);
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
int type = wrapper.get(Type.VAR_INT, 0);
|
||||
if (type == 0) {
|
||||
wrapper.passthrough(Type.STRING);
|
||||
} else if (type == 1) {
|
||||
wrapper.passthrough(Type.BOOLEAN); // Crafting Recipe Book Open
|
||||
wrapper.passthrough(Type.BOOLEAN); // Crafting Recipe Filter Active
|
||||
wrapper.passthrough(Type.BOOLEAN); // Smelting Recipe Book Open
|
||||
wrapper.passthrough(Type.BOOLEAN); // Smelting Recipe Filter Active
|
||||
|
||||
// Unknown new booleans
|
||||
wrapper.read(Type.BOOLEAN);
|
||||
wrapper.read(Type.BOOLEAN);
|
||||
wrapper.read(Type.BOOLEAN);
|
||||
wrapper.read(Type.BOOLEAN);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Update Command Block
|
||||
protocol.registerIncoming(State.PLAY, 0x22, 0x22, new PacketRemapper() {
|
||||
@Override
|
||||
|
@ -136,7 +136,7 @@ public class WorldPackets {
|
||||
section.setNonAirBlocksCount(nonAirBlockCount);
|
||||
}
|
||||
|
||||
PacketWrapper lightPacket = wrapper.create(0x57);
|
||||
PacketWrapper lightPacket = wrapper.create(0x58);
|
||||
lightPacket.write(Type.VAR_INT, chunk.getX());
|
||||
lightPacket.write(Type.VAR_INT, chunk.getZ());
|
||||
int skyLightMask = 0;
|
||||
@ -249,7 +249,7 @@ public class WorldPackets {
|
||||
});
|
||||
|
||||
//respawn
|
||||
protocol.registerOutgoing(State.PLAY, 0x38, 0x38, new PacketRemapper() {
|
||||
protocol.registerOutgoing(State.PLAY, 0x38, 0x39, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.INT); // 0 - Dimension ID
|
||||
@ -265,7 +265,7 @@ public class WorldPackets {
|
||||
});
|
||||
|
||||
// Spawn position
|
||||
protocol.registerOutgoing(State.PLAY, 0x49, 0x49, new PacketRemapper() {
|
||||
protocol.registerOutgoing(State.PLAY, 0x49, 0x4A, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.POSITION, Type.POSITION1_14);
|
||||
|
@ -10865,34 +10865,38 @@
|
||||
"10862": "minecraft:lectern[facing=east]",
|
||||
"10863": "minecraft:smithing_table",
|
||||
"10864": "minecraft:stonecutter",
|
||||
"10865": "minecraft:bell[face=floor,facing=north]",
|
||||
"10866": "minecraft:bell[face=floor,facing=south]",
|
||||
"10867": "minecraft:bell[face=floor,facing=west]",
|
||||
"10868": "minecraft:bell[face=floor,facing=east]",
|
||||
"10869": "minecraft:bell[face=wall,facing=north]",
|
||||
"10870": "minecraft:bell[face=wall,facing=south]",
|
||||
"10871": "minecraft:bell[face=wall,facing=west]",
|
||||
"10872": "minecraft:bell[face=wall,facing=east]",
|
||||
"10873": "minecraft:bell[face=ceiling,facing=north]",
|
||||
"10874": "minecraft:bell[face=ceiling,facing=south]",
|
||||
"10875": "minecraft:bell[face=ceiling,facing=west]",
|
||||
"10876": "minecraft:bell[face=ceiling,facing=east]",
|
||||
"10877": "minecraft:lantern[hanging=true]",
|
||||
"10878": "minecraft:lantern[hanging=false]",
|
||||
"10879": "minecraft:sweet_berry_bush[age=0]",
|
||||
"10880": "minecraft:sweet_berry_bush[age=1]",
|
||||
"10881": "minecraft:sweet_berry_bush[age=2]",
|
||||
"10882": "minecraft:sweet_berry_bush[age=3]",
|
||||
"10883": "minecraft:structure_block[mode=save]",
|
||||
"10884": "minecraft:structure_block[mode=load]",
|
||||
"10885": "minecraft:structure_block[mode=corner]",
|
||||
"10886": "minecraft:structure_block[mode=data]",
|
||||
"10887": "minecraft:jigsaw[facing=north]",
|
||||
"10888": "minecraft:jigsaw[facing=east]",
|
||||
"10889": "minecraft:jigsaw[facing=south]",
|
||||
"10890": "minecraft:jigsaw[facing=west]",
|
||||
"10891": "minecraft:jigsaw[facing=up]",
|
||||
"10892": "minecraft:jigsaw[facing=down]"
|
||||
"10865": "minecraft:bell[attachment=floor,facing=north]",
|
||||
"10866": "minecraft:bell[attachment=floor,facing=south]",
|
||||
"10867": "minecraft:bell[attachment=floor,facing=west]",
|
||||
"10868": "minecraft:bell[attachment=floor,facing=east]",
|
||||
"10869": "minecraft:bell[attachment=ceiling,facing=north]",
|
||||
"10870": "minecraft:bell[attachment=ceiling,facing=south]",
|
||||
"10871": "minecraft:bell[attachment=ceiling,facing=west]",
|
||||
"10872": "minecraft:bell[attachment=ceiling,facing=east]",
|
||||
"10873": "minecraft:bell[attachment=single_wall,facing=north]",
|
||||
"10874": "minecraft:bell[attachment=single_wall,facing=south]",
|
||||
"10875": "minecraft:bell[attachment=single_wall,facing=west]",
|
||||
"10876": "minecraft:bell[attachment=single_wall,facing=east]",
|
||||
"10877": "minecraft:bell[attachment=double_wall,facing=north]",
|
||||
"10878": "minecraft:bell[attachment=double_wall,facing=south]",
|
||||
"10879": "minecraft:bell[attachment=double_wall,facing=west]",
|
||||
"10880": "minecraft:bell[attachment=double_wall,facing=east]",
|
||||
"10881": "minecraft:lantern[hanging=true]",
|
||||
"10882": "minecraft:lantern[hanging=false]",
|
||||
"10883": "minecraft:sweet_berry_bush[age=0]",
|
||||
"10884": "minecraft:sweet_berry_bush[age=1]",
|
||||
"10885": "minecraft:sweet_berry_bush[age=2]",
|
||||
"10886": "minecraft:sweet_berry_bush[age=3]",
|
||||
"10887": "minecraft:structure_block[mode=save]",
|
||||
"10888": "minecraft:structure_block[mode=load]",
|
||||
"10889": "minecraft:structure_block[mode=corner]",
|
||||
"10890": "minecraft:structure_block[mode=data]",
|
||||
"10891": "minecraft:jigsaw[facing=north]",
|
||||
"10892": "minecraft:jigsaw[facing=east]",
|
||||
"10893": "minecraft:jigsaw[facing=south]",
|
||||
"10894": "minecraft:jigsaw[facing=west]",
|
||||
"10895": "minecraft:jigsaw[facing=up]",
|
||||
"10896": "minecraft:jigsaw[facing=down]"
|
||||
},
|
||||
"items": {
|
||||
"0": "minecraft:air",
|
||||
@ -11813,6 +11817,7 @@
|
||||
"block.beacon.ambient",
|
||||
"block.beacon.deactivate",
|
||||
"block.beacon.power_select",
|
||||
"block.bell.use",
|
||||
"entity.blaze.ambient",
|
||||
"entity.blaze.burn",
|
||||
"entity.blaze.death",
|
||||
@ -12250,8 +12255,7 @@
|
||||
"entity.rabbit.death",
|
||||
"entity.rabbit.hurt",
|
||||
"entity.rabbit.jump",
|
||||
"event.raid.horn_local",
|
||||
"event.raid.horn_distant",
|
||||
"event.raid.horn",
|
||||
"music_disc.11",
|
||||
"music_disc.13",
|
||||
"music_disc.blocks",
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>2.0.0-18w49a</version>
|
||||
<version>2.0.0-18w50a</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>2.0.0-18w49a</version>
|
||||
<version>2.0.0-18w50a</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>viaversion-parent</name>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>2.0.0-18w49a</version>
|
||||
<version>2.0.0-18w50a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>2.0.0-18w49a</version>
|
||||
<version>2.0.0-18w50a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>2.0.0-18w49a</version>
|
||||
<version>2.0.0-18w50a</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user