Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-09-08 22:02:50 +02:00
Fix particle handling
Dieser Commit ist enthalten in:
Ursprung
16f89f2638
Commit
d23e743550
@ -38,7 +38,6 @@ import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.rewriter.Recip
|
|||||||
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.Protocol1_20_2To1_20;
|
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.Protocol1_20_2To1_20;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ServerboundPackets1_20_2;
|
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ServerboundPackets1_20_2;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.type.ChunkType1_20_2;
|
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.type.ChunkType1_20_2;
|
||||||
import com.viaversion.viaversion.protocols.protocol1_20to1_19_4.Protocol1_20To1_19_4;
|
|
||||||
import com.viaversion.viaversion.rewriter.BlockRewriter;
|
import com.viaversion.viaversion.rewriter.BlockRewriter;
|
||||||
import com.viaversion.viaversion.rewriter.ItemRewriter;
|
import com.viaversion.viaversion.rewriter.ItemRewriter;
|
||||||
import com.viaversion.viaversion.util.Key;
|
import com.viaversion.viaversion.util.Key;
|
||||||
@ -276,8 +275,7 @@ public final class BlockItemPacketRewriter1_20_2 extends ItemRewriter<Clientboun
|
|||||||
map(Type.INT); // 9 - Particle Count
|
map(Type.INT); // 9 - Particle Count
|
||||||
handler(wrapper -> {
|
handler(wrapper -> {
|
||||||
final int id = wrapper.get(Type.VAR_INT, 0);
|
final int id = wrapper.get(Type.VAR_INT, 0);
|
||||||
// Use 1.19.4->1.20 mappings
|
final ParticleMappings mappings = Protocol1_20_2To1_20.MAPPINGS.getParticleMappings();
|
||||||
final ParticleMappings mappings = Protocol1_20To1_19_4.MAPPINGS.getParticleMappings();
|
|
||||||
if (mappings.isBlockParticle(id)) {
|
if (mappings.isBlockParticle(id)) {
|
||||||
final int data = wrapper.read(Type.VAR_INT);
|
final int data = wrapper.read(Type.VAR_INT);
|
||||||
wrapper.write(Type.VAR_INT, protocol.getMappingData().getNewBlockStateId(data));
|
wrapper.write(Type.VAR_INT, protocol.getMappingData().getNewBlockStateId(data));
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren