Commit graph

352 commits

Author SHA1 Message Date
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
04d83bf277 SessionCache: Add backward compatibility for old session file 2021-12-17 09:29:24 +08:00
ReinforceZwei
4b8ca158a8
Microsoft Sign-in: Add refresh token support (#1838) 2021-12-16 15:53:31 +08:00
ReinforceZwei
333358c73b
Fix respawn packet (#1848) 2021-12-11 21:06:17 +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
1d1bd69eb2 Spectator-Teleport: Add MC version check (#1825)
Feature not supported by Minecraft 1.7, only 1.8+
2021-11-18 17:42:31 +01:00
xXjojaXx
76a10c0cd8
Spectator-Teleport Implementation (#1825) 2021-11-18 00:33:52 +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
eba309191c WebRequest: Enable TLS 1.2
Fix #1774
Temporary fix. May not work if .NET Framework 4.6+ missing
2021-10-01 14:32:34 +08:00
Daenges
a05e89cf58
Addition to MojangAPI.cs (#1714)
* Add skin handling to MojangAPI.cs

* Add new skin requests and improve commenting

* Update UUID hash method to detect default player skin
according to https://github.com/ORelio/Minecraft-Console-Client/pull/1714#issuecomment-894751307

* Add custom return types

* Add ServiceStatus enum for the mojang services
2021-08-13 14:27:53 +08:00
Daenges
6a361ed674
Integration of the Mojang API (#1709)
* Add Mojang API integration

* Addition in MinecraftClient.csproj

* Move Mojang API to Protocol namespace

* Add changes of MinecraftClient.csproj

* Add rate limit warning

* Improve rate limit warning
2021-08-06 14:25:46 +08:00
ReinforceZwei
982f358bf3 ResourcePackSend: Add URL checking for invalid resource pack 2021-07-10 19:28:39 +08:00
ReinforceZwei
581095e03e ResorecePackSend: Attempt to resolve #1667 2021-07-08 14:22:27 +08:00
ReinforceZwei
029762e0a9
Update to 1.17.1 (#1672) 2021-07-08 14:10:54 +08:00
Рома Данилов
48577bf034
More events (#1660)
* + OnBlockBreakAnimation

* + OnBlockBreakAnimation

* + OnEntityAnimation

* Add checks

* + OnBlockChange

* + OnMultiBlockChange

* Fix

* Fix

* Fix

* add summary

* Fix

* fix other summary
2021-07-04 14:26:41 +08:00
ORelio
1f2137c985 ResourcePackSend: Fix 1.17 regression (#1637)
New fields in 1.17 were also read for older versions
2021-06-17 22:46:03 +02:00
ORelio
39b7d878dd Handle negative value in server ping (#1626) 2021-06-11 23:11:32 +02: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
ORelio
e6b2b87366 Prevent infinite loop in StartEncryption (#1150) 2021-05-22 11:21:21 +02:00
ReinforceZwei
8efb8d80a4 Reamls worlds: Use expired property to determine available world 2021-05-17 16:53:38 +08:00
ORelio
95d6318350 Implement thread-safe ChatBot API (#1510, #1579)
+ Rework task scheduling in chatbots
+ Switch back terrain processing to tasks
2021-05-15 17:36:16 +02:00
ORelio
c1cfaf520d Improve InvokeOnMainThread mechanism
Add documentation to make the invoke mechanism easier to understand
Make it clear in documentation that code is invoked synchronously
Use Action and Func<T> for minimizing the amount of code to write
Use type parameter T to automatically adjust return value type
Throw exceptions on the calling thread, not the main thread
2021-05-15 16:31:02 +02:00
ReinforceZwei
9e5364a4ff
Use a dedicated thread to process world data (#1585)
This change allow low-end devices to join servers without timeout
2021-05-12 20:07:53 +02:00
ReinforceZwei
b15c3a8e46
Fix calling schedule task cause deadlock (#1586) 2021-05-12 22:31:06 +08:00
ReinforceZwei
750684e010
ReplayMod: Prevent file backup while saving replay (#1562) 2021-05-01 20:38:41 +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
ReinforceZwei
c15b071cad
New entity status packet event (#1506) 2021-03-21 22:17:19 +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
90505dbc4c
New method for getting looking location (#1503)
* New method for getting looking location

* improve
2021-03-13 22:23:58 +08:00
ReinforceZwei
240468ad22
Implement log to file logger (#1494)
* Implement log to file

Logger moved to it's own namespace

* Add lock to log file
2021-03-07 14:23:26 +08:00
ORelio
771a5b9e08 Catch Zlib exceptions (#1483)
Consider that connection is lost on invalid Zlib data
2021-02-27 22:37:21 +01:00
ReinforceZwei
9d41e2223d
Implement dynamic sleep time (#1459)
* Dynamic sleep time

* Small code refactor in dynamic sleep time

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2021-02-06 09:30:41 +08: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
38a890f840
Implement new logger (#1426)
* Implement multi-channel logger

* Implement chat filter

* Improve a bit

* Improvement

* Add debug message filter and filter mode

* Avoid duplicate debug prefix string

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2021-01-29 07:45:18 +08:00
ReinforceZwei
939c8fb383
Fix crash on unknown packet IDs on some Forge servers (#1422)
* Fix unknown packet ID cause crash (#1419)
* Ignore unknown packet ID only if forge enabled
2021-01-18 20:12:53 +01: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
106acab66f
Impove MS authentication error feedback (#1410)
* Impove MS authentication error feedback

* Modify old error message

* Improve 2FA error message

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2021-01-14 12:24:51 +08:00
ReinforceZwei
7cbf677e0c Fix compile error (#1397) 2021-01-07 14:38:51 +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
ORelio
aee09d9f52 Add TCP read timeout to server ping
See #1321, #1348, #1357
2020-12-05 14:24:41 +01:00
ReinforceZwei
53bd56100f
1.16+ Terrain and Movement support (#1353)
* First implementation
* Improve chunk reading performance
* Fix indentation
* Remove debug information
* Update MultiBlockChange packet
* Move skip varint to a method
* Fix crash when not using block palette
* Fix DataTypes.cs not compiling on .NET 4.0
Binary (0b) values not handled so converted to Hexadecimal (0x)
* Use the 1.16 chunk parsing code for 1.15 too
Document the differences in padding and factor the code
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-11-28 20:48:35 +01:00
mexiscool
28f47cc532
Adds support for villager trading (#1316)
* adds villager trading support
Adds handler for tradeList packet and selectTrade packet
* added extra line at end
* removed tab; removed size and hasSecondItem
removed a mistakenly added tab instead of 4 spaces. SelectTrade was already added in 1.13. Removed unnecessary size and hasSecondItem from trade dataType.
* Added VillagerInfo class and capitalized vars in Trade class
* Update VillagerInfo.cs
* Small formatting/naming adjustments
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-11-08 23:39:07 +01:00
DanisDGK
bea5161d6f
Add support for 1.16.4 (#1311) 2020-11-03 19:04:34 +01:00
ReinforceZwei
0c3f774c07 Fix interact entity not being correctly implemented 1.16+ 2020-11-02 19:01:23 +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