Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Cancel the packet that caused non x character crash for now & check for empty custom names
Dieser Commit ist enthalten in:
Ursprung
9dfbe3b263
Commit
c43e702ed9
@ -20,10 +20,14 @@ public class MetadataRewriter {
|
|||||||
if (metadata.getMetaType().getTypeID() > 4)
|
if (metadata.getMetaType().getTypeID() > 4)
|
||||||
metadata.setMetaType(MetaType1_13.byId(metadata.getMetaType().getTypeID() + 1));
|
metadata.setMetaType(MetaType1_13.byId(metadata.getMetaType().getTypeID() + 1));
|
||||||
|
|
||||||
// TODO Fix displayname
|
// Handle String -> Chat DisplayName
|
||||||
if (metadata.getId() == 2) {
|
if (metadata.getId() == 2) {
|
||||||
metadata.setMetaType(MetaType1_13.OptChat);
|
metadata.setMetaType(MetaType1_13.OptChat);
|
||||||
metadata.setValue(metadata.getValue() != null ? Protocol1_9TO1_8.fixJson((String) metadata.getValue()) : null);
|
if (metadata.getValue() != null && !((String) metadata.getValue()).isEmpty()) {
|
||||||
|
metadata.setValue(Protocol1_9TO1_8.fixJson((String) metadata.getValue()));
|
||||||
|
} else {
|
||||||
|
metadata.setValue(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1.13 changed item to flat item (no data)
|
// 1.13 changed item to flat item (no data)
|
||||||
|
@ -33,7 +33,7 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
|||||||
// Outgoing packets
|
// Outgoing packets
|
||||||
|
|
||||||
// Statistics
|
// Statistics
|
||||||
registerOutgoing(State.PLAY, 0x7, 0x7, new PacketRemapper() {
|
registerOutgoing(State.PLAY, 0x07, 0x07, new PacketRemapper() {
|
||||||
@Override
|
@Override
|
||||||
public void registerMap() {
|
public void registerMap() {
|
||||||
// TODO: This packet has changed
|
// TODO: This packet has changed
|
||||||
@ -253,7 +253,19 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
|||||||
registerOutgoing(State.PLAY, 0x4A, 0x4D);
|
registerOutgoing(State.PLAY, 0x4A, 0x4D);
|
||||||
registerOutgoing(State.PLAY, 0x4B, 0x4E);
|
registerOutgoing(State.PLAY, 0x4B, 0x4E);
|
||||||
registerOutgoing(State.PLAY, 0x4C, 0x4F);
|
registerOutgoing(State.PLAY, 0x4C, 0x4F);
|
||||||
registerOutgoing(State.PLAY, 0x4D, 0x50);
|
// Advancements
|
||||||
|
registerOutgoing(State.PLAY, 0x4D, 0x50, new PacketRemapper() {
|
||||||
|
@Override
|
||||||
|
public void registerMap() {
|
||||||
|
handler(new PacketHandler() {
|
||||||
|
@Override
|
||||||
|
public void handle(PacketWrapper wrapper) throws Exception {
|
||||||
|
// TODO Temporary cancel advancements because of 'Non [a-z0-9/._-] character in path of location: minecraft:? https://fs.matsv.nl/media?id=auwje4z4lxw.png
|
||||||
|
wrapper.cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
registerOutgoing(State.PLAY, 0x4E, 0x51);
|
registerOutgoing(State.PLAY, 0x4E, 0x51);
|
||||||
registerOutgoing(State.PLAY, 0x4F, 0x52);
|
registerOutgoing(State.PLAY, 0x4F, 0x52);
|
||||||
// New packet 0x52 - Declare Recipes
|
// New packet 0x52 - Declare Recipes
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren