3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-10-07 18:50:07 +02:00

fix particle rewrites

Dieser Commit ist enthalten in:
Marco Neuhaus 2019-05-22 23:53:05 +02:00
Ursprung a29e88f535
Commit b466ed9eb8
2 geänderte Dateien mit 12 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -511,12 +511,14 @@ public class BlockItemPackets1_14 extends BlockItemRewriter<Protocol1_13_2To1_14
@Override
public void handle(PacketWrapper wrapper) throws Exception {
int id = wrapper.get(Type.INT, 0);
id = EntityPackets1_14.getOldParticleId(id);
if (id == 3 || id == 20) {
int data = wrapper.passthrough(Type.VAR_INT);
wrapper.set(Type.VAR_INT, 0, Protocol1_14To1_13_2.getNewBlockStateId(data));
} else if (id == 27) {
handleItemToClient(wrapper.passthrough(Type.FLAT_VAR_INT_ITEM));
}
wrapper.set(Type.INT, 0, id);
}
});
}

Datei anzeigen

@ -543,20 +543,20 @@ public class EntityPackets1_14 extends EntityRewriter<Protocol1_13_2To1_14> {
}
public static int getOldParticleId(int id) {
if (id >= 12) {
id -= 2; // new lava drips 10, 11
}
if (id >= 14) {
id -= 1; // new water drip 11 -> 13
}
if (id >= 28) {
id -= 1; // new 24 -> 27
if (id >= 45) {
id -= 1; // new 39 -> 44
}
if (id >= 30) {
id -= 1; // skip new short happy villager
}
if (id >= 45) {
id -= 1; // new 39 -> 44
if (id >= 28) {
id -= 1; // new 24 -> 27
}
if (id >= 14) {
id -= 1; // new water drip 11 -> 13
}
if (id >= 12) {
id -= 2; // new lava drips 10, 11
}
return id;
}