68
68
import ru .leymooo .botfilter .packets .PlayerAbilities ;
69
69
import ru .leymooo .botfilter .packets .PlayerPosition ;
70
70
import ru .leymooo .botfilter .packets .PlayerPositionAndLook ;
71
+ import ru .leymooo .botfilter .packets .RegistryData ;
71
72
import ru .leymooo .botfilter .packets .SetExp ;
72
73
import ru .leymooo .botfilter .packets .SetSlot ;
73
74
import ru .leymooo .botfilter .packets .TeleportConfirm ;
@@ -802,7 +803,17 @@ public enum Protocol
802
803
}
803
804
},
804
805
//Custom
805
- BotFilter
806
+ BOTFILTER_CONFIGURATION
807
+ {{
808
+ TO_CLIENT .registerPacket (
809
+ RegistryData .class ,
810
+ RegistryData ::new ,
811
+ map ( ProtocolConstants .MINECRAFT_1_20_2 , 0x05 ),
812
+ map ( ProtocolConstants .MINECRAFT_1_20_5 , 0x07 )
813
+
814
+ );
815
+ }},
816
+ BOTFILTER
806
817
{
807
818
808
819
{
@@ -818,7 +829,9 @@ public enum Protocol
818
829
map ( ProtocolConstants .MINECRAFT_1_19 , 0x23 ),
819
830
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x25 ),
820
831
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x24 ),
821
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x28 )
832
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x28 ),
833
+ map ( ProtocolConstants .MINECRAFT_1_20_2 , 0x29 ),
834
+ map ( ProtocolConstants .MINECRAFT_1_20_5 , 0x2B )
822
835
);
823
836
TO_CLIENT .registerPacket (
824
837
TimeUpdate .class , TimeUpdate ::new ,
@@ -834,7 +847,10 @@ public enum Protocol
834
847
map ( ProtocolConstants .MINECRAFT_1_18 , 0x59 ),
835
848
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x5C ),
836
849
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x5A ),
837
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x5E )
850
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x5E ),
851
+ map ( ProtocolConstants .MINECRAFT_1_20_2 ,0x60 ),
852
+ map ( ProtocolConstants .MINECRAFT_1_20_3 ,0x62 ),
853
+ map ( ProtocolConstants .MINECRAFT_1_20_5 ,0x64 )
838
854
);
839
855
TO_CLIENT .registerPacket (
840
856
PlayerPositionAndLook .class , PlayerPositionAndLook ::new ,
@@ -850,9 +866,12 @@ public enum Protocol
850
866
map ( ProtocolConstants .MINECRAFT_1_19 , 0x36 ),
851
867
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x39 ),
852
868
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x38 ),
853
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x3C )
869
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x3C ),
870
+ map ( ProtocolConstants .MINECRAFT_1_20_2 , 0x3E ),
871
+ map ( ProtocolConstants .MINECRAFT_1_20_5 , 0x40 )
854
872
);
855
873
TO_CLIENT .registerPacket (
874
+ //todo
856
875
EmptyChunkPacket .class , EmptyChunkPacket ::new ,
857
876
map ( ProtocolConstants .MINECRAFT_1_8 , 0x21 ),
858
877
map ( ProtocolConstants .MINECRAFT_1_9 , 0x20 ),
@@ -865,7 +884,9 @@ public enum Protocol
865
884
map ( ProtocolConstants .MINECRAFT_1_19 , 0x1F ),
866
885
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x21 ),
867
886
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x20 ),
868
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x24 )
887
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x24 ),
888
+ map ( ProtocolConstants .MINECRAFT_1_20_2 , 0x25 ),
889
+ map ( ProtocolConstants .MINECRAFT_1_20_5 , 0x27 )
869
890
);
870
891
TO_CLIENT .registerPacket (
871
892
SetSlot .class , SetSlot ::new ,
@@ -879,7 +900,8 @@ public enum Protocol
879
900
map ( ProtocolConstants .MINECRAFT_1_17 , 0x16 ),
880
901
map ( ProtocolConstants .MINECRAFT_1_19 , 0x13 ),
881
902
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x12 ),
882
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x14 )
903
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x14 ),
904
+ map ( ProtocolConstants .MINECRAFT_1_20_2 , 0x15 )
883
905
);
884
906
TO_CLIENT .registerPacket (
885
907
PlayerAbilities .class , PlayerAbilities ::new ,
@@ -895,7 +917,9 @@ public enum Protocol
895
917
map ( ProtocolConstants .MINECRAFT_1_19 , 0x2f ),
896
918
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x31 ),
897
919
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x30 ),
898
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x34 )
920
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x34 ),
921
+ map ( ProtocolConstants .MINECRAFT_1_20_2 , 0x36 ),
922
+ map ( ProtocolConstants .MINECRAFT_1_20_5 , 0x38 )
899
923
);
900
924
TO_CLIENT .registerPacket (
901
925
SetExp .class , SetExp ::new ,
@@ -909,7 +933,10 @@ public enum Protocol
909
933
map ( ProtocolConstants .MINECRAFT_1_17 , 0x51 ),
910
934
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x54 ),
911
935
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x52 ),
912
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x56 )
936
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x56 ),
937
+ map ( ProtocolConstants .MINECRAFT_1_20_2 ,0x58 ),
938
+ map ( ProtocolConstants .MINECRAFT_1_20_3 ,0x5A ),
939
+ map ( ProtocolConstants .MINECRAFT_1_20_5 ,0x5C )
913
940
);
914
941
TO_CLIENT .registerPacket (
915
942
DefaultSpawnPosition .class , DefaultSpawnPosition ::new ,
@@ -925,7 +952,10 @@ public enum Protocol
925
952
map ( ProtocolConstants .MINECRAFT_1_19 , 0x4A ),
926
953
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x4D ),
927
954
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x4C ),
928
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x50 )
955
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x50 ),
956
+ map ( ProtocolConstants .MINECRAFT_1_20_2 ,0x52 ),
957
+ map ( ProtocolConstants .MINECRAFT_1_20_3 ,0x54 ),
958
+ map ( ProtocolConstants .MINECRAFT_1_20_5 ,0x56 )
929
959
);
930
960
TO_SERVER .registerPacket (
931
961
ClientSettings .class , ClientSettings ::new ,
@@ -937,7 +967,9 @@ public enum Protocol
937
967
map ( ProtocolConstants .MINECRAFT_1_19 , 0x07 ),
938
968
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x08 ),
939
969
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x07 ),
940
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x08 )
970
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x08 ),
971
+ map ( ProtocolConstants .MINECRAFT_1_20_2 , 0x09 ),
972
+ map ( ProtocolConstants .MINECRAFT_1_20_5 , 0x0A )
941
973
);
942
974
TO_SERVER .registerPacket (
943
975
TeleportConfirm .class , TeleportConfirm ::new ,
@@ -956,7 +988,10 @@ public enum Protocol
956
988
map ( ProtocolConstants .MINECRAFT_1_19 , 0x14 ),
957
989
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x15 ),
958
990
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x14 ),
959
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x15 )
991
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x15 ),
992
+ map ( ProtocolConstants .MINECRAFT_1_20_2 ,0x17 ),
993
+ map ( ProtocolConstants .MINECRAFT_1_20_3 ,0x18 ),
994
+ map ( ProtocolConstants .MINECRAFT_1_20_5 ,0x1B )
960
995
);
961
996
TO_SERVER .registerPacket (
962
997
PlayerPosition .class , PlayerPosition ::new ,
@@ -971,7 +1006,10 @@ public enum Protocol
971
1006
map ( ProtocolConstants .MINECRAFT_1_19 , 0x13 ),
972
1007
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x14 ),
973
1008
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x13 ),
974
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x14 )
1009
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x14 ),
1010
+ map ( ProtocolConstants .MINECRAFT_1_20_2 ,0x16 ),
1011
+ map ( ProtocolConstants .MINECRAFT_1_20_3 ,0x17 ),
1012
+ map ( ProtocolConstants .MINECRAFT_1_20_5 ,0x1A )
975
1013
);
976
1014
TO_SERVER .registerPacket (
977
1015
Player .class , Player ::new ,
@@ -986,7 +1024,10 @@ public enum Protocol
986
1024
map ( ProtocolConstants .MINECRAFT_1_19 , 0x16 ),
987
1025
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x17 ),
988
1026
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x16 ),
989
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x17 )
1027
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x17 ),
1028
+ map ( ProtocolConstants .MINECRAFT_1_20_2 ,0x19 ),
1029
+ map ( ProtocolConstants .MINECRAFT_1_20_3 ,0x1A ),
1030
+ map ( ProtocolConstants .MINECRAFT_1_20_5 ,0x1D )
990
1031
);
991
1032
TO_SERVER .registerPacket (
992
1033
KeepAlive .class , KeepAlive ::new ,
@@ -1001,7 +1042,10 @@ public enum Protocol
1001
1042
map ( ProtocolConstants .MINECRAFT_1_19 , 0x11 ),
1002
1043
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x12 ),
1003
1044
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x11 ),
1004
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x12 )
1045
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x12 ),
1046
+ map ( ProtocolConstants .MINECRAFT_1_20_2 , 0x14 ),
1047
+ map ( ProtocolConstants .MINECRAFT_1_20_3 , 0x15 ),
1048
+ map ( ProtocolConstants .MINECRAFT_1_20_5 , 0x18 )
1005
1049
);
1006
1050
TO_SERVER .registerPacket (
1007
1051
Chat .class , Chat ::new ,
@@ -1016,7 +1060,8 @@ public enum Protocol
1016
1060
ClientChat .class ,
1017
1061
ClientChat ::new ,
1018
1062
map ( ProtocolConstants .MINECRAFT_1_19 , 0x04 ),
1019
- map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x05 )
1063
+ map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x05 ),
1064
+ map ( ProtocolConstants .MINECRAFT_1_20_5 , 0x06 )
1020
1065
);
1021
1066
TO_SERVER .registerPacket (
1022
1067
PluginMessage .class , PluginMessage ::new ,
@@ -1030,7 +1075,10 @@ public enum Protocol
1030
1075
map ( ProtocolConstants .MINECRAFT_1_19 , 0x0C ),
1031
1076
map ( ProtocolConstants .MINECRAFT_1_19_1 , 0x0D ),
1032
1077
map ( ProtocolConstants .MINECRAFT_1_19_3 , 0x0C ),
1033
- map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x0D )
1078
+ map ( ProtocolConstants .MINECRAFT_1_19_4 , 0x0D ),
1079
+ map ( ProtocolConstants .MINECRAFT_1_20_2 , 0x0F ),
1080
+ map ( ProtocolConstants .MINECRAFT_1_20_3 , 0x10 ),
1081
+ map ( ProtocolConstants .MINECRAFT_1_20_5 , 0x12 )
1034
1082
);
1035
1083
}
1036
1084
};
0 commit comments