Commit graph

152 commits

Author SHA1 Message Date
BruceChen
5cb97ee00b Adaptable width 2022-09-06 23:21:14 +08:00
BruceChen
e69305f4fc Trim 2022-09-06 21:40:44 +08:00
BruceChen
3dac1f41d1 Add tips 2022-09-06 16:10:34 +08:00
BruceChen
c50477a712 Marking chunk 2022-09-06 15:25:27 +08:00
BruceChen
6430f13d3e Add "/chunk status" command 2022-09-06 14:54:49 +08:00
BruceChen
e5c3b914dd Trim before parse 2022-09-05 22:21:04 +08:00
BruceChen
0eb8d9998c Support for using relative coordinates in /move 2022-09-05 22:03:47 +08:00
BruceChen
ed8e97fd2d Bug fix: /move command went to the wrong location 2022-08-25 14:36:15 +08:00
BruceChen
01ef9a89ca Bug fix: Cancel chunk load task when switching worlds 2022-08-24 18:16:16 +08:00
ORelio
1ce7850193 MC 1.17/1.18 Terrain/Entity/Inventory (#1943)
Merge branch 'master' of github.com:milutinke/Minecraft-Console-Client into milutinke-master

Manually fix merge conflicts
Additional changes:
 - WindowItems: Fix data type for "elements" below 1.17
 - DestroyEntities: Fix packet palettes and remove DestroyEntity
 - EntityMetadata: Throw exception if health field mapping is not updated

Co-authored-by: Milutinke <bgteam@live.com>
Co-authored-by: BruceChen <MrChen131217@gmail.com>
2022-08-19 16:35:55 +02:00
Milutinke
af6f655d5e Fixed the requested changes for Terrain Movement. Tested and working. 2022-08-18 20:58:49 +02:00
Booquefius
613f52d3ae
AuotoAttack: add support for multiple interact modes (#2044)
* Adds support for multiple interact modes
* Entity interaction: Implement enum

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2022-08-15 23:31:17 +02:00
BruceChen
94fd8b118d "/move X Y Z" now moves the player to the center of the block first 2022-07-25 18:11:10 +08:00
BruceChen
b0b45a74a0 Make chunk loading status to be displayed using "/move" command 2022-07-25 14:20:24 +08:00
BruceChen
357820e1c2 Fix bugs in gravity handle 2022-07-25 03:19:24 +08:00
BruceChen
af574b654e avoid pathfind to an unloaded chunk | remove debug logs 2022-07-23 23:10:06 +08:00
Marko von Oppen
8795aab810
Add command to disable Gravity (#1955)
Allow disabling gravity (flying) for servers that allow this.
/move gravity: show gravity handling status
/move gravity on: enable gravity handling (falling)
/move gravity off: disable gravity handling (flying)

Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2022-03-06 19:37:27 +01:00
Daenges
095c9cf137
Fix quote detection in /setrnd (#1915)
* Fix quote detection in /setrnd
Before the function crashed when entering quoted strings.
* Fix indentation
* Fix out of array error
2022-01-24 16:15:44 +01:00
Daenges
bbe000b640
Fix /move crash and /setrnd (#1914)
* Fix /move crash
* Fix substring cutting in SetRnd
2022-01-23 21:31:44 +01:00
Daenges
dd3fd3c9d2
Add "-f" to the /move command (#1874) 2021-12-29 22:34:40 +08:00
ORelio
259ef80cf9 Inventory: Select foreground container (#1875)
When several containers are open "/inventory container" will select
the container with highest ID (i.e. foreground container)
2021-12-28 11:15:11 +01:00
ReinforceZwei
e68a51dcff Move parseCommandLine method to command class 2021-12-15 21:25:24 +08:00
Daenges
381b8ea7d1
Add setrnd command (#1846)
* Add setrnd command

* Make rand private

* Add console-like argument behaviour

* Remove unused using declarations

* Add german and english translations

* Improve translation, Add notice to config README, Add check wheather arguments are provided

* Add some comments

* Remove typo

* Add %player% constant to setrnd

* Remove test variable and add comments

* Remove typo

* Reverse changes

* Remove translations
2021-12-15 18:51:16 +08:00
ORelio
f16e9e87dd Add support for inventory layout as ASCII art (#906)
Inventory art mostly made by Mhowser
TODO: Implement remaining inventory types
2021-05-29 15:21:38 +02:00
ORelio
64123a26a5 Add /inventory creativedelete (#1590) 2021-05-15 20:11:07 +02:00
ReinforceZwei
073458f5f2
Improve inventory command output (#1582)
* Improve inventory command output

* Remove unused code

* Sort item list before printing

* Fix incorrect container slot count

* Update Container.IsHotbar method
2021-05-11 14:02:47 +08:00
ReinforceZwei
1cd7c098c3
Add command for dropping items from inventory (#1581)
* Add command for dropping items from inventory
* Allow other container to be used
2021-05-10 20:27:18 +02: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
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
Рома Данилов
02e294e3e8
Fix entity handling crash (#1241)
Fix #1237
* Fix crash
* Update Entity.cs
* Update Entitycmd.cs
* Update McClient.cs
2020-08-27 19:33:45 +02:00
Рома Данилов
896cabb6ce
Improve /entity, add entity equipment and item lore (#1238)
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Color fix
* Update Entitycmd.cs
* Update Entitycmd.cs
* Entities list CustomName fix
* Update Entity.cs
* Update McClient.cs
* Update Entity.cs
* Update Entity.cs
* Update Entitycmd.cs
* Crash fixes
* Update Entitycmd.cs
* Update McClient.cs
* Update Entitycmd.cs
* Remove extra space
* Space add
* Update Item.cs
* Update McClient.cs
* Update Entitycmd.cs
* Replace item slot if already set
2020-08-26 18:58:45 +02:00
ORelio
70c991cd30 Calulate dig range using eyes location (#1228) 2020-08-24 00:06:52 +02:00
ORelio
676c6a68a7
Allow digging up to 5 blocks away (#1228)
Current calculation was limiting to >= 4 blocks away, but vanilla Minecraft can dig up to 5 blocks away.
2020-08-23 20:35:54 +02:00
Рома Данилов
c2e2e85063
Add Entity.Item, Entity.CustomName, OnEntityMetadata event (#1222)
* Add New Event
* new Event
* Add OnEntityMetadaTa
* Update ChatBot.cs
* Update Protocol18.cs
* Update Entity.cs
* EntityCMD Update
* Update IMinecraftComHandler.cs
* Update Protocol18.cs
* Update IMinecraftComHandler.cs
* Update McClient.cs
* Update IMinecraftComHandler.cs
* Update McClient.cs
* Update McClient.cs
* Update McClient.cs
* Update McClient.cs
* Update ChatBot.cs
* Update McClient.cs
* Update Entity.cs
* Create EntityPose.cs
* Update MinecraftClient.csproj
* Update McClient.cs
* Update EntityPose.cs
* Update Entity.cs
* Update McClient.cs
* Remove debug line
* Update Entitycmd.cs
* Update Entity.cs
* Update McClient.cs
* Update Entity.cs
* Update McClient.cs
* Update McClient.cs
* Update Entity.cs
* Update McClient.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update McClient.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entity.cs
* Update McClient.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Update Entitycmd.cs
* Crash Fix on Item
* Crashes Fix
* Update McClient.cs
* Crashes fix
* Update McClient.cs
* Update Entity.cs
* Update Entity.cs
* Update McClient.cs
* Update McClient.cs
* Update McClient.cs
* Update McClient.cs
* Update McClient.cs
* Update McClient.cs
* Update McClient.cs
* Update ChatBot.cs
* Update IMinecraftComHandler.cs
* Update McClient.cs
* Update Protocol18.cs
* Update ChatBot.cs
* Update IMinecraftComHandler.cs
* Update Protocol18.cs
* Update McClient.cs
* Fix unaddressed issues
Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-08-20 18:36:50 +02:00
ReinforceZwei
6bbb7236e3
Add support for Minecraft 1.16.2 (#1214)
* Implement MC version 1.16.2 basic support
All packets ID update done
Tested in 1.16.2 craftbukkit server
* Implement MC 1.16.2 entity handling
New EntityPalette
* Add back protocol version checking for entity handling
Was removed during testing and forgot to add it back
* Implement inventory handling for MC 1.16+
Item ID got changed in 1.16+ so a palette is needed.
* Fix ChangeSlot command
What a joke
* Handle 1.16 new entity properties name
Convert new naming style to old style
* Revert "Handle 1.16 new entity properties name"
This reverts commit 52c7d29062.
* Update AutoAttack to use the new entity properties key
* Fix item type to ID conversion
* Sort item types by name
* Remove ZombiePigmanSpawnEgg
User ZombifiedPiglinSpawnEgg instead (new name for same item)
* Add missing 1.16.2 version strings
* Remove old ItemTypeGenerator
* Sort entity types by name
* Palette loading, instructions, NotImplemented err
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-08-17 17:08:50 +02:00
Рома Данилов
33781c5de5
Inventory: Show item Damage (#1213)
* /inventory add show item Damage
* Removing unnecessary using
* Upgrade
* Fix
* Update Inventory.cs
* add Damage
* Done
* Done, Fix
* Remove extra space, Fix documentation
2020-08-17 12:27:15 +02:00
ReinforceZwei
236e077e44
Add TPS command and improve the calculation of TPS (#1210)
* Add tps command
* Improve tps calculation and tps command
* Remove debug log line
* Improve if-else statement
2020-08-17 11:40:06 +02:00
ReinforceZwei
ca1e902307
Add help information for inventory command (#1170)
* Add help information for inventory command

* Change optional parameter representation
2020-08-03 14:13:07 +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
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
ORelio
f30dc4464c Reorganize methods in McClient.cs
Tyding up the class as it is becoming quite large
2020-06-20 15:18:35 +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
Рома Данилов
87302bafab
Keep track of current game mode (#1053)
* GetGamemode()

* GetGamemode()

* ChangeGamemode()

* GetGamemode()

* Update ChatBot.cs

code refractor

* Update Inventory.cs

Gamemode check added

* Update Protocol18.cs

* Update Protocol18.cs

* Update Protocol18.cs

code refractor

* Update IMinecraftComHandler.cs

code refractor

* Update IMinecraftComHandler.cs

* Update McTcpClient.cs

fix

* Update McTcpClient.cs

fix

* Fix duplicate gamemode event

Co-authored-by: ORelio <oreliogitantispam.l0gin@spamgourmet.com>
2020-06-13 15:00:30 +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
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