Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-26 16:12:43 +01:00
Map new 1.15 particles, fix remap in 1.14
Dieser Commit ist enthalten in:
Ursprung
d50c26dd55
Commit
71e24d9797
@ -576,11 +576,13 @@ public class EntityPackets1_14 extends EntityRewriter<Protocol1_13_2To1_14> {
|
||||
if (id >= 28) {
|
||||
id -= 1; // new 24 -> 27
|
||||
}
|
||||
if (id >= 14) {
|
||||
if (id >= 13) {
|
||||
id -= 1; // new water drip 11 -> 13
|
||||
}
|
||||
if (id >= 12) {
|
||||
id -= 2; // new lava drips 10, 11
|
||||
if (id == 10 || id == 11) {
|
||||
id = 9; // set both landing/falling lava to dripping lava
|
||||
} else if (id > 11) {
|
||||
id -= 2;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data;
|
||||
|
||||
public class ParticleMapping {
|
||||
|
||||
public static int getOldId(int newId) {
|
||||
switch (newId) {
|
||||
case 58: // dripping honey -> dripping lava
|
||||
return 9;
|
||||
case 59: // falling honey -> falling lava
|
||||
return 10;
|
||||
case 60: // landing honey -> landing lava
|
||||
return 11;
|
||||
case 61: // falling nectar -> falling water
|
||||
return 13;
|
||||
default:
|
||||
return newId;
|
||||
}
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ import nl.matsv.viabackwards.ViaBackwards;
|
||||
import nl.matsv.viabackwards.api.rewriters.BlockItemRewriter;
|
||||
import nl.matsv.viabackwards.api.rewriters.RecipeRewriter;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.Protocol1_14_4To1_15;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data.ParticleMapping;
|
||||
import nl.matsv.viabackwards.protocol.protocol1_14_4to1_15.data.RecipeRewriter1_15;
|
||||
import us.myles.ViaVersion.api.PacketWrapper;
|
||||
import us.myles.ViaVersion.api.minecraft.chunks.Chunk;
|
||||
@ -188,6 +189,11 @@ public class BlockItemPackets1_15 extends BlockItemRewriter<Protocol1_14_4To1_15
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
int id = wrapper.get(Type.INT, 0);
|
||||
int mappedId = ParticleMapping.getOldId(id);
|
||||
if (id != mappedId) {
|
||||
wrapper.set(Type.INT, 0, mappedId);
|
||||
}
|
||||
|
||||
if (id == 3 || id == 23) {
|
||||
int data = wrapper.passthrough(Type.VAR_INT);
|
||||
wrapper.set(Type.VAR_INT, 0, Protocol1_14_4To1_15.getNewBlockStateId(data));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren