Commit graph

126 commits

Author SHA1 Message Date
oldkingOK
734de2a9ac Login with yggdrasil server 'hitmc.cc' will get
```
Login failed : Invalid server response.
```

Print the raw response which is `result` in [/MinecraftClient/Protocol/ProtocolHandler.cs#L554](f6797cb4b5/MinecraftClient/Protocol/ProtocolHandler.cs (L554))
(Every test shows like this)

```
HTTP/1.1 200 OK
...

1e1
{"accessToken":"...","clientToken":"...","availableProfiles":[{"id":"..","name":".."},{"id":"..","na
f
me":"ok_bot"}]}
0
```

After splited by line:
- 1e1
- {"accessToken": ... ,"na
- f
- me":"ok_bot"}]}
- 0

The response when Login with 'littleskin.cn' which works fine is:

```
HTTP/1.1 200 OK
...

1e1
{"accessToken":"...","clientToken":"...","availableProfiles":[{"id":"..","name":".."},{"id":"..","name":"ok_bot"}]}
0

```

After splited by line:
- 1e1
- {"accessToken": ... ,"name":"ok_bot"}]}
- 0
-
-

So adding [1] and [3] will make both 'hitmc.cc' and 'littleskin.cn' work fine.
2024-01-10 11:00:04 +08:00
Anon
480f0d85f0 Fixed merge conflicts 2023-12-02 13:34:11 +01:00
mcflurrybaby
e19de8eb0b refactored session checks for better readability 2023-12-02 13:15:46 +02:00
Polaris_Light
4fc1aacca5 BetterTranslationMaybe 2023-11-16 10:10:06 +08:00
Polaris_Light
49dec51588 MakeSelectedProfileNullable 2023-11-16 09:59:56 +08:00
Polaris_Light
a97096cddf ImplPlayerSection 2023-11-16 00:04:56 +08:00
Anon
4f957cee7e 1.20.2 Implementation, not tested 2023-11-15 15:42:27 +01:00
Polaris_Light
3c97193b70 AddYggdrasilLogin 2023-11-12 21:04:20 +08:00
ReinforceZwei
37bcad37e0 [skip ci] Normalize all line endings 2023-09-15 14:44:11 +08:00
Anon
7c7b58e941 Implemented 1.20.1 2023-06-22 22:10:55 +02:00
Anon
ae7ce35cc8 Fully Implemented 1.20 2023-06-08 19:27:28 +02:00
Anon
5d4ea515a7 Implemented 1.19.4, first pass, light testing 2023-03-21 20:28:05 +01:00
ReinforceZwei
657fc6117b Upgrade protocol to 1.19.3 2023-01-10 18:27:48 +08:00
BruceChen
6c3bfb82ee Remove color code from text 2022-11-30 16:08:55 +08:00
BruceChen
0b5a562f7f [SKIP_DEPLOY] Support account alias in configs 2022-11-06 16:20:38 +08:00
BruceChen
077e3a5e9f
Crowdin localization support (#2310)
* Switching to use resource files

* Update Crowdin configuration file

* Code cleanup
2022-10-28 11:13:20 +08:00
BruceChen
db6d6c80bf Bug fix 2022-10-16 20:37:07 +08:00
BruceChen
16c1d1fd77 Refactoring Settings.cs 2022-10-05 15:02:30 +08:00
BruceChen
53898f3446 Fix xxx.Parse 2022-10-04 11:53:07 +08:00
BruceChen
1d52d1eadd
Fix all warnings & Trim (#2226)
* Fix AutoFishing crash
* Fix all warnings
* Remove DotNetZip.
* Fix the usage of HttpClient.
2022-10-02 18:31:08 +08:00
BruceChen
0d1f930c65 Trim 2022-09-08 15:54:56 +08:00
BruceChen
af1485c753 login support 2022-08-24 12:37:22 +08:00
BruceChen
a8bbb1ac76
Basic support for minecraft 1.19 (#2084)
* merge commit from milutinke
* chat signature & encrypted login
* Bug fix :EncryptionResponse format error below 1.18.2
* Implemented chat command signature
* Chat message parsing and verification for 1.19
* Add signature settings
* Update Simplified Chinese Translation
* Clear up comments
* Fix wrong variable naming
* Bug fix: SignatureV2 Processing
2022-08-15 17:55:44 +02:00
breadbyte
d9f1a77ac2
.NET 5+ Support (#1674)
Implement changes to support .NET 5 onwards.
Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2022-07-03 22:34:07 +08:00
Leon Heuer
a202f31aaf
Update version to 1.18.2 (#1961) 2022-03-21 23:29:16 +01:00
ReinforceZwei
cc75db7070
MSA: Disable refresh token for MCC signin method (#1925)
* MSA: Change classes to static class

* MSA: Disable refresh token for MCC sign method
2022-02-05 13:07:15 +08:00
ORelio
ed452cf632 Realms API: Handle HTTP request failure (#1921) 2022-01-31 20:56:39 +01:00
ReinforceZwei
4b8ca158a8
Microsoft Sign-in: Add refresh token support (#1838) 2021-12-16 15:53:31 +08:00
ReinforceZwei
bdcf3e5aa2
Update version to 1.18.1 (#1845) 2021-12-10 22:15:00 +08:00
ReinforceZwei
fdc3069083
Microsoft Sign-in: Migrate to our own client Id (#1827)
* Microsoft Sign-in: Migrate to our own client Id

- Drop support of "mcc" sign-in method
- Add nuget packages for decoding JWT

* Remove JWT nuget package

* Remove client secret

It is not needed after changing application type in Azure

* Change token validation method to expiration time

* Revert changes of dropping mcc sign-in method

* Add email pre-fill for browser sign-in
2021-12-04 19:15:58 +08:00
ReinforceZwei
9a9245f193
Update version to 1.18 (#1836) 2021-12-02 21:07:57 +08:00
ORelio
bb4c13168b Mojang Login: Enable TLS 1.2 (#1780)
Enable TLS 1.2 which is disabled by default on .NET 4.0
See also: #1783
2021-10-05 22:09:48 +02:00
ReinforceZwei
029762e0a9
Update to 1.17.1 (#1672) 2021-07-08 14:10:54 +08:00
alex-huff
8bd221c248
Add support for 1.17 (#1630)
* fix caps

* implement 1.17 without terrain

* properly switch order of Tracking Position and Locked for 1.17

* Update MinecraftClient/Protocol/Handlers/PacketTypesIn.cs

Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>

Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
2021-06-11 21:45:33 +08:00
ReinforceZwei
8efb8d80a4 Reamls worlds: Use expired property to determine available world 2021-05-17 16:53:38 +08:00
LesterLian
621e5e2200
Implement Realms support (#1533)
Resolve #51 

* Realms: update to new API; fix HTTP Get

* Realms: suggested changes

Co-authored-by: ORelio <ORelio@users.noreply.github.com>

* Realms: suggested changes

Co-authored-by: ORelio <ORelio@users.noreply.github.com>

* Add negative number support for JSON parser

* Nice print realms worlds result

* Option to join Realms world with world ID

* Suggested changes

Co-authored-by: ORelio <ORelio@users.noreply.github.com>

* Failure handle

Co-authored-by: ORelio <ORelio@users.noreply.github.com>

* world id paired with index

* fix text

* Clean up the code a bit

* Add setting for displaying Realms worlds

* Rename Realms worlds setting

* Put messages into translation file

Co-authored-by: Zizhen Lian <zizhlian@umd.edu>
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
2021-04-12 19:46:33 +08:00
ORelio
49603db657
Server ping: Attempt 1.7+ ping first (#1507)
Forge detection might not work otherwise
2021-03-20 18:00:52 +01:00
ReinforceZwei
71eb1dca17
Implement browser sign-in method (#1447)
* Implement browser sign-in method

* Handle empty link

* Improve

* Handle user cancel login
2021-02-06 09:29:14 +08:00
ReinforceZwei
0cbe543c30
Update to MC version 1.16.5 (#1417)
* Update to MC version 1.16.5

* Remove comments about protocol number
2021-01-16 21:33:40 +08:00
ReinforceZwei
c04c597aba
Implement Microsoft account login (#1397)
* Implement Microsoft account login
* Create proxied web request class
* Whole bunch of code that doesn't work
* I finally FIXED IT
It took me 2 hours to resolve the problem
* Fill the missed method summary
* Remove some unused code
* Revert http version
* Remove JSON parsing bug workaround
Not needed anymore as per e06438b582
* Remove comment asking about clientID
Client ID is used for session token refreshes. Random UUID without hyphens
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2021-01-06 21:14:51 +01:00
DanisDGK
bea5161d6f
Add support for 1.16.4 (#1311) 2020-11-03 19:04:34 +01:00
ORelio
d3f150ba12 Allow force-enabling Forge support for 1.13+ (#1184)
Skip login step and join even when forge info is missing in server info.
However, this only works for 1.13+. Server info retrieval is required
for enabling Forge support on older Minecraft versions.
2020-10-18 13:09:49 +02:00
ReinforceZwei
2017d5d652
Add support of language files (#1273)
* Basic support of language file
Only mapped main part of MCC.
* Translations function imporve
* Change translation file naming
* Fix default translation file naming
* Complete translation file mapping for main part
Command and ChatBot not done yet
* Complete translation mapping for commands
Except Entitycmd
* Complete translation mapping for ChatBots
* Add new method for replacing translation key
Just for Entitycmd. Be proud of yourself. We have a convenient method now.
* Complete all translation mapping
* Add default config and translation file to resource
* Remove untranslatable messages from default translation file
2020-10-17 13:41:31 +02:00
ReinforceZwei
9bfb2bf6c7 Update supported version to 1.16.3
Nothing got changed in 1.16.3
2020-09-11 23:00:48 +02:00
ReinforceZwei
7e20e409a8
Add support for creating replay mod capture files (#1246)
* Add test replay handler
* Fix incorrect built raw packet
* Fix incorrect built raw packet
* Add filter
* Add not working zip lib
* Add dotNetZip lib and complete basic function
* Update ReplayHandler.cs
* Complete Replay handler
Without client player handling
* Complete replay mod
- New ChatBot OnNetworkPacket event
* Add auto-backup and command for Replay Mod
* Add ReplayMod description to readme
* Small naming changes, fix compile error on .NET4.0
* ReplayHandler slight optimizations
Use Path.Combine to automatically use Windows '\' or Linux '/'
Move re-usable common parts outside the Replay handler
Small optimizations in building JSON strings
Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-09-06 21:51:42 +02:00
ReinforceZwei
6bbb7236e3
Add support for Minecraft 1.16.2 (#1214)
* Implement MC version 1.16.2 basic support
All packets ID update done
Tested in 1.16.2 craftbukkit server
* Implement MC 1.16.2 entity handling
New EntityPalette
* Add back protocol version checking for entity handling
Was removed during testing and forgot to add it back
* Implement inventory handling for MC 1.16+
Item ID got changed in 1.16+ so a palette is needed.
* Fix ChangeSlot command
What a joke
* Handle 1.16 new entity properties name
Convert new naming style to old style
* Revert "Handle 1.16 new entity properties name"
This reverts commit 52c7d29062.
* Update AutoAttack to use the new entity properties key
* Fix item type to ID conversion
* Sort item types by name
* Remove ZombiePigmanSpawnEgg
User ZombifiedPiglinSpawnEgg instead (new name for same item)
* Add missing 1.16.2 version strings
* Remove old ItemTypeGenerator
* Sort entity types by name
* Palette loading, instructions, NotImplemented err
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-08-17 17:08:50 +02:00
ORelio
c4647c35ef Fix timeout on resolving SRV records (#1095) 2020-06-30 23:13:19 +02:00
Bas950
c82c91705c ♻️ Whoopsy.. 2020-06-27 16:51:25 +02:00
Bas950
d06f14d055 Added 1.16(.1) support 2020-06-27 16:48:46 +02:00
ORelio
4362de4540 Fix #1018 (ThreadAbortException) 2020-05-24 19:57:32 +02:00