Commit graph

791 commits

Author SHA1 Message Date
Daenges
239900451d
Improvements for Discord Webhook (#1544)
* Improve caching and remove unused functions
* Save Player UUID before leaving
Save the UUID when they leave and save it until they join again.
* Clear the cache after disconnect
* Update MinecraftClient/config/ChatBots/DiscordWebhook.cs
2021-04-18 16:14:09 +02:00
ReinforceZwei
92eb4e1457
Update de.ini (#1539) 2021-04-15 22:32:41 +08:00
Daenges
b3bae6c2f8
Add DiscordWebhook ChatBot (#1532)
* Send chatmessages to Discord via webhook.

With corresponding Minecraft skins as profilepicture.

* Support for pings at keywords and server messages.

* Cleanup, Settings Class and applied suggestions.

* Fix all function names

* Improve variable naming and UUID search

* Re-format some comment

* Rename file to DiscordWebhook.cs

* Add message caching and option for disabling UUID lookup

Add Message class
Add Cache class
Change internal Message delivery

* Add an ignore list

Improved help message
Add option to get all settings

* Add feature to deactivat CustomChatDetection

Comment some functions

* Option to unload the bot

Fix crash when not entering a valid ping syntax

Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
2021-04-14 10:21:18 +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
d7089c534f
Adjust line break of default configuration file before writing (#1538) 2021-04-12 19:28:46 +08:00
goldenlib
cca0f1f47c
TreeFarmer: Change sapling direction to up (#1537)
Invalid direction to place the sapling
2021-04-11 22:53:53 +08:00
ReinforceZwei
58feaaa39a
Fix TreeFarmer bot syntax error (#1535) 2021-04-11 21:47:48 +08:00
Daenges
b83fc2c9b9
Add German language support (#1526)
Translated by Daenges and cyb3rko

Co-authored-by: Niko Diamadis <niko@cyb3rko.de>
2021-04-09 21:29:55 +02:00
ReinforceZwei
011eada59b Specify the CSharp version to 4 in project file 2021-04-07 21:01:07 +02:00
ReinforceZwei
53e2413204
Add setting for overriding attack speed for autoattack (#1512)
* Add setting for overriding attack speed for autoattack

* Change cooldown value type to float

* Fix minor grammar issue
2021-03-28 19:26:38 +08:00
ORelio
70d3b6175b Process command prompt text on main thread (#1510)
Fix possible threading issues when MCC commands interactively
2021-03-27 19:15:58 +01:00
ORelio
47c19466c3 Catch exceptions on bot load (#1510)
Also return a copy of ChatBot list inside GetLoadedChatBots()
because UnloadBot() must be used to properly unload the bot
2021-03-27 16:43:57 +01: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
Tan to the Dashi
fd7a84bc91
Add Dockerfile (#1504)
* feat: Add Dockerfile
* fix: Download latest version and not a fixed one

Using jq we can query the appvoyor api to get the latest jobId
2021-03-14 11:14:13 +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
ReinforceZwei
62c985376e
Add command auto-unregister mechanism (#1492)
* Add command auto-unregister mechanism

* Improve logic
2021-03-07 14:21:19 +08:00
ReinforceZwei
4853871ea1
Add lock to chatlog file (#1488) 2021-03-07 14:20:54 +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
ORelio
b78e8e064a
Remove SendText delay in C# scripts (#1480)
Delay is not necessary anymore since MCC has a global message queue now (#661 / 9169036893)
2021-02-25 18:02:41 +01:00
ORelio
4d0d81d5c8
Mark sendImmediately param as deperated ( #1465) 2021-02-12 20:23:03 +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
d19764869c
Fix player inventory being deleted by server (#1430)
* Fix auto drop crash

* Fix player inventory being deleted by server
2021-01-31 08:25:04 +08:00
ORelio
f5f1a22b93 Add sample-script-random-command (#972, #1117) 2021-01-30 23:41:24 +01: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
f20abb6fbc
Imporve auto-craft mechanism (#1415)
Fix #1414
2021-01-15 20:25:23 +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
ReinforceZwei
479f80ccf1 Fix #1393 2020-12-31 13:49:24 +01:00
ORelio
e06438b582 Json parsing fixes
Fix parsing empty arrays and objects containing spaces
See ORelio/Sharp-Tools#1 for more details
2020-12-24 14:32:25 +01:00
ORelio
8aee0cb731
Fix Entity Z not correctly shown (2nd fix #1370) 2020-12-12 22:48:21 +01:00
ORelio
372c59cdbc
Fix Entity location Z not correctly shown (#1370) 2020-12-07 19:01:32 +01:00
Рома Данилов
1c0826a045
Add QIWI OnDonation Optional ChatBot Script (#1360)
* Create QIWIDonation
* Rename QIWIDonation to QIWIDonation.cs
* Update QIWIDonation.cs
* Using double not float
* Add Check type
* Update QIWIDonation.cs
* Rename QIWIDonation.cs to QIWIAPI.cs
* Update QIWIAPI.cs
* Update QIWIAPI.cs
* Update QIWIAPI.cs
2020-12-06 13:07:32 +01:00
Рома Данилов
69c300cf5f
Update VkMessager add Example (#1354)
* Update VkMessager.cs
* Update VkMessager.cs
* Move summary above the ChatBot
* Add minimal working example
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-12-05 14:34:33 +01:00
ReinforceZwei
09800eab31 Add AutoTree ChatBot script
This script is made to work with Minecraft auto-tree machine.
2020-12-05 14:26:25 +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
ReinforceZwei
9b5fde0689
Enable TCP Read Timeout (#1348)
Fix attempt for #1321
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-11-27 22:17:51 +01:00
ORelio
20f6375153 Merge #1332 and #1333
Add optional arguments to DigBlock()
2020-11-14 10:19:55 +01:00
Рома Данилов
2eba2149b7
VkMessagercs: New Methods and VK API version update (#1319)
* New Methods and VK API version update
* Update VkMessager.cs
* Update VkMessager.cs
* Fix code indenting
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-11-08 23:49:19 +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
ORelio
2a7f0c7f16
Mention sample-script-with-chatbot in Readme
This helps debugging chat message detection
2020-11-05 20:13:52 +01:00
ORelio
330dda9c15 Add random demay in AutoRelog
Useful when reconnecting many accounts at once
Related issues: #663, #740, #975, #1312
2020-11-04 19:23:46 +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