Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-26 00:00:33 +01:00
Ursprung
ddeaf921be
Commit
42897030f7
@ -109,9 +109,7 @@ public final class EntityPackets1_19 extends EntityRewriter<ClientboundPackets1_
|
||||
map(Type.BYTE); // Flags
|
||||
handler(wrapper -> {
|
||||
// Remove factor data
|
||||
if (wrapper.read(Type.BOOLEAN)) {
|
||||
wrapper.read(Type.NAMED_COMPOUND_TAG);
|
||||
}
|
||||
wrapper.read(Type.OPTIONAL_NAMED_COMPOUND_TAG);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -28,6 +28,7 @@ import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_20;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_20_2;
|
||||
import com.viaversion.viaversion.libs.opennbt.tag.builtin.CompoundTag;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ClientboundPackets1_19_4;
|
||||
import com.viaversion.viaversion.protocols.protocol1_20_2to1_20.packet.ClientboundPackets1_20_2;
|
||||
|
||||
@ -184,9 +185,9 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter<Clientbound
|
||||
wrapper.passthrough(Type.BYTE); // Amplifier
|
||||
wrapper.passthrough(Type.VAR_INT); // Duration
|
||||
wrapper.passthrough(Type.BYTE); // Flags
|
||||
if (wrapper.passthrough(Type.BOOLEAN)) {
|
||||
wrapper.write(Type.NAMED_COMPOUND_TAG, wrapper.read(Type.COMPOUND_TAG)); // Factor data
|
||||
}
|
||||
|
||||
final CompoundTag factorData = wrapper.read(Type.OPTIONAL_COMPOUND_TAG);
|
||||
wrapper.write(Type.OPTIONAL_NAMED_COMPOUND_TAG, factorData); // Factor data
|
||||
});
|
||||
|
||||
protocol.registerClientbound(ClientboundPackets1_20_2.REMOVE_ENTITY_EFFECT, wrapper -> {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren