Commit graph

75 commits

Author SHA1 Message Date
ReinforceZwei
a51368a859 Add a proof of concept working demo 2020-07-23 19:19:32 +02:00
ReinforceZwei
d043f90d4e Remove duplicated item
Fix #1129
2020-07-15 21:02:08 +02:00
Рома Данилов
835df9b1fc
Add /entity cmd (#1129)
* Update MinecraftClient.csproj

* Create Entitycmd.cs

* Update MinecraftClient.csproj

* Update Protocol18PacketTypes.cs

* Update Protocol18PacketTypes.cs
2020-07-13 19:01:24 +02:00
ORelio
855bdade0b Fixes following pull requests (#1101, #1097)
Fix coding style issues and compile errors
2020-07-04 11:12:27 +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
2add4030f4 Rename McTcpClient to McClient for clarity
+ Fix compile error in #1071
2020-06-20 15:01:17 +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
Рома Данилов
87b2d3bf4a
new command /animation (#1026) 2020-05-26 11:02:09 +02:00
ORelio
bd85c46663 Implement entity types (#1001)
Implement palette generation and investigate palette changes between
versions. Turns out 1.13- has legacy IDs, 1.14 switches to entity
palette and 1.15 refreshes the whole palette just to insert Bee.

Also refactor entity handling code here and there.
2020-05-24 18:21:22 +02:00
ReinforceZwei
d6022d1ee9 Rename ClickWindow to WindowAction 2020-05-24 14:44:33 +02:00
CarbonNeuron
0cd7f2043b Rename Action to EntityActionType, Apply Rename refactoring. 2020-05-03 11:21:34 -05:00
CarbonNeuron
16959d6e65 Remove AutoLook.cs Chatbot because it is not in main project. Also removes it in McTcpClient.cs, and gets rid of the Settings.cs and Default paramaters. 2020-05-01 09:02:15 -05:00
CarbonNeuron
384c804e54 Added Entity Action handling, and A TSneak command that will Toggle Sneak. 2020-05-01 08:28:22 -05:00
ReinforceZwei
b1121e91e3 Add Item type extension 2020-04-09 20:50:34 +02:00
ReinforceZwei
97b0b03c33 Move AutoEat to a ChatBot 2020-04-09 20:50:34 +02:00
ReinforceZwei
bf86259b4b Rename command Status to Health 2020-04-04 15:39:05 +02:00
ReinforceZwei
975e6d4daa Add command to check player health and saturation 2020-04-04 15:39:05 +02:00
ORelio
bc3d6aba00 Implement item types
Github discussion on commit 6929ae236a
2020-03-28 23:30:42 +01:00
ORelio
6929ae236a Add code documentation for inventories 2020-03-28 15:01:08 +01:00
ReinforceZwei
137855a71d Add GetShort() method in dataTypes 2020-03-27 13:10:37 +01:00
ReinforceZwei
13206614c4 Add inventory type convert 2020-03-27 13:10:37 +01:00
ReinforceZwei
bc449b404e Inventory handling 2020-03-27 13:10:37 +01:00
ReinforceZwei
364afdfc72 Update Inventory support version to 1.15.2 and Remove GetInventoryEnabled condition bypass 2020-03-24 19:23:59 +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
850eae86d7 Add command to turn on and off auto attack 2020-03-24 19:23:59 +01:00
ReinforceZwei
0b0e3c334e auto attack 2020-03-24 19:23:59 +01:00
ORelio
c6f00ce686 Add support for Minecraft 1.15
See #834
2019-12-14 14:22:24 +01:00
xPenguinx
5895a4161f Started to implement inventory handling 2019-05-28 18:53:40 +02:00
ORelio
0d58fb9063 MC 1.14 Terrain support (#703)
Minecraft 1.14 is now fully supported.

- Implement NBT parsing to skip NBT field in chunk data
- Update lighting data format in Chunk Data parsing
- Move Chunk Data parsing into Protocol18Terrain.cs
- Improve PaletteGenerator to greatly reduce palette files sizes
- Re-Generate Palette113.cs to reduce its size (378 Kib -> 50 Kib)
- Generate Palette114.cs (57 Kib instead of 516 Kib with prev format)
- Update Material.cs and MaterialExtensions.cs for new block types
2019-05-01 15:31:34 +02:00
ORelio
d2cbc9f1c3 Split Protocol18 protocol into several classes
- Protocol18: Handles Vanilla packets
 - Protocol18Forge: Handles Forge packets
 - DataTypes: Handles packet field encoding/decoding
 - SocketWrapper: Handles encryption and basic R/W operations

This commit should not change anything for end users, only devs.
See also #704 for discussions about this.
2019-04-29 22:30:43 +02:00
ORelio
c04b17cabc Implement Terrain and Movements for MC 1.13
Special thanks to @TheSnoozer and @vkorn for their help!

 - Implement global block Palette mechanism
 - Add class generation tool from blocks.json
 - Regenerate Material.cs and redefine solid blocks
 - Migrate previous Material.cs into Palette112
 - Generate Palette113 from MC 1.13.2 blocks.json
 - Improve Block class to handle up to 65535 block states
 - Adjust terrain parsing, small fixes in packets
 - Remove unused snapshot-related protocol cases

Solves #599
2019-04-25 22:19:50 +02:00
ORelio
2ebc8eded5 Implement file polling for disk session cache
For use in case FileSystemWatcher does not work, see #684
2019-04-17 05:18:19 +02:00
Stanley Powers
8bfdb2ab59 Look command 2019-04-12 16:25:15 +02:00
ORelio
143fcf7155 Move SessionToken.cs 2018-05-25 20:27:31 +02:00
ORelio
26716512c1 Fix Windows version detection for UTF-8 console
Built-in Environment.OSVersion does not work on Win10.
2018-02-11 15:43:58 +01:00
ORelio
dc09896959 Allow access to raw JSON messages from ChatBot
See #275
2017-05-31 20:54:16 +02:00
ORelio
9f1ef83680 Move Json class into main package
See #138
2017-05-06 21:08:56 +02:00
ORelio
6505fcccb3 Add 'Debug' command for toggling debug messages
See #223
2017-03-15 19:14:58 +01:00
ORelio
693073edfc Replace DnDns with HeijdenDns
HeijdenDns seems to do a better job at querying SRV records
2017-03-11 15:28:32 +01:00
ORelio
9cd983c50d Add support for Minecraft Service DNS Records
- Add DnDns library for performing DNS queries
 - Add query method for SRV record
 - Resolve Minecraft services

This allows resolving actual server addresses for
servers using SRV records on their domain names

SRV records are basically DNS redirection eg:

  myserver.net -> srv1.myserver.net:12345

Should solve #186 reported by sammyvsparks and many others.
2016-10-06 19:13:58 +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
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
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
initsuj
57c53be09f caching works. needs documentation and testing 2016-03-02 17:11:15 -07:00
initsuj
75f2f738a2 Added clientID to login call.
Updated project file to include Cache namespace.
2016-03-02 07:25:09 -07:00
ORelio
b0c8f82697 Add simple movements with /move command
- Determine if we can move to the specified direction
 - Add moving ability to the specified direction
 - Add /move command for triggering moves
 - Add move decomp. into steps (more natural)
 - Add pathfinding routines (still WIP)
 - SO YES YOU CAN NOW WALK USING MCC!!!
2015-12-12 16:48:38 +01:00
ORelio
49702e30b8 Add block material database
Taken from Bukkit's Material class, with credits.
Allows to know types and properties of blocks.
+ Use database for "is solid" checks
+ Add "can harm players" method
+ Faster movements, falling seems natural now
+ Shorter error message when ping failed
2015-12-09 23:04:00 +01:00
ORelio
cb00c28b6e Add world handling (and fall to ground)
- World is now properly parsed and stored from chunk data
- Block changes are also handled and world updated accordingly
- Added ground checking, the player will move down to reach the ground
- Performance tweaking in Protocol18, using lists instead of arrays
- Fix player look not properly skipped causing invalid location after
teleport
2015-11-30 15:30:49 +01:00