Commit graph

53 commits

Author SHA1 Message Date
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
ORelio
8560753949 Extend BrandInfo setting
Brand Information tells the server what client is being used to connect
to the server, possible values are the following:

- none (do not tell anything)
- vanilla (tells that you are using MC vanilla)
- mcc (tell that you are using MCC + version)

This will usually not do anything unless plugins developers use this
information for developing some MCC interoperability eg more chat
interactions instead of using GUIs. This could also be used to block
third party clients, that's why brand information can be disabled or
changed to vanilla.
2015-09-29 14:03:33 +02:00
ORelio
c88d150976 Fix Offline BungeeCord 1.5.2 requiring encryption
Vanilla minecraft encryption can be unofficially bypassed on pre-1.7
minecraft when connecting to offline-mode servers (now it IS officially
bypassed in offline mode in 1.7+), but BungeeCord 1.5.2 requires
encryption even in offline-mode, so enable encryption even in
offline-mode. Bug report by xp9kus.
2015-07-23 21:38:58 +02:00
ORelio
3ce91188c7 Add support for C# scripts in scripting bot
- Now scripts can also be written in C#
- C# scripts can access ChatBot API
- Add more methods in ChatBot API
- Add an example of C# script file
- Coding style fixes: method names ucfirst
2015-06-20 22:58:18 +02:00
ORelio
3224c59eab Remove padding mechanism
Not needed anymore since proper encryption is now used under Mono
2015-06-19 19:40:18 +02:00
ORelio
a7f0897f09 Add 1.8.5 - 1.8.7 as supported versions
+ Improve wording: answer -> respon[d|se]
2015-06-19 18:42:24 +02:00
ORelio
8e458f7ab9 Add /list support in Protocol16
Removed fallback to server /list command
2014-11-11 12:35:08 +01:00
ORelio
f99efb5177 Better connection lost detection
To detect that the TCP connection has been lost, try sending a small
packet every ~10 seconds. If the connection is lost, it will then throw
an exception which will allow MCC to detect that connection is lost, and
eventually properly trigger the AutoRelog bot.
- See issue #41 -
2014-08-11 12:38:39 +02:00
ORelio
cfb313fa01 Several fixes
Fix Alerts bot not displaying several occurences in a row
Fix Script bot not displaying in console what it is performing
Fix IOException not caught when connection is lost
2014-07-01 14:10:29 +02:00
ORelio
8b5ce567a6 Add setting for manually choosing MC version
- User can manually provide server version in config file
- Server is not pinged if a minecraft version was manually provided
- If the provided version isn't recognized, ping is re-enabled
2014-06-14 16:01:19 +02:00