Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-11-20 06:50:10 +01:00
Fix double register
Dieser Commit ist enthalten in:
Ursprung
406733b13a
Commit
f4cc9d4730
@ -43,15 +43,6 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter<Clientbound
|
|||||||
registerMetadataRewriter(ClientboundPackets1_20_2.ENTITY_METADATA, Types1_20_2.METADATA_LIST, Types1_20.METADATA_LIST);
|
registerMetadataRewriter(ClientboundPackets1_20_2.ENTITY_METADATA, Types1_20_2.METADATA_LIST, Types1_20.METADATA_LIST);
|
||||||
registerRemoveEntities(ClientboundPackets1_20_2.REMOVE_ENTITIES);
|
registerRemoveEntities(ClientboundPackets1_20_2.REMOVE_ENTITIES);
|
||||||
|
|
||||||
protocol.registerClientbound(ClientboundPackets1_20_2.REMOVE_ENTITY_EFFECT, wrapper -> {
|
|
||||||
wrapper.passthrough(Type.VAR_INT); // Entity id
|
|
||||||
wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1); // Effect id
|
|
||||||
});
|
|
||||||
protocol.registerClientbound(ClientboundPackets1_20_2.ENTITY_EFFECT, wrapper -> {
|
|
||||||
wrapper.passthrough(Type.VAR_INT); // Entity id
|
|
||||||
wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1); // Effect id
|
|
||||||
});
|
|
||||||
|
|
||||||
protocol.registerClientbound(ClientboundPackets1_20_2.JOIN_GAME, new PacketHandlers() {
|
protocol.registerClientbound(ClientboundPackets1_20_2.JOIN_GAME, new PacketHandlers() {
|
||||||
@Override
|
@Override
|
||||||
public void register() {
|
public void register() {
|
||||||
@ -123,7 +114,7 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter<Clientbound
|
|||||||
|
|
||||||
protocol.registerClientbound(ClientboundPackets1_20_2.ENTITY_EFFECT, wrapper -> {
|
protocol.registerClientbound(ClientboundPackets1_20_2.ENTITY_EFFECT, wrapper -> {
|
||||||
wrapper.passthrough(Type.VAR_INT); // Entity id
|
wrapper.passthrough(Type.VAR_INT); // Entity id
|
||||||
wrapper.passthrough(Type.VAR_INT); // Effect id
|
wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1); // Effect id
|
||||||
wrapper.passthrough(Type.BYTE); // Amplifier
|
wrapper.passthrough(Type.BYTE); // Amplifier
|
||||||
wrapper.passthrough(Type.VAR_INT); // Duration
|
wrapper.passthrough(Type.VAR_INT); // Duration
|
||||||
wrapper.passthrough(Type.BYTE); // Flags
|
wrapper.passthrough(Type.BYTE); // Flags
|
||||||
@ -131,6 +122,11 @@ public final class EntityPacketRewriter1_20_2 extends EntityRewriter<Clientbound
|
|||||||
wrapper.write(Type.NBT, wrapper.read(Type.NAMELESS_NBT)); // Factor data
|
wrapper.write(Type.NBT, wrapper.read(Type.NAMELESS_NBT)); // Factor data
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
protocol.registerClientbound(ClientboundPackets1_20_2.REMOVE_ENTITY_EFFECT, wrapper -> {
|
||||||
|
wrapper.passthrough(Type.VAR_INT); // Entity id
|
||||||
|
wrapper.write(Type.VAR_INT, wrapper.read(Type.VAR_INT) + 1); // Effect id
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren