updates for 1.21.100 support

This commit is contained in:
ethaniccc
2025-08-08 00:29:41 -04:00
parent d3fae5d3be
commit 6479ff677e
16 changed files with 9433 additions and 68 deletions

View File

@@ -5,6 +5,7 @@ A gophertunnel protocol interface implementation to support older Minecraft Bedr
## Supported Versions ## Supported Versions
| Protocol ID | Version | Support | | Protocol ID | Version | Support |
|-------------|---------|---------| |-------------|---------|---------|
| 827 | 1.21.100 | ✅ |
| 819 | 1.21.93 | ✅ | | 819 | 1.21.93 | ✅ |
| 818 | 1.21.90 | ✅ | | 818 | 1.21.90 | ✅ |
| 800 | 1.21.80 | ✅ | | 800 | 1.21.80 | ✅ |

3
go.mod
View File

@@ -27,8 +27,9 @@ require (
github.com/klauspost/compress v1.18.0 // indirect github.com/klauspost/compress v1.18.0 // indirect
github.com/muhammadmuzzammil1998/jsonc v1.0.0 // indirect github.com/muhammadmuzzammil1998/jsonc v1.0.0 // indirect
github.com/sandertv/go-raknet v1.14.3-0.20250305181847-6af3e95113d6 // indirect github.com/sandertv/go-raknet v1.14.3-0.20250305181847-6af3e95113d6 // indirect
golang.org/x/crypto v0.39.0 // indirect
golang.org/x/mod v0.25.0 // indirect golang.org/x/mod v0.25.0 // indirect
golang.org/x/net v0.41.0 // indirect golang.org/x/net v0.41.0 // indirect
golang.org/x/text v0.26.0 // indirect golang.org/x/text v0.26.0 // indirect
) )
replace github.com/sandertv/gophertunnel => github.com/cooldogedev/gophertunnel v0.0.0-20250806215416-758d5047d822

50
go.sum
View File

@@ -1,31 +1,26 @@
github.com/brentp/intintmap v0.0.0-20190211203843-30dc0ade9af9 h1:/G0ghZwrhou0Wq21qc1vXXMm/t/aKWkALWwITptKbE0= github.com/brentp/intintmap v0.0.0-20190211203843-30dc0ade9af9 h1:/G0ghZwrhou0Wq21qc1vXXMm/t/aKWkALWwITptKbE0=
github.com/brentp/intintmap v0.0.0-20190211203843-30dc0ade9af9/go.mod h1:TOk10ahXejq9wkEaym3KPRNeuR/h5Jx+s8QRWIa2oTM= github.com/brentp/intintmap v0.0.0-20190211203843-30dc0ade9af9/go.mod h1:TOk10ahXejq9wkEaym3KPRNeuR/h5Jx+s8QRWIa2oTM=
github.com/cooldogedev/gophertunnel v0.0.0-20250806215416-758d5047d822 h1:cW4FrZUxjdJBoSD3Fpw7Z86LQJHtTK7o9lIgGXuaZ3Q=
github.com/cooldogedev/gophertunnel v0.0.0-20250806215416-758d5047d822/go.mod h1:lmRarAmn25V/+QeiUbUDXeA26bEaNlX1wGEM/rj39ew=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/df-mc/dragonfly v0.9.20-0.20241229163702-cc7e4ee0e3ce h1:mhBn/ezojzACPHeg+Y9NnU2bbYCozx27RgpfWUPw4i0=
github.com/df-mc/dragonfly v0.9.20-0.20241229163702-cc7e4ee0e3ce/go.mod h1:hH1eU9lmucLNLehzxXzOUOmHJQLz3DLpQMUqIKcz8YI=
github.com/df-mc/dragonfly v0.10.3 h1:t0mxRvjjgG8uBevqqzejJVL2M6obi6RYePMTPDlXo74= github.com/df-mc/dragonfly v0.10.3 h1:t0mxRvjjgG8uBevqqzejJVL2M6obi6RYePMTPDlXo74=
github.com/df-mc/dragonfly v0.10.3/go.mod h1:pO7nuyRKV50ZVZzB7AhTMU/0p4cvk1/yCu43vFqAzcI= github.com/df-mc/dragonfly v0.10.3/go.mod h1:pO7nuyRKV50ZVZzB7AhTMU/0p4cvk1/yCu43vFqAzcI=
github.com/df-mc/goleveldb v1.1.9 h1:ihdosZyy5jkQKrxucTQmN90jq/2lUwQnJZjIYIC/9YU= github.com/df-mc/goleveldb v1.1.9 h1:ihdosZyy5jkQKrxucTQmN90jq/2lUwQnJZjIYIC/9YU=
github.com/df-mc/goleveldb v1.1.9/go.mod h1:+NHCup03Sci5q84APIA21z3iPZCuk6m6ABtg4nANCSk= github.com/df-mc/goleveldb v1.1.9/go.mod h1:+NHCup03Sci5q84APIA21z3iPZCuk6m6ABtg4nANCSk=
github.com/df-mc/worldupgrader v1.0.18 h1:Q34X9ID/hGuDyj9oiq+dpyjOaJdNxhVmVUepf/EPYDA=
github.com/df-mc/worldupgrader v1.0.18/go.mod h1:tsSOLTRm9mpG7VHvYpAjjZrkRHWmSbKZAm9bOLNnlDk=
github.com/df-mc/worldupgrader v1.0.19 h1:BnwRe/lVv9IhwRWZK5olvTYNTKWh7rhFdqNPDMnoKFM= github.com/df-mc/worldupgrader v1.0.19 h1:BnwRe/lVv9IhwRWZK5olvTYNTKWh7rhFdqNPDMnoKFM=
github.com/df-mc/worldupgrader v1.0.19/go.mod h1:tsSOLTRm9mpG7VHvYpAjjZrkRHWmSbKZAm9bOLNnlDk= github.com/df-mc/worldupgrader v1.0.19/go.mod h1:tsSOLTRm9mpG7VHvYpAjjZrkRHWmSbKZAm9bOLNnlDk=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/go-gl/mathgl v1.2.0 h1:v2eOj/y1B2afDxF6URV1qCYmo1KW08lAMtTbOn3KXCY= github.com/go-gl/mathgl v1.2.0 h1:v2eOj/y1B2afDxF6URV1qCYmo1KW08lAMtTbOn3KXCY=
github.com/go-gl/mathgl v1.2.0/go.mod h1:pf9+b5J3LFP7iZ4XXaVzZrCle0Q/vNpB/vDe5+3ulRE= github.com/go-gl/mathgl v1.2.0/go.mod h1:pf9+b5J3LFP7iZ4XXaVzZrCle0Q/vNpB/vDe5+3ulRE=
github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE=
github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA=
github.com/go-jose/go-jose/v4 v4.1.0 h1:cYSYxd3pw5zd2FSXk2vGdn9igQU2PS8MuxrCOCl0FdY= github.com/go-jose/go-jose/v4 v4.1.0 h1:cYSYxd3pw5zd2FSXk2vGdn9igQU2PS8MuxrCOCl0FdY=
github.com/go-jose/go-jose/v4 v4.1.0/go.mod h1:GG/vqmYm3Von2nYiB2vGTXzdoNKE5tix5tuc6iAd+sw= github.com/go-jose/go-jose/v4 v4.1.0/go.mod h1:GG/vqmYm3Von2nYiB2vGTXzdoNKE5tix5tuc6iAd+sw=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs=
github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
@@ -44,69 +39,32 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/samber/lo v1.49.1 h1:4BIFyVfuQSEpluc7Fua+j1NolZHiEHEpaSEKdsH0tew= github.com/samber/lo v1.49.1 h1:4BIFyVfuQSEpluc7Fua+j1NolZHiEHEpaSEKdsH0tew=
github.com/samber/lo v1.49.1/go.mod h1:dO6KHFzUKXgP8LDhU0oI8d2hekjXnGOu0DB8Jecxd6o= github.com/samber/lo v1.49.1/go.mod h1:dO6KHFzUKXgP8LDhU0oI8d2hekjXnGOu0DB8Jecxd6o=
github.com/sandertv/go-raknet v1.14.3-0.20250305181847-6af3e95113d6 h1:ZfK7NCzIDE+dzp5x6NIO4JDLsjsOxi762CNR1Obds2Q= github.com/sandertv/go-raknet v1.14.3-0.20250305181847-6af3e95113d6 h1:ZfK7NCzIDE+dzp5x6NIO4JDLsjsOxi762CNR1Obds2Q=
github.com/sandertv/go-raknet v1.14.3-0.20250305181847-6af3e95113d6/go.mod h1:/yysjwfCXm2+2OY8mBazLzcxJ3irnylKCyG3FLgUPVU= github.com/sandertv/go-raknet v1.14.3-0.20250305181847-6af3e95113d6/go.mod h1:/yysjwfCXm2+2OY8mBazLzcxJ3irnylKCyG3FLgUPVU=
github.com/sandertv/gophertunnel v1.45.1 h1:mQCEG1Rv1RR9UTRyTu0+XZ/cr3lyWvo/RX0DMHh8S6w=
github.com/sandertv/gophertunnel v1.45.1/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
github.com/sandertv/gophertunnel v1.46.1-0.20250511074107-85599aa3447c h1:cZlIS07gnBMXJlwJPxGMTPytg2kBXZcYCasxlqPX480=
github.com/sandertv/gophertunnel v1.46.1-0.20250511074107-85599aa3447c/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
github.com/sandertv/gophertunnel v1.47.2-0.20250618150444-d66380c4a00b h1:/kNTXzMPTigd+ctGH3c4xVOnzxqyVCB11vikFPhvZqY=
github.com/sandertv/gophertunnel v1.47.2-0.20250618150444-d66380c4a00b/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
github.com/sandertv/gophertunnel v1.47.3 h1:MsHv8QEx17+N/39BnAvHn/KU9zv8Rt9ZHTKaZK9vSuo=
github.com/sandertv/gophertunnel v1.47.3/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
github.com/sandertv/gophertunnel v1.47.4 h1:PmNbEUf9+7Fk8bP2875cvYTt22g0d4eeQhtd1dxjqqA=
github.com/sandertv/gophertunnel v1.47.4/go.mod h1:lvzOdyb2fkoo3uySe++hy4UKq0I649oUFJKkro2ZHpY=
github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM=
github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8=
golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw=
golang.org/x/crypto v0.39.0 h1:SHs+kF4LP+f+p14esP5jAoDpHU8Gu/v9lFRK6IT5imM=
golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw=
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM=
golang.org/x/image v0.21.0 h1:c5qV36ajHpdj4Qi0GnE0jUc/yuo33OLFaa0d+crTD5s=
golang.org/x/image v0.21.0/go.mod h1:vUbsLavqK/W303ZroQQVKQ+Af3Yl6Uz1Ppu5J/cLz78=
golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ= golang.org/x/image v0.25.0 h1:Y6uW6rH1y5y/LK1J8BPWZtr6yZ7hrsy6hFrXjgsc2fQ=
golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs= golang.org/x/image v0.25.0/go.mod h1:tCAmOEGthTtkalusGp1g3xa2gke8J6c2N565dTyl9Rs=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU=
golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w= golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw= golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc=
golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M= golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

View File

@@ -8,6 +8,7 @@ import (
// must be set to true if you're using Dragonfly. // must be set to true if you're using Dragonfly.
func All(dragonflyMapping bool) []minecraft.Protocol { func All(dragonflyMapping bool) []minecraft.Protocol {
return []minecraft.Protocol{ return []minecraft.Protocol{
New819(dragonflyMapping),
New818(dragonflyMapping), New818(dragonflyMapping),
New800(dragonflyMapping), New800(dragonflyMapping),
New786(dragonflyMapping), New786(dragonflyMapping),

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@ package legacypacket
import ( import (
"encoding/base64" "encoding/base64"
"github.com/akmalfairuz/legacy-version/legacyver/proto" "github.com/akmalfairuz/legacy-version/legacyver/proto"
"github.com/samber/lo" "github.com/samber/lo"
"github.com/sandertv/gophertunnel/minecraft/protocol" "github.com/sandertv/gophertunnel/minecraft/protocol"
@@ -13,7 +14,7 @@ import (
// accurately recreate the server-side generation in vanilla worlds/servers for increased performance. // accurately recreate the server-side generation in vanilla worlds/servers for increased performance.
type BiomeDefinitionList struct { type BiomeDefinitionList struct {
// BiomeDefinitions is a list of biomes that are available on the server. // BiomeDefinitions is a list of biomes that are available on the server.
BiomeDefinitions []protocol.BiomeDefinition BiomeDefinitions []proto.BiomeDefinition
// StringList is a makeshift dictionary implementation Mojang created to try and reduce the size of the // StringList is a makeshift dictionary implementation Mojang created to try and reduce the size of the
// overall packet. It is a list of common strings that are used in the biome definitions, such as // overall packet. It is a list of common strings that are used in the biome definitions, such as
// biome names, float values or query expressions. // biome names, float values or query expressions.

View File

@@ -22,6 +22,8 @@ type CameraAimAssist struct {
TargetMode byte TargetMode byte
// Action is the action that should be performed with the aim assist. This is one of the constants above. // Action is the action that should be performed with the aim assist. This is one of the constants above.
Action byte Action byte
// ShowDebugRender specifies if debug render should be shown.
ShowDebugRender bool
} }
// ID ... // ID ...
@@ -37,4 +39,7 @@ func (pk *CameraAimAssist) Marshal(io protocol.IO) {
io.Float32(&pk.Distance) io.Float32(&pk.Distance)
io.Uint8(&pk.TargetMode) io.Uint8(&pk.TargetMode)
io.Uint8(&pk.Action) io.Uint8(&pk.Action)
if proto.IsProtoGTE(io, proto.ID827) {
io.Bool(&pk.ShowDebugRender)
}
} }

View File

@@ -18,6 +18,8 @@ type CameraInstruction struct {
Target protocol.Optional[protocol.CameraInstructionTarget] Target protocol.Optional[protocol.CameraInstructionTarget]
// RemoveTarget can be set to true to remove the current aim assist target. // RemoveTarget can be set to true to remove the current aim assist target.
RemoveTarget protocol.Optional[bool] RemoveTarget protocol.Optional[bool]
// FieldOfView is a camera instruction that updates the field of view for the camera.
FieldOfView protocol.Optional[protocol.CameraInstructionFieldOfView]
} }
// ID ... // ID ...
@@ -33,4 +35,7 @@ func (pk *CameraInstruction) Marshal(io protocol.IO) {
protocol.OptionalMarshaler(io, &pk.Target) protocol.OptionalMarshaler(io, &pk.Target)
protocol.OptionalFunc(io, &pk.RemoveTarget, io.Bool) protocol.OptionalFunc(io, &pk.RemoveTarget, io.Bool)
} }
if proto.IsProtoGTE(io, proto.ID827) {
protocol.OptionalMarshaler(io, &pk.FieldOfView)
}
} }

View File

@@ -21,6 +21,7 @@ type CorrectPlayerMovePrediction struct {
Delta mgl32.Vec3 Delta mgl32.Vec3
// Rotation is the rotation of the player at the tick written in the field below. It is only included if // Rotation is the rotation of the player at the tick written in the field below. It is only included if
// PredictionType is PredictionTypeVehicle. // PredictionType is PredictionTypeVehicle.
// NOTE: As of 1.21.100, this field is also used for player rotations, and is not only set for vehicles.
Rotation mgl32.Vec2 Rotation mgl32.Vec2
// VehicleAngularVelocity is the angular velocity of the vehicle that the rider is riding. // VehicleAngularVelocity is the angular velocity of the vehicle that the rider is riding.
VehicleAngularVelocity protocol.Optional[float32] VehicleAngularVelocity protocol.Optional[float32]
@@ -41,14 +42,14 @@ func (pk *CorrectPlayerMovePrediction) Marshal(io protocol.IO) {
} }
io.Vec3(&pk.Position) io.Vec3(&pk.Position)
io.Vec3(&pk.Delta) io.Vec3(&pk.Delta)
if proto.IsProtoGTE(io, proto.ID671) { if (proto.IsProtoGTE(io, proto.ID671) && proto.IsProtoLT(io, proto.ID827) && pk.PredictionType == packet.PredictionTypeVehicle) ||
if pk.PredictionType == packet.PredictionTypeVehicle { proto.IsProtoGTE(io, proto.ID827) {
io.Vec2(&pk.Rotation) io.Vec2(&pk.Rotation)
if proto.IsProtoGTE(io, proto.ID712) { if proto.IsProtoGTE(io, proto.ID712) {
protocol.OptionalFunc(io, &pk.VehicleAngularVelocity, io.Float32) protocol.OptionalFunc(io, &pk.VehicleAngularVelocity, io.Float32)
} }
} }
}
io.Bool(&pk.OnGround) io.Bool(&pk.OnGround)
io.Varuint64(&pk.Tick) io.Varuint64(&pk.Tick)
} }

View File

@@ -238,6 +238,8 @@ type StartGame struct {
// its index in the expected block palette. This is useful for servers that wish to support multiple protocol versions // its index in the expected block palette. This is useful for servers that wish to support multiple protocol versions
// and custom blocks, but it will result in extra bytes being written for every block in a sub chunk palette. // and custom blocks, but it will result in extra bytes being written for every block in a sub chunk palette.
UseBlockNetworkIDHashes bool UseBlockNetworkIDHashes bool
// TickDeathSystemsEnabled specifies if the new tick death systems are enabled.
TickDeathSystemsEnabled bool
// ServerAuthoritativeSound is currently unknown as to what it does. // ServerAuthoritativeSound is currently unknown as to what it does.
ServerAuthoritativeSound bool ServerAuthoritativeSound bool
} }
@@ -336,5 +338,8 @@ func (pk *StartGame) Marshal(io protocol.IO) {
io.UUID(&pk.WorldTemplateID) io.UUID(&pk.WorldTemplateID)
io.Bool(&pk.ClientSideGeneration) io.Bool(&pk.ClientSideGeneration)
io.Bool(&pk.UseBlockNetworkIDHashes) io.Bool(&pk.UseBlockNetworkIDHashes)
if proto.IsProtoGTE(io, proto.ID827) {
io.Bool(&pk.TickDeathSystemsEnabled)
}
io.Bool(&pk.ServerAuthoritativeSound) io.Bool(&pk.ServerAuthoritativeSound)
} }

92
legacyver/proto/biome.go Normal file
View File

@@ -0,0 +1,92 @@
package proto
import (
"unsafe"
_ "unsafe"
"github.com/sandertv/gophertunnel/minecraft/protocol"
)
// BiomeDefinition represents a biome definition in the game. This can be a vanilla biome or a completely
// custom biome.
type BiomeDefinition struct {
// NameIndex represents the index of the biome name in the string list.
NameIndex int16
// BiomeID is the biome ID.
BiomeID int16
// Temperature is the temperature of the biome, used for weather, biome behaviours and sky colour.
Temperature float32
// Downfall is the amount that precipitation affects colours and block changes.
Downfall float32
// RedSporeDensity is the density of red spore precipitation visuals.
RedSporeDensity float32
// BlueSporeDensity is the density of blue spore precipitation visuals.
BlueSporeDensity float32
// AshDensity is the density of ash precipitation visuals.
AshDensity float32
// WhiteAshDensity is the density of white ash precipitation visuals.
WhiteAshDensity float32
// Depth ...
Depth float32
// Scale ...
Scale float32
// MapWaterColour is an ARGB value for the water colour on maps in the biome.
MapWaterColour int32
// Rain is true if the biome has rain, false if it is a dry biome.
Rain bool
// Tags are a list of indices of tags in the string list. These are used to group biomes together for
// biome generation and other purposes.
Tags protocol.Optional[[]uint16]
// ChunkGeneration is optional information to assist in client-side chunk generation. Almost all servers
// can and should leave this empty to greatly reduce the size of this packet. Only BDS and servers which
// *exactly* match the vanilla chunk generation can benefit from this.
ChunkGeneration protocol.Optional[protocol.BiomeChunkGeneration]
}
// TODO: This will be required to be changed when the structs are modified in future MC updates.
func DowngradeBiomeDefinitions(bd []protocol.BiomeDefinition) []BiomeDefinition {
converted := make([]BiomeDefinition, len(bd))
for i, b := range bd {
ptr := unsafe.Pointer(&b)
converted[i] = *(*BiomeDefinition)(ptr)
}
return converted
}
// TODO: This will be required to be changed when the structs are modified in future MC updates.
func UpgradeBiomeDefinitions(bd []BiomeDefinition) []protocol.BiomeDefinition {
converted := make([]protocol.BiomeDefinition, len(bd))
for i, b := range bd {
ptr := unsafe.Pointer(&b)
converted[i] = *(*protocol.BiomeDefinition)(ptr)
}
return converted
}
func (x *BiomeDefinition) Marshal(r protocol.IO) {
r.Int16(&x.NameIndex)
if IsProtoGTE(r, ID827) {
r.Int16(&x.BiomeID)
} else {
var opt protocol.Optional[int16]
if x.BiomeID != -1 {
opt = protocol.Option(x.BiomeID)
}
protocol.OptionalFunc(r, &opt, r.Int16)
x.BiomeID, _ = opt.Value()
}
r.Float32(&x.Temperature)
r.Float32(&x.Downfall)
r.Float32(&x.RedSporeDensity)
r.Float32(&x.BlueSporeDensity)
r.Float32(&x.AshDensity)
r.Float32(&x.WhiteAshDensity)
r.Float32(&x.Depth)
r.Float32(&x.Scale)
r.Int32(&x.MapWaterColour)
r.Bool(&x.Rain)
protocol.OptionalFunc(r, &x.Tags, func(s *[]uint16) {
protocol.FuncSlice(r, s, r.Uint16)
})
protocol.OptionalMarshaler(r, &x.ChunkGeneration)
}

View File

@@ -3,6 +3,7 @@ package proto
import "github.com/sandertv/gophertunnel/minecraft/protocol" import "github.com/sandertv/gophertunnel/minecraft/protocol"
const ( const (
ID827 = 827 // v1.21.100
ID819 = 819 // v1.21.93 ID819 = 819 // v1.21.93
ID818 = 818 // v1.21.90 ID818 = 818 // v1.21.90
ID800 = 800 // v1.21.80 ID800 = 800 // v1.21.80

View File

@@ -1,13 +1,14 @@
package legacyver package legacyver
import ( import (
"strings"
"github.com/akmalfairuz/legacy-version/legacyver/legacypacket" "github.com/akmalfairuz/legacy-version/legacyver/legacypacket"
"github.com/akmalfairuz/legacy-version/legacyver/proto" "github.com/akmalfairuz/legacy-version/legacyver/proto"
"github.com/samber/lo" "github.com/samber/lo"
"github.com/sandertv/gophertunnel/minecraft" "github.com/sandertv/gophertunnel/minecraft"
"github.com/sandertv/gophertunnel/minecraft/protocol" "github.com/sandertv/gophertunnel/minecraft/protocol"
"github.com/sandertv/gophertunnel/minecraft/protocol/packet" "github.com/sandertv/gophertunnel/minecraft/protocol/packet"
"strings"
) )
var ( var (
@@ -722,7 +723,7 @@ func (p *Protocol) downgradePackets(pks []packet.Packet, conn *minecraft.Conn) [
} }
case *packet.BiomeDefinitionList: case *packet.BiomeDefinitionList:
pks[pkIndex] = &legacypacket.BiomeDefinitionList{ pks[pkIndex] = &legacypacket.BiomeDefinitionList{
BiomeDefinitions: pk.BiomeDefinitions, BiomeDefinitions: proto.DowngradeBiomeDefinitions(pk.BiomeDefinitions),
StringList: pk.StringList, StringList: pk.StringList,
} }
case *packet.PlayerList: case *packet.PlayerList:
@@ -1258,7 +1259,7 @@ func (p *Protocol) upgradePackets(pks []packet.Packet, conn *minecraft.Conn) []p
} }
case *legacypacket.BiomeDefinitionList: case *legacypacket.BiomeDefinitionList:
pks[pkIndex] = &packet.BiomeDefinitionList{ pks[pkIndex] = &packet.BiomeDefinitionList{
BiomeDefinitions: pk.BiomeDefinitions, BiomeDefinitions: proto.UpgradeBiomeDefinitions(pk.BiomeDefinitions),
StringList: pk.StringList, StringList: pk.StringList,
} }
case *legacypacket.PlayerList: case *legacypacket.PlayerList:

View File

@@ -2,6 +2,9 @@ package legacyver
import ( import (
_ "embed" _ "embed"
"github.com/akmalfairuz/legacy-version/internal/chunk"
"github.com/akmalfairuz/legacy-version/legacyver/proto"
"github.com/akmalfairuz/legacy-version/mapping" "github.com/akmalfairuz/legacy-version/mapping"
) )
@@ -9,25 +12,24 @@ const (
// ItemVersion819 ... // ItemVersion819 ...
ItemVersion819 = 271 ItemVersion819 = 271
// BlockVersion819 ... // BlockVersion819 ...
BlockVersion819 int32 = (1 << 24) | (21 << 16) | (90 << 8) BlockVersion819 int32 = (1 << 24) | (21 << 16) | (93 << 8)
) )
var ( var (
//go:embed data/dragonfly_items.json
dragonflyLatestItemList []byte
//go:embed data/required_item_list_819.json //go:embed data/required_item_list_819.json
requiredItemList819 []byte requiredItemList819 []byte
//go:embed data/block_states_819.nbt //go:embed data/block_states_819.nbt
blockStateData819 []byte blockStateData819 []byte
itemMappingLatestPocketMine = mapping.NewItemMapping(requiredItemList819, ItemVersion819)
itemMappingLatestDragonfly = mapping.NewItemMapping(dragonflyLatestItemList, ItemVersion819)
blockMappingLatest = mapping.NewBlockMapping(blockStateData819)
) )
func itemMappingLatest(dragonflyMapping bool) mapping.Item { func New819(dragonflyMapping bool) *Protocol {
if dragonflyMapping { itemMapping := mapping.NewItemMapping(requiredItemList819, ItemVersion819)
return itemMappingLatestDragonfly blockMapping := mapping.NewBlockMapping(blockStateData819)
return &Protocol{
ver: "1.21.93",
id: proto.ID819,
blockTranslator: NewBlockTranslator(blockMapping, blockMappingLatest, chunk.NewNetworkPersistentEncoding(blockMapping, BlockVersion819), chunk.NewBlockPaletteEncoding(blockMapping, BlockVersion819), false),
itemTranslator: NewItemTranslator(itemMapping, itemMappingLatest(dragonflyMapping), blockMapping, blockMappingLatest),
} }
return itemMappingLatestPocketMine
} }

35
legacyver/v827.go Normal file
View File

@@ -0,0 +1,35 @@
package legacyver
import (
_ "embed"
"github.com/akmalfairuz/legacy-version/mapping"
)
const (
// ItemVersion827 ...
ItemVersion827 = 271
// BlockVersion827 ...
BlockVersion827 int32 = (1 << 24) | (21 << 16) | (100 << 8)
)
var (
//go:embed data/dragonfly_items.json
dragonflyLatestItemList []byte
//go:embed data/required_item_list_827.json
requiredItemList827 []byte
//go:embed data/block_states_827.nbt
blockStateData827 []byte
itemMappingLatestPocketMine = mapping.NewItemMapping(requiredItemList827, ItemVersion827)
itemMappingLatestDragonfly = mapping.NewItemMapping(dragonflyLatestItemList, ItemVersion827)
blockMappingLatest = mapping.NewBlockMapping(blockStateData827)
)
func itemMappingLatest(dragonflyMapping bool) mapping.Item {
if dragonflyMapping {
return itemMappingLatestDragonfly
}
return itemMappingLatestPocketMine
}