Commit graph

62 commits

Author SHA1 Message Date
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
xXjojaXx
76a10c0cd8
Spectator-Teleport Implementation (#1825) 2021-11-18 00:33:52 +08:00
ReinforceZwei
b15c3a8e46
Fix calling schedule task cause deadlock (#1586) 2021-05-12 22:31:06 +08:00
ORelio
aee09d9f52 Add TCP read timeout to server ping
See #1321, #1348, #1357
2020-12-05 14:24:41 +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
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
Amber Alex
0c88c18ea0
Change color of "feature not handled" from gray to red (#1265)
Changing the color for the "terrain/inventories/entities not handled for that version" message from gray to red.
2020-09-26 16:09:34 +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
ORelio
24b3dac2a3 Show server ping json in debug messages (#1184) 2020-08-08 14:30:39 +02:00
Рома Данилов
fb50b0d5cb
ChatBot API: OnScoreboardObjective, OnEntityEffect, OnUpdateScore, EntityInteract, Hand list (#1097)
* Create Effect.cs
* Rename Effect.cs to Effects.cs
* Update MinecraftClient.csproj
* Update Effects.cs
* Update Effects.cs
* add EntityEffect
* Update McClient.cs
* Update Protocol18.cs + EntityEffect
* Update IMinecraftComHandler.cs
* Update Protocol18PacketTypes.cs + EntityEffect
* Update ChatBot.cs + OnEntityEquipment
* Update PacketIncomingType.cs + ScoreboardObjective
* Update Protocol18PacketTypes.cs
* Update Protocol18.cs
* Update IMinecraftComHandler.cs + OnScoreboardObjective
* Update McClient.cs + OnScoreboardObjective
* Update ChatBot.cs + OnScoreboardObjective event
* Update Protocol18.cs: fix scoreboard
* Update McClient.cs
* Update ChatBot.cs
* Update PacketIncomingType.cs
* Update ChatBot.cs + OnUpdateScore
* Update McClient.cs + OnUpdateScore
* Update IMinecraftComHandler.cs + OnUpdateScore
* Update Protocol18.cs
* Update Protocol18PacketTypes.cs
* Update Protocol18.cs + fix micro lags
* Update Protocol18.cs
* Update Protocol18.cs
* Update Protocol18.cs
* Update Protocol16.cs
* Update Protocol18.cs
* Update McClient.cs
* Update IMinecraftCom.cs
* Update McClient.cs
* Update McClient.cs
* Update McClient.cs
* Update ChatBot.cs + GetEntities()
* Create Hand.cs
* Update MinecraftClient.csproj
* Update McClient.cs
* Update ChatBot.cs
* Update Protocol18.cs
* Update ChatBot.cs
* Update ChatBot.cs
* Update ChatBot.cs
* Update ChatBot.cs
* Update ChatBot.cs: fix
* Update AutoAttack.cs: Fix
* Update McClient.cs: compile fix
* Update ChatBot.cs
* Update AutoAttack.cs
* Update ChatBot.cs
* Update Protocol18.cs
* Update IMinecraftComHandler.cs
* Update McClient.cs
* Update ChatBot.cs
* Update Protocol18.cs
* Update IMinecraftComHandler.cs
* Update ChatBot.cs
* Update McClient.cs
* Update McClient.cs: remove check distance
* Update EntityActionType.cs: more actions
* Create CommandBlockMode.cs
* Create CommandBlockFlags.cs
* Update IMinecraftCom.cs
* Update McClient.cs
* Update ChatBot.cs
* Update Protocol18.cs
* Update Protocol16.cs
* Update PacketOutgoingType.cs
* Update Protocol18PacketTypes.cs
* Update Protocol18.cs
2020-07-04 10:45:51 +02:00
ORelio
4cc29a6ee6 Adjust dig block API
Attempt to automate dig start and dig complete (#1077)
2020-06-20 21:30:26 +02:00
ORelio
6df5076d19 DigBlock/PlaceBlock: Use Direction enum
Still work in progress (#1071)
2020-06-20 16:07:59 +02:00
Рома Данилов
b52435f0ce
Implement OnMapData, OnTitle, UpdateSign, OnEntityEquipment, Useblock (#1071)
* + Fix null PlayerInventory

+ Fix null PlayerInventory

* Update Protocol18.cs

* Update McTcpClient.cs

+ Fix https://github.com/ORelio/Minecraft-Console-Client/issues/1022

* Update Protocol18.cs

+ MapData

* Update PacketIncomingType.cs

+ MapData

* Update Protocol18PacketTypes.cs

* Update IMinecraftComHandler.cs

+ OnMapData

* Update McTcpClient.cs

+ OnMapData

* Update ChatBot.cs

+ OnMapData

* Update Protocol18.cs

* Update Protocol18PacketTypes.cs

+ Fix

* Update PacketIncomingType.cs

+ Title

* Update Protocol18PacketTypes.cs

* Update Protocol18.cs

* Update IMinecraftComHandler.cs

+ OnTitle

* Update McTcpClient.cs

* Update ChatBot.cs

+ OnTitle

* Update Protocol18.cs

Fix

* Update IMinecraftComHandler.cs

* Update McTcpClient.cs

* add ClearInventories()

* add ClearInventories()

* Update McTcpClient.cs

+ OnTitle

* Preparing to Add BlockAction

* Update PacketOutgoingType.cs

* Update PacketOutgoingType.cs

* Update Protocol18.cs

+ SendUpdateSign

* Update Protocol16.cs

+ SendUpdateSign

* Update IMinecraftCom.cs

+ SendUpdateSign

* Update McTcpClient.cs

+ UpdateSign

* Update ChatBot.cs

+ UpdateSign

* Update McTcpClient.cs

Update PlaceBlock

* Update ChatBot.cs

* Update McTcpClient.cs

* add SendCreativeInventoryAction nbt

add SendCreativeInventoryAction nbt

* Update Protocol18.cs

* Update Protocol16.cs

* Update McTcpClient.cs

* Update ChatBot.cs

* Update Inventory.cs

* Update Protocol18PacketTypes.cs

* Update PacketIncomingType.cs

* Update Protocol18PacketTypes.cs

* Update Protocol18PacketTypes.cs

Fix

* Update Protocol18PacketTypes.cs

Fix

* Update IMinecraftComHandler.cs

* Update IMinecraftComHandler.cs

* Update ChatBot.cs

* Update McTcpClient.cs

+ OnEntityEquipment

* Update Protocol18.cs

* Update McTcpClient.cs

* Update McTcpClient.cs

* Update McTcpClient.cs

* Update ChatBot.cs

* Update McTcpClient.cs

* Update McTcpClient.cs

* Update ChatBot.cs

* Update McTcpClient.cs

* Update McTcpClient.cs

* Update ChatBot.cs

* Update McTcpClient.cs

* Update McTcpClient.cs

* Update Protocol18.cs

* Update McTcpClient.cs

* Update ChatBot.cs

* Update ChatBot.cs

* Update McTcpClient.cs

* Update McTcpClient.cs

* Update McTcpClient.cs

* Update Protocol18.cs

* Create Useblock.cs

* Update MinecraftClient.csproj

* Update McTcpClient.cs
2020-06-20 14:57:07 +02:00
Рома Данилов
cf9bc4c3d5
Add SendPlaceBlock, PlayerDigging, OnExplosion, OnGamemodeUpdate, OnSetExperience (#1027)
* Update ChatBot.cs

+ PlaceBlock

* Update AutoAttack.cs

+ HitAnimation

* Update PacketIncomingType.cs

+ Explosion,

* Update McTcpClient.cs

+ OnExplosion

* Update ChatBot.cs

+ OnExplosion

* Update IMinecraftComHandler.cs

+ OnExplosion

* Update Protocol18PacketTypes.cs

+ PacketIncomingType.Explosion

* Update ChatBot.cs

+ Fix

* Update AutoAttack.cs

+ Fix

* Update ChatBot.cs

+ Fix

* Update Protocol18PacketTypes.cs

+ Old versions

* Update Protocol18PacketTypes.cs

+ 1.7 - 1.8 Explosion ID

* Update Protocol18PacketTypes.cs

+ Fix

* Update McTcpClient.cs

+ int ExplosionRecordCount

* Update ChatBot.cs

+ recordcount

* Update IMinecraftComHandler.cs

+ ExplosionRecordCount

* Update Protocol18.cs

* Update CSharpRunner.cs

+ using MinecraftClient.Inventory;

* add OnGamemodeUpdate

+ OnGamemodeUpdate

* + OnGamemodeUpdate(playername, uuid, gamemode)

+ OnGamemodeUpdate

* Update Protocol18.cs

* Update IMinecraftComHandler.cs

* Update McTcpClient.cs

Fix

* Update McTcpClient.cs

* Update Protocol18.cs

+ Location explodelocation

* Update McTcpClient.cs

+ Location explode

* Update ChatBot.cs

+ Fix

* Update ChatBot.cs

Remove excess +

* Update Plays animation

* Improve documentation

* ItemType fix

* OnExplosion(Location explod);

* Update PacketIncomingType.cs add SetExperience,

* + Old versions

* Update IMinecraftComHandler.cs

* Update McTcpClient.cs

* Update Protocol18.cs

* add GetLevel & GetTotalExperience

* Fix

* add GetLevel & GetTotalExperience

* OnSetExpience

* Update ChatBot.cs

Fix

* Update McTcpClient.cs

+ bot.OnSetExperience

* Update Protocol18.cs

+ Fix

* Update McTcpClient.cs

+ PlayerDigging

* Update PacketOutgoingType.cs

+ PlayerDigging

* Update Protocol18PacketTypes.cs

+ case PacketOutgoingType.PlayerDigging

* Update Protocol18.cs

+ SendPlayerDigging

* Update IMinecraftCom.cs

+ SendPlayerDigging

* Update McTcpClient.cs

+ PlayerDigging

* Update Protocol16.cs

+ SendPlayerDigging

* Update ChatBot.cs

+ PlayerDigging

* Update ChatBot.cs

+ Fix

* Update McTcpClient.cs

+ Fix

* Update ChatBot.cs

Add WindowAction

* ChatBot.cs Fixes

* Further ChatBot.cs fixes

* Further ChatBot.cs fixes

* Protocol Handler fixes

* Protocol Handler fixes

* IMinecraftCom fixes

* documentation fixes

Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-05-29 20:18:34 +02:00
ORelio
b2e6953075 Fix missing packet IDs for older MC versions
Fix packets not implemented for versions older than 1.14
Please implement all versions when adding a new packet!
2020-05-26 13:01:01 +02:00
ORelio
efb49fd05d Improve documentation, fix file encoding (#1026) 2020-05-26 11:20:12 +02:00
Рома Данилов
87b2d3bf4a
new command /animation (#1026) 2020-05-26 11:02:09 +02:00
ORelio
23870711a0 Code refactoring (related to #1024) 2020-05-25 21:39:24 +02:00
Рома Данилов
d120001d70
Add Entity.Name & /inventory 0 creative <slot> <itemtype> <count> (#1024)
* Update Program.cs

* Update Entity.cs

Add Entity.Name

* Update Program.cs
* Update Entity.cs

Add break;

* Update Entity.cs

* Update Inventory.cs

Add /inventory 0 creative <slot> <item> <count>

* Update PacketOutgoingType.cs

+ CreativeInventoryAction

* Update Protocol16.cs

+ SendCreativeInventorAction

* Update Protocol18.cs

+ SendCreativeInventorAction

* Update IMinecraftCom.cs

+ SendCreativeInventorAction

* Update McTcpClient.cs

+ DoCreativeInventorAction

* Update ChatBot.cs

+ CreativeInventorAction

* Update McTcpClient.cs
* Update ChatBot.cs
* Update Inventory.cs

Add show count

* Update ChatBot.cs

+ ChatBot fix

* Update Inventory.cs

Inventory update and Fix

* Update Entity.cs
* Update McTcpClient.cs
* Update Program.cs
* Update Protocol16.cs
* Update Protocol18.cs
* Update IMinecraftCom.cs
* Update Entity.cs
2020-05-25 21:16:53 +02:00
ReinforceZwei
d6022d1ee9 Rename ClickWindow to WindowAction 2020-05-24 14:44:33 +02:00
ReinforceZwei
4f96aa2081 Implement inventory right click 2020-05-24 14:44:33 +02:00
CarbonNeuron
04068cdb24 Return False for unimplemented actions 2020-05-03 11:22:41 -05:00
CarbonNeuron
384c804e54 Added Entity Action handling, and A TSneak command that will Toggle Sneak. 2020-05-01 08:28:22 -05:00
ORelio
116efc5e78 Add additional error messages on login failures
See #976
2020-04-30 17:37:57 +02:00
ORelio
b01c50b792 Improve logging, auto respawn
See discussion in GitHub issue #918
2020-04-01 21:15:35 +02:00
ORelio
e04f06cece Interact with inventories
The /inventory command allow listing inventory and clicking on items
Should be enough for operating GUI menus such as Server chooser/teleporter
2020-03-29 18:41:26 +02:00
ORelio
195e162c7d Add code documentation, move and rename a few methods 2020-03-28 00:48:41 +01:00
ReinforceZwei
bc449b404e Inventory handling 2020-03-27 13:10:37 +01:00
ReinforceZwei
dbf5334758 Moved Auto attack and auto fishing to ChatBots and added ChatBotAPI for entity handling 2020-03-24 19:23:59 +01:00
ReinforceZwei
51d03b9ced Added basic auto fishing 2020-03-24 19:23:59 +01:00
ReinforceZwei
0b0e3c334e auto attack 2020-03-24 19:23:59 +01:00
ORelio
877e50579d Add connection timeout using server keepalives
Vanilla client will consider that connection has been lost
when no server keepalive was received during the last 30 seconds.
This commit implements a similar mechanism in MCC. See #802
2019-09-15 17:01:53 +02:00
ORelio
295d6546b8 MC 1.14 Basic/Chat support (#703)
Implement MC 1.14 baseline protocol support
Terrain and movements not supported yet for 1.14
2019-04-29 00:26:32 +02:00
ORelio
a6e660c974 Enable/Disable TerrainAndMovements while logged in
Feature requested in #705
2019-04-28 21:32:03 +02:00
Stanley Powers
8bfdb2ab59 Look command 2019-04-12 16:25:15 +02:00
ORelio
dc09896959 Allow access to raw JSON messages from ChatBot
See #275
2017-05-31 20:54:16 +02:00
ORelio
a344ac4101 Implement more realisic fall to ground
Should help moving around in servers using anti-cheat plugins.

See #195
2017-03-10 23:40:02 +01:00
ORelio
609b939159 Minecraft 1.11: Raise chat message max length to 256 2016-11-19 16:06:08 +01:00
ORelio
1180c06b1f Show links embedded in chat
Allows clicking if supported by terminal,
or at least copy and paste to web browser.

Suggestion by brkmrr9 in #207
2016-10-07 19:52:28 +02:00
ORelio
2a07fbbae6 Remove tab display name experiment (not working)
- Tab display names should hold display name but...
 - Server sends <UUID, name, null> x Player count
 - TabListPlus sends <SlotID, ???tab#01, SlotText> x Slot Count
 - So we don't have player display names, only worthless slots
 - So the whole feature was useless, reverting to name only.
2016-08-27 15:46:34 +02:00
ORelio
61ce935c63 Add support for Minecraft Settings
- Add Minecraft vanilla settings from Settings screen
 - These settings are sent to server when joining
 - Allows to customize skin layers shown to other players
 - Most other settings are ignored by servers
 - Update language file from 1.9 to 1.10 version
 - Minor aesthetic changes in INI file comments

Suggestion by TNT-UP in issue #161 and Splodger1 in MC Forum.
2016-08-26 12:21:38 +02:00
ORelio
9a98a9d46f Store extended player info, list display names
- Add 1.10.1 and 1.10.2 in supported version list
 - Store both player name and player display names
 - List command will sort players by player name
 - List command will now display by display name
 - Ability to use /list raw to display by real name

Suggestion by Johngreen123
2016-08-22 19:40:58 +02:00
ORelio
66d57b0ce6 Cycle through tab-complete results
Allow cycling through tab-complete options sent back by the server by
pressing TAB multiple times in a row. Fix #148
2016-05-14 11:51:02 +02:00
ORelio
e8097206d0 Disable terrain and movements when not handled
Related to #131
2016-03-12 11:01:31 +01:00
ORelio
d45f75f9f4 Reduce output verbosity, default session cache
- Memory session cache will be used by default
 - Verbose messages are now hidden by default
 - Improve ping procedure's Forge handling
 - Fix 1.8.9 and 1.9.0 in mcversion setting
 - SessionCache.cs: fix LF into CRLF
 - Use 1.9 translations instead of 1.8
2016-03-10 13:29:05 +01:00
ORelio
a82c6823af Add support for Minecraft 1.9
Currently no terrain handling but anything else should work.

Related: #125
2016-03-05 19:13:45 +01:00
Pokechu22
1ea8f119d9 Give ChatBots access to plugin channels.
Chatbots may find it useful to send messages over plugin channels.  This allows REGISTERing, UNREGISTERing, and sending over plugin channels, with built-in checking if the server also registered the channel (which can be disabled by the bot if needed). Unused channels are UNREGISTERed when a bot is disabled.
2016-02-07 14:55:10 -08:00
ORelio
72bd485e67 Add basic location handling
- Retrieve player location from the server
- Send back player location from the server
- Requires that a specific setting is enabled
- Should allow items to be picked up by the player
- May also trigger some anti chead plugins
2015-11-27 17:16:37 +01:00
Pokechu22
77277bcf84 Add SendPluginChannelPacket to the IMinecraftCom interface. 2015-10-24 22:35:17 -07:00