mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-28 19:38:32 +01:00
commit
f170aed1b9
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>2.0.0-19w07a</version>
|
<version>2.0.0-19w08b</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>2.0.0-19w07a</version>
|
<version>2.0.0-19w08b</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>2.0.0-19w07a</version>
|
<version>2.0.0-19w08b</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
@ -67,7 +67,7 @@ public class ProtocolVersion {
|
|||||||
register(v1_13 = new ProtocolVersion(393, "1.13"));
|
register(v1_13 = new ProtocolVersion(393, "1.13"));
|
||||||
register(v1_13_1 = new ProtocolVersion(401, "1.13.1"));
|
register(v1_13_1 = new ProtocolVersion(401, "1.13.1"));
|
||||||
register(v1_13_2 = new ProtocolVersion(404, "1.13.2"));
|
register(v1_13_2 = new ProtocolVersion(404, "1.13.2"));
|
||||||
register(v1_14 = new ProtocolVersion(460, "1.14"));
|
register(v1_14 = new ProtocolVersion(462, "1.14"));
|
||||||
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package us.myles.ViaVersion.protocols.protocol1_14to1_13_2;
|
package us.myles.ViaVersion.protocols.protocol1_14to1_13_2;
|
||||||
|
|
||||||
|
import us.myles.ViaVersion.api.PacketWrapper;
|
||||||
import us.myles.ViaVersion.api.Via;
|
import us.myles.ViaVersion.api.Via;
|
||||||
import us.myles.ViaVersion.api.data.UserConnection;
|
import us.myles.ViaVersion.api.data.UserConnection;
|
||||||
import us.myles.ViaVersion.api.entities.Entity1_14Types;
|
import us.myles.ViaVersion.api.entities.Entity1_14Types;
|
||||||
@ -7,6 +8,7 @@ import us.myles.ViaVersion.api.minecraft.VillagerData;
|
|||||||
import us.myles.ViaVersion.api.minecraft.item.Item;
|
import us.myles.ViaVersion.api.minecraft.item.Item;
|
||||||
import us.myles.ViaVersion.api.minecraft.metadata.Metadata;
|
import us.myles.ViaVersion.api.minecraft.metadata.Metadata;
|
||||||
import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_14;
|
import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_14;
|
||||||
|
import us.myles.ViaVersion.api.type.Type;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.packets.InventoryPackets;
|
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.packets.InventoryPackets;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.storage.EntityTracker;
|
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.storage.EntityTracker;
|
||||||
|
|
||||||
@ -32,20 +34,54 @@ public class MetadataRewriter {
|
|||||||
|
|
||||||
if (type == null) continue;
|
if (type == null) continue;
|
||||||
|
|
||||||
if (type.isOrHasParent(Entity1_14Types.EntityType.MINECART_ABSTRACT) && metadata.getId() == 9) {
|
//Metadata 6 added to abstract_entity
|
||||||
|
if (metadata.getId() > 5) {
|
||||||
|
metadata.setId(metadata.getId() + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Metadata 12 added to living_entity
|
||||||
|
if (metadata.getId() > 11 && type.isOrHasParent(Entity1_14Types.EntityType.LIVINGENTITY)) {
|
||||||
|
metadata.setId(metadata.getId() + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type.isOrHasParent(Entity1_14Types.EntityType.MINECART_ABSTRACT)) {
|
||||||
|
if (metadata.getId() == 10) {
|
||||||
// New block format
|
// New block format
|
||||||
int data = (int) metadata.getValue();
|
int data = (int) metadata.getValue();
|
||||||
metadata.setValue(Protocol1_14To1_13_2.getNewBlockStateId(data));
|
metadata.setValue(Protocol1_14To1_13_2.getNewBlockStateId(data));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type.is(Entity1_14Types.EntityType.HORSE)) {
|
||||||
|
if (metadata.getId() == 18) {
|
||||||
|
metadatas.remove(metadata);
|
||||||
|
|
||||||
|
int armorType = (int) metadata.getValue();
|
||||||
|
Item armorItem = null;
|
||||||
|
if (armorType == 1) { //iron armor
|
||||||
|
armorItem = new Item(InventoryPackets.getNewItemId(727), (byte) 1, (short) 0, null);
|
||||||
|
} else if (armorType == 2) { //gold armor
|
||||||
|
armorItem = new Item(InventoryPackets.getNewItemId(728), (byte) 1, (short) 0, null);
|
||||||
|
} else if (armorType == 3) { //diamond armor
|
||||||
|
armorItem = new Item(InventoryPackets.getNewItemId(729), (byte) 1, (short) 0, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
PacketWrapper equipmentPacket = new PacketWrapper(0x42, null, connection);
|
||||||
|
equipmentPacket.write(Type.VAR_INT, entityId);
|
||||||
|
equipmentPacket.write(Type.VAR_INT, 4);
|
||||||
|
equipmentPacket.write(Type.FLAT_VAR_INT_ITEM, armorItem);
|
||||||
|
equipmentPacket.send(Protocol1_14To1_13_2.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (type.is(Entity1_14Types.EntityType.VILLAGER)) {
|
if (type.is(Entity1_14Types.EntityType.VILLAGER)) {
|
||||||
if (metadata.getId() == 13) {
|
if (metadata.getId() == 15) {
|
||||||
// plains
|
// plains
|
||||||
metadata.setValue(new VillagerData(2, getNewProfessionId((int) metadata.getValue()), 0));
|
metadata.setValue(new VillagerData(2, getNewProfessionId((int) metadata.getValue()), 0));
|
||||||
metadata.setMetaType(MetaType1_14.VillagerData);
|
metadata.setMetaType(MetaType1_14.VillagerData);
|
||||||
}
|
}
|
||||||
} else if (type.is(Entity1_14Types.EntityType.ZOMBIE_VILLAGER)) {
|
} else if (type.is(Entity1_14Types.EntityType.ZOMBIE_VILLAGER)) {
|
||||||
if (metadata.getId() == 17) {
|
if (metadata.getId() == 19) {
|
||||||
// plains
|
// plains
|
||||||
metadata.setValue(new VillagerData(2, getNewProfessionId((int) metadata.getValue()), 0));
|
metadata.setValue(new VillagerData(2, getNewProfessionId((int) metadata.getValue()), 0));
|
||||||
metadata.setMetaType(MetaType1_14.VillagerData);
|
metadata.setMetaType(MetaType1_14.VillagerData);
|
||||||
@ -53,13 +89,13 @@ public class MetadataRewriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type.isOrHasParent(Entity1_14Types.EntityType.ARROW)) {
|
if (type.isOrHasParent(Entity1_14Types.EntityType.ARROW)) {
|
||||||
if (metadata.getId() >= 8) {
|
if (metadata.getId() >= 9) {
|
||||||
metadata.setId(metadata.getId() + 1);
|
metadata.setId(metadata.getId() + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type.is(Entity1_14Types.EntityType.FIREWORKS_ROCKET)) {
|
if (type.is(Entity1_14Types.EntityType.FIREWORKS_ROCKET)) {
|
||||||
if (metadata.getId() == 7) {
|
if (metadata.getId() == 8) {
|
||||||
if (metadata.getValue().equals(0)) metadata.setValue(null); // https://bugs.mojang.com/browse/MC-111480
|
if (metadata.getValue().equals(0)) metadata.setValue(null); // https://bugs.mojang.com/browse/MC-111480
|
||||||
metadata.setMetaType(MetaType1_14.OptVarInt);
|
metadata.setMetaType(MetaType1_14.OptVarInt);
|
||||||
}
|
}
|
||||||
|
@ -36,34 +36,35 @@ public class Protocol1_14To1_13_2 extends Protocol {
|
|||||||
registerOutgoing(State.PLAY, 0x31, 0x32);
|
registerOutgoing(State.PLAY, 0x31, 0x32);
|
||||||
registerOutgoing(State.PLAY, 0x32, 0x33);
|
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, 0x36, 0x36);
|
||||||
registerOutgoing(State.PLAY, 0x37, 0x38);
|
registerOutgoing(State.PLAY, 0x37, 0x37);
|
||||||
|
|
||||||
registerOutgoing(State.PLAY, 0x39, 0x3A);
|
registerOutgoing(State.PLAY, 0x39, 0x39);
|
||||||
registerOutgoing(State.PLAY, 0x3A, 0x3B);
|
registerOutgoing(State.PLAY, 0x3A, 0x3A);
|
||||||
registerOutgoing(State.PLAY, 0x3B, 0x3C);
|
registerOutgoing(State.PLAY, 0x3B, 0x3B);
|
||||||
registerOutgoing(State.PLAY, 0x3C, 0x3D);
|
registerOutgoing(State.PLAY, 0x3C, 0x3C);
|
||||||
registerOutgoing(State.PLAY, 0x3D, 0x3E);
|
registerOutgoing(State.PLAY, 0x3D, 0x3D);
|
||||||
registerOutgoing(State.PLAY, 0x3E, 0x3F);
|
registerOutgoing(State.PLAY, 0x3E, 0x3E);
|
||||||
|
|
||||||
registerOutgoing(State.PLAY, 0x40, 0x41);
|
registerOutgoing(State.PLAY, 0x40, 0x40);
|
||||||
registerOutgoing(State.PLAY, 0x41, 0x42);
|
registerOutgoing(State.PLAY, 0x41, 0x41);
|
||||||
|
|
||||||
registerOutgoing(State.PLAY, 0x43, 0x44);
|
registerOutgoing(State.PLAY, 0x43, 0x43);
|
||||||
registerOutgoing(State.PLAY, 0x44, 0x45);
|
registerOutgoing(State.PLAY, 0x44, 0x44);
|
||||||
registerOutgoing(State.PLAY, 0x45, 0x46);
|
registerOutgoing(State.PLAY, 0x45, 0x45);
|
||||||
registerOutgoing(State.PLAY, 0x46, 0x47);
|
registerOutgoing(State.PLAY, 0x46, 0x46);
|
||||||
registerOutgoing(State.PLAY, 0x47, 0x48);
|
registerOutgoing(State.PLAY, 0x47, 0x47);
|
||||||
registerOutgoing(State.PLAY, 0x48, 0x49);
|
registerOutgoing(State.PLAY, 0x48, 0x48);
|
||||||
|
|
||||||
registerOutgoing(State.PLAY, 0x4A, 0x4B);
|
registerOutgoing(State.PLAY, 0x4A, 0x4A);
|
||||||
registerOutgoing(State.PLAY, 0x4B, 0x4C);
|
registerOutgoing(State.PLAY, 0x4B, 0x4B);
|
||||||
registerOutgoing(State.PLAY, 0x4C, 0x4D);
|
registerOutgoing(State.PLAY, 0x4C, 0x4C);
|
||||||
|
|
||||||
// Sound Effect
|
// Sound Effect
|
||||||
registerOutgoing(State.PLAY, 0x4D, 0x4E, new PacketRemapper() {
|
registerOutgoing(State.PLAY, 0x4D, 0x4D, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.VAR_INT); // Sound Id
|
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, 0x4E, 0x4F);
|
||||||
registerOutgoing(State.PLAY, 0x4F, 0x51);
|
registerOutgoing(State.PLAY, 0x4F, 0x50);
|
||||||
registerOutgoing(State.PLAY, 0x50, 0x52);
|
registerOutgoing(State.PLAY, 0x50, 0x51);
|
||||||
|
|
||||||
registerOutgoing(State.PLAY, 0x51, 0x53, new PacketRemapper() {
|
registerOutgoing(State.PLAY, 0x51, 0x52, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
handler(new PacketHandler() {
|
handler(new PacketHandler() {
|
||||||
@ -120,10 +121,10 @@ public class Protocol1_14To1_13_2 extends Protocol {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
registerOutgoing(State.PLAY, 0x52, 0x54);
|
registerOutgoing(State.PLAY, 0x52, 0x53);
|
||||||
registerOutgoing(State.PLAY, 0x53, 0x55);
|
registerOutgoing(State.PLAY, 0x53, 0x54);
|
||||||
|
|
||||||
registerOutgoing(State.PLAY, 0x55, 0x57, new PacketRemapper() {
|
registerOutgoing(State.PLAY, 0x55, 0x56, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
handler(new PacketHandler() {
|
handler(new PacketHandler() {
|
||||||
|
@ -4,6 +4,9 @@ import com.google.common.base.Optional;
|
|||||||
import us.myles.ViaVersion.api.PacketWrapper;
|
import us.myles.ViaVersion.api.PacketWrapper;
|
||||||
import us.myles.ViaVersion.api.entities.Entity1_13Types;
|
import us.myles.ViaVersion.api.entities.Entity1_13Types;
|
||||||
import us.myles.ViaVersion.api.entities.Entity1_14Types;
|
import us.myles.ViaVersion.api.entities.Entity1_14Types;
|
||||||
|
import us.myles.ViaVersion.api.minecraft.Position;
|
||||||
|
import us.myles.ViaVersion.api.minecraft.metadata.Metadata;
|
||||||
|
import us.myles.ViaVersion.api.minecraft.metadata.types.MetaType1_14;
|
||||||
import us.myles.ViaVersion.api.protocol.Protocol;
|
import us.myles.ViaVersion.api.protocol.Protocol;
|
||||||
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
import us.myles.ViaVersion.api.remapper.PacketHandler;
|
||||||
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
||||||
@ -16,6 +19,8 @@ import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.Protocol1_14To1_13_2;
|
|||||||
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.data.EntityTypeRewriter;
|
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.data.EntityTypeRewriter;
|
||||||
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.storage.EntityTracker;
|
import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.storage.EntityTracker;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public class EntityPackets {
|
public class EntityPackets {
|
||||||
@ -143,17 +148,47 @@ public class EntityPackets {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Use bed
|
// Animation
|
||||||
protocol.registerOutgoing(State.PLAY, 0x33, 0x34, new PacketRemapper() {
|
protocol.registerOutgoing(State.PLAY, 0x06, 0x06, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.VAR_INT);
|
map(Type.VAR_INT);
|
||||||
map(Type.POSITION, Type.POSITION1_14);
|
handler(new PacketHandler() {
|
||||||
|
@Override
|
||||||
|
public void handle(PacketWrapper wrapper) throws Exception {
|
||||||
|
short animation = wrapper.passthrough(Type.UNSIGNED_BYTE);
|
||||||
|
if (animation == 2) { //Leave bed
|
||||||
|
PacketWrapper metadataPacket = wrapper.create(0x3F);
|
||||||
|
metadataPacket.write(Type.VAR_INT, wrapper.get(Type.VAR_INT, 0));
|
||||||
|
List<Metadata> metadataList = new LinkedList<>();
|
||||||
|
metadataList.add(new Metadata(12, MetaType1_14.OptPosition, null));
|
||||||
|
metadataPacket.write(Types1_14.METADATA_LIST, metadataList);
|
||||||
|
metadataPacket.send(Protocol1_14To1_13_2.class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Use bed
|
||||||
|
protocol.registerOutgoing(State.PLAY, 0x33, 0x3F, new PacketRemapper() {
|
||||||
|
@Override
|
||||||
|
public void registerMap() {
|
||||||
|
map(Type.VAR_INT);
|
||||||
|
handler(new PacketHandler() {
|
||||||
|
@Override
|
||||||
|
public void handle(PacketWrapper wrapper) throws Exception {
|
||||||
|
Position position = wrapper.read(Type.POSITION);
|
||||||
|
List<Metadata> metadataList = new LinkedList<>();
|
||||||
|
metadataList.add(new Metadata(12, MetaType1_14.OptPosition, position));
|
||||||
|
wrapper.write(Types1_14.METADATA_LIST, metadataList);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Destroy entities
|
// Destroy entities
|
||||||
protocol.registerOutgoing(State.PLAY, 0x35, 0x36, new PacketRemapper() {
|
protocol.registerOutgoing(State.PLAY, 0x35, 0x35, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.VAR_INT_ARRAY); // 0 - Entity IDS
|
map(Type.VAR_INT_ARRAY); // 0 - Entity IDS
|
||||||
@ -169,7 +204,7 @@ public class EntityPackets {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Metadata packet
|
// Metadata packet
|
||||||
protocol.registerOutgoing(State.PLAY, 0x3F, 0x40, new PacketRemapper() {
|
protocol.registerOutgoing(State.PLAY, 0x3F, 0x3F, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.VAR_INT); // 0 - Entity ID
|
map(Type.VAR_INT); // 0 - Entity ID
|
||||||
|
@ -47,7 +47,7 @@ public class InventoryPackets {
|
|||||||
wrapper.write(Type.VAR_INT, slots.intValue());
|
wrapper.write(Type.VAR_INT, slots.intValue());
|
||||||
wrapper.write(Type.INT, entityId);
|
wrapper.write(Type.INT, entityId);
|
||||||
} else {
|
} else {
|
||||||
wrapper.setId(0x59);
|
wrapper.setId(0x58);
|
||||||
wrapper.write(Type.VAR_INT, windowsId.intValue());
|
wrapper.write(Type.VAR_INT, windowsId.intValue());
|
||||||
|
|
||||||
int typeId = -1;
|
int typeId = -1;
|
||||||
@ -152,7 +152,7 @@ public class InventoryPackets {
|
|||||||
public void handle(PacketWrapper wrapper) throws Exception {
|
public void handle(PacketWrapper wrapper) throws Exception {
|
||||||
String channel = wrapper.get(Type.STRING, 0);
|
String channel = wrapper.get(Type.STRING, 0);
|
||||||
if (channel.equals("minecraft:trader_list") || channel.equals("trader_list")) {
|
if (channel.equals("minecraft:trader_list") || channel.equals("trader_list")) {
|
||||||
wrapper.setId(0x5A);
|
wrapper.setId(0x59);
|
||||||
wrapper.resetReader();
|
wrapper.resetReader();
|
||||||
wrapper.read(Type.STRING); // Remove channel
|
wrapper.read(Type.STRING); // Remove channel
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ public class InventoryPackets {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Entity Equipment Packet
|
// Entity Equipment Packet
|
||||||
protocol.registerOutgoing(State.PLAY, 0x42, 0x43, new PacketRemapper() {
|
protocol.registerOutgoing(State.PLAY, 0x42, 0x42, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.VAR_INT); // 0 - Entity ID
|
map(Type.VAR_INT); // 0 - Entity ID
|
||||||
@ -205,7 +205,7 @@ public class InventoryPackets {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Declare Recipes
|
// Declare Recipes
|
||||||
protocol.registerOutgoing(State.PLAY, 0x54, 0x56, new PacketRemapper() {
|
protocol.registerOutgoing(State.PLAY, 0x54, 0x55, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
handler(new PacketHandler() {
|
handler(new PacketHandler() {
|
||||||
|
@ -140,7 +140,7 @@ public class WorldPackets {
|
|||||||
section.setNonAirBlocksCount(nonAirBlockCount);
|
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.getX());
|
||||||
lightPacket.write(Type.VAR_INT, chunk.getZ());
|
lightPacket.write(Type.VAR_INT, chunk.getZ());
|
||||||
int skyLightMask = 0;
|
int skyLightMask = 0;
|
||||||
@ -275,7 +275,7 @@ public class WorldPackets {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//respawn
|
//respawn
|
||||||
protocol.registerOutgoing(State.PLAY, 0x38, 0x39, new PacketRemapper() {
|
protocol.registerOutgoing(State.PLAY, 0x38, 0x38, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.INT); // 0 - Dimension ID
|
map(Type.INT); // 0 - Dimension ID
|
||||||
@ -291,7 +291,7 @@ public class WorldPackets {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Spawn position
|
// Spawn position
|
||||||
protocol.registerOutgoing(State.PLAY, 0x49, 0x4A, new PacketRemapper() {
|
protocol.registerOutgoing(State.PLAY, 0x49, 0x49, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
map(Type.POSITION, Type.POSITION1_14);
|
map(Type.POSITION, Type.POSITION1_14);
|
||||||
|
@ -11754,86 +11754,87 @@
|
|||||||
"790": "minecraft:iron_horse_armor",
|
"790": "minecraft:iron_horse_armor",
|
||||||
"791": "minecraft:golden_horse_armor",
|
"791": "minecraft:golden_horse_armor",
|
||||||
"792": "minecraft:diamond_horse_armor",
|
"792": "minecraft:diamond_horse_armor",
|
||||||
"793": "minecraft:lead",
|
"793": "minecraft:leather_horse_armor",
|
||||||
"794": "minecraft:name_tag",
|
"794": "minecraft:lead",
|
||||||
"795": "minecraft:command_block_minecart",
|
"795": "minecraft:name_tag",
|
||||||
"796": "minecraft:mutton",
|
"796": "minecraft:command_block_minecart",
|
||||||
"797": "minecraft:cooked_mutton",
|
"797": "minecraft:mutton",
|
||||||
"798": "minecraft:white_banner",
|
"798": "minecraft:cooked_mutton",
|
||||||
"799": "minecraft:orange_banner",
|
"799": "minecraft:white_banner",
|
||||||
"800": "minecraft:magenta_banner",
|
"800": "minecraft:orange_banner",
|
||||||
"801": "minecraft:light_blue_banner",
|
"801": "minecraft:magenta_banner",
|
||||||
"802": "minecraft:yellow_banner",
|
"802": "minecraft:light_blue_banner",
|
||||||
"803": "minecraft:lime_banner",
|
"803": "minecraft:yellow_banner",
|
||||||
"804": "minecraft:pink_banner",
|
"804": "minecraft:lime_banner",
|
||||||
"805": "minecraft:gray_banner",
|
"805": "minecraft:pink_banner",
|
||||||
"806": "minecraft:light_gray_banner",
|
"806": "minecraft:gray_banner",
|
||||||
"807": "minecraft:cyan_banner",
|
"807": "minecraft:light_gray_banner",
|
||||||
"808": "minecraft:purple_banner",
|
"808": "minecraft:cyan_banner",
|
||||||
"809": "minecraft:blue_banner",
|
"809": "minecraft:purple_banner",
|
||||||
"810": "minecraft:brown_banner",
|
"810": "minecraft:blue_banner",
|
||||||
"811": "minecraft:green_banner",
|
"811": "minecraft:brown_banner",
|
||||||
"812": "minecraft:red_banner",
|
"812": "minecraft:green_banner",
|
||||||
"813": "minecraft:black_banner",
|
"813": "minecraft:red_banner",
|
||||||
"814": "minecraft:end_crystal",
|
"814": "minecraft:black_banner",
|
||||||
"815": "minecraft:chorus_fruit",
|
"815": "minecraft:end_crystal",
|
||||||
"816": "minecraft:popped_chorus_fruit",
|
"816": "minecraft:chorus_fruit",
|
||||||
"817": "minecraft:beetroot",
|
"817": "minecraft:popped_chorus_fruit",
|
||||||
"818": "minecraft:beetroot_seeds",
|
"818": "minecraft:beetroot",
|
||||||
"819": "minecraft:beetroot_soup",
|
"819": "minecraft:beetroot_seeds",
|
||||||
"820": "minecraft:dragon_breath",
|
"820": "minecraft:beetroot_soup",
|
||||||
"821": "minecraft:splash_potion",
|
"821": "minecraft:dragon_breath",
|
||||||
"822": "minecraft:spectral_arrow",
|
"822": "minecraft:splash_potion",
|
||||||
"823": "minecraft:tipped_arrow",
|
"823": "minecraft:spectral_arrow",
|
||||||
"824": "minecraft:lingering_potion",
|
"824": "minecraft:tipped_arrow",
|
||||||
"825": "minecraft:shield",
|
"825": "minecraft:lingering_potion",
|
||||||
"826": "minecraft:elytra",
|
"826": "minecraft:shield",
|
||||||
"827": "minecraft:spruce_boat",
|
"827": "minecraft:elytra",
|
||||||
"828": "minecraft:birch_boat",
|
"828": "minecraft:spruce_boat",
|
||||||
"829": "minecraft:jungle_boat",
|
"829": "minecraft:birch_boat",
|
||||||
"830": "minecraft:acacia_boat",
|
"830": "minecraft:jungle_boat",
|
||||||
"831": "minecraft:dark_oak_boat",
|
"831": "minecraft:acacia_boat",
|
||||||
"832": "minecraft:totem_of_undying",
|
"832": "minecraft:dark_oak_boat",
|
||||||
"833": "minecraft:shulker_shell",
|
"833": "minecraft:totem_of_undying",
|
||||||
"834": "minecraft:iron_nugget",
|
"834": "minecraft:shulker_shell",
|
||||||
"835": "minecraft:knowledge_book",
|
"835": "minecraft:iron_nugget",
|
||||||
"836": "minecraft:debug_stick",
|
"836": "minecraft:knowledge_book",
|
||||||
"837": "minecraft:music_disc_13",
|
"837": "minecraft:debug_stick",
|
||||||
"838": "minecraft:music_disc_cat",
|
"838": "minecraft:music_disc_13",
|
||||||
"839": "minecraft:music_disc_blocks",
|
"839": "minecraft:music_disc_cat",
|
||||||
"840": "minecraft:music_disc_chirp",
|
"840": "minecraft:music_disc_blocks",
|
||||||
"841": "minecraft:music_disc_far",
|
"841": "minecraft:music_disc_chirp",
|
||||||
"842": "minecraft:music_disc_mall",
|
"842": "minecraft:music_disc_far",
|
||||||
"843": "minecraft:music_disc_mellohi",
|
"843": "minecraft:music_disc_mall",
|
||||||
"844": "minecraft:music_disc_stal",
|
"844": "minecraft:music_disc_mellohi",
|
||||||
"845": "minecraft:music_disc_strad",
|
"845": "minecraft:music_disc_stal",
|
||||||
"846": "minecraft:music_disc_ward",
|
"846": "minecraft:music_disc_strad",
|
||||||
"847": "minecraft:music_disc_11",
|
"847": "minecraft:music_disc_ward",
|
||||||
"848": "minecraft:music_disc_wait",
|
"848": "minecraft:music_disc_11",
|
||||||
"849": "minecraft:trident",
|
"849": "minecraft:music_disc_wait",
|
||||||
"850": "minecraft:phantom_membrane",
|
"850": "minecraft:trident",
|
||||||
"851": "minecraft:nautilus_shell",
|
"851": "minecraft:phantom_membrane",
|
||||||
"852": "minecraft:heart_of_the_sea",
|
"852": "minecraft:nautilus_shell",
|
||||||
"853": "minecraft:crossbow",
|
"853": "minecraft:heart_of_the_sea",
|
||||||
"854": "minecraft:suspicious_stew",
|
"854": "minecraft:crossbow",
|
||||||
"855": "minecraft:loom",
|
"855": "minecraft:suspicious_stew",
|
||||||
"856": "minecraft:flower_banner_pattern",
|
"856": "minecraft:loom",
|
||||||
"857": "minecraft:creeper_banner_pattern",
|
"857": "minecraft:flower_banner_pattern",
|
||||||
"858": "minecraft:skull_banner_pattern",
|
"858": "minecraft:creeper_banner_pattern",
|
||||||
"859": "minecraft:mojang_banner_pattern",
|
"859": "minecraft:skull_banner_pattern",
|
||||||
"860": "minecraft:barrel",
|
"860": "minecraft:mojang_banner_pattern",
|
||||||
"861": "minecraft:smoker",
|
"861": "minecraft:barrel",
|
||||||
"862": "minecraft:blast_furnace",
|
"862": "minecraft:smoker",
|
||||||
"863": "minecraft:cartography_table",
|
"863": "minecraft:blast_furnace",
|
||||||
"864": "minecraft:fletching_table",
|
"864": "minecraft:cartography_table",
|
||||||
"865": "minecraft:grindstone",
|
"865": "minecraft:fletching_table",
|
||||||
"866": "minecraft:lectern",
|
"866": "minecraft:grindstone",
|
||||||
"867": "minecraft:smithing_table",
|
"867": "minecraft:lectern",
|
||||||
"868": "minecraft:stonecutter",
|
"868": "minecraft:smithing_table",
|
||||||
"869": "minecraft:bell",
|
"869": "minecraft:stonecutter",
|
||||||
"870": "minecraft:lantern",
|
"870": "minecraft:bell",
|
||||||
"871": "minecraft:sweet_berries",
|
"871": "minecraft:lantern",
|
||||||
"872": "minecraft:campfire"
|
"872": "minecraft:sweet_berries",
|
||||||
|
"873": "minecraft:campfire"
|
||||||
},
|
},
|
||||||
"sounds": [
|
"sounds": [
|
||||||
"ambient.cave",
|
"ambient.cave",
|
||||||
@ -12063,11 +12064,11 @@
|
|||||||
"item.flintandsteel.use",
|
"item.flintandsteel.use",
|
||||||
"entity.fox.aggro",
|
"entity.fox.aggro",
|
||||||
"entity.fox.ambient",
|
"entity.fox.ambient",
|
||||||
"entity.fox.bark",
|
|
||||||
"entity.fox.bite",
|
"entity.fox.bite",
|
||||||
"entity.fox.death",
|
"entity.fox.death",
|
||||||
"entity.fox.eat",
|
"entity.fox.eat",
|
||||||
"entity.fox.hurt",
|
"entity.fox.hurt",
|
||||||
|
"entity.fox.screech",
|
||||||
"entity.fox.sleep",
|
"entity.fox.sleep",
|
||||||
"entity.fox.sniff",
|
"entity.fox.sniff",
|
||||||
"entity.fox.spit",
|
"entity.fox.spit",
|
||||||
@ -12218,6 +12219,10 @@
|
|||||||
"block.metal.step",
|
"block.metal.step",
|
||||||
"entity.minecart.inside",
|
"entity.minecart.inside",
|
||||||
"entity.minecart.riding",
|
"entity.minecart.riding",
|
||||||
|
"entity.mooshroom.convert",
|
||||||
|
"entity.mooshroom.eat",
|
||||||
|
"entity.mooshroom.milk",
|
||||||
|
"entity.mooshroom.suspicious_milk",
|
||||||
"entity.mooshroom.shear",
|
"entity.mooshroom.shear",
|
||||||
"entity.mule.ambient",
|
"entity.mule.ambient",
|
||||||
"entity.mule.chest",
|
"entity.mule.chest",
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>2.0.0-19w07a</version>
|
<version>2.0.0-19w08b</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<name>viaversion-jar</name>
|
<name>viaversion-jar</name>
|
||||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<version>2.0.0-19w07a</version>
|
<version>2.0.0-19w08b</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>viaversion-parent</name>
|
<name>viaversion-parent</name>
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>2.0.0-19w07a</version>
|
<version>2.0.0-19w08b</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>2.0.0-19w07a</version>
|
<version>2.0.0-19w08b</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>viaversion-parent</artifactId>
|
<artifactId>viaversion-parent</artifactId>
|
||||||
<groupId>us.myles</groupId>
|
<groupId>us.myles</groupId>
|
||||||
<version>2.0.0-19w07a</version>
|
<version>2.0.0-19w08b</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user