Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-26 16:12:43 +01:00
fix particle rewrites
Dieser Commit ist enthalten in:
Ursprung
a29e88f535
Commit
b466ed9eb8
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren