Commit graph

813 commits

Author SHA1 Message Date
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
ORelio
a38c9dd000
Add OreMiner.cs
Script by ReinforceZwei from #1254
2020-09-19 12:16:15 +02:00
ReinforceZwei
837340dc51 Fix Auto Relog not applying delay
Also change all debug log to use new method
2020-09-17 20:52:49 +02:00
ReinforceZwei
c97f6f1945 Fix mistake made in upgrading 1.16.3 2020-09-14 19:05:45 +02:00
ORelio
b1233ace7c Perform arm animation when breaking blocks (#1254) 2020-09-13 16:33:25 +02:00
ReinforceZwei
9bfb2bf6c7 Update supported version to 1.16.3
Nothing got changed in 1.16.3
2020-09-11 23:00:48 +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
ReinforceZwei
cd1badb9d6
Add item moving helper class (#1243)
* Create item moving helper class
* Change the method calling order for joined game
 Dispatch bot after things are initialized such as inventories
* Add GetItemMovingHelper ChatBot method
2020-08-29 17:53:29 +02:00
Рома Данилов
de9dcd6d77
Latency improve (#1244)
* Update ChatBot.cs
* Update McClient.cs
* Update ChatBot.cs
* Update ChatBot.cs
* Update McClient.cs
2020-08-29 14:46:04 +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
ReinforceZwei
2649e61a88 Fix 1.13 packet palette duplicated packet type 2020-08-27 19:33:08 +02:00
ReinforceZwei
3434d95b81
Add packet palettes (#1236)
* Add packet type palette
* Fix
* test new palette
* Fix 1.16.2 palette
* Add packet ID dumper
* Add document
* Update naming
* Delete old implementation of packet type
* Rename PacketTypeHandler to PacketType18Handler
* Fix packet type namespace
* Add dump to file method for packet type
* Rename packet palette version number
* Replace unknown packet type to explicit type name
Prevent duplicated key while creating reverse mapping
* Include packets ID in packet palette
Add packet palette helper class
* Remove packet ID dumper methods
As packets ID are included in source code now
2020-08-26 19:19:59 +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
ReinforceZwei
9b8213eca5 Fix metadata optional blockID type 2020-08-25 20:43:37 +02:00
ReinforceZwei
b648e4f86d
Fix crash on custom item IDs from Forge servers (#1233)
* Fix unknown item id cause crashes for handling non-vanilla item (i.e. forge item)
* Add Unknown item type and use ItemType.Unknown for unknown items
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-08-24 22:38:08 +02:00
ORelio
70c991cd30 Calulate dig range using eyes location (#1228) 2020-08-24 00:06:52 +02:00
ORelio
ee164dfcc2 Replace ZombiePigman with ZombifiedPiglin
Use "ZombifiedPiglin" in place of "ZombiePigman" for older versions of Minecraft.
2020-08-23 23:48:22 +02:00
ReinforceZwei
dc5ca8c79a Update hostile mobs list 2020-08-23 23:48:22 +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
Рома Данилов
017d9b1840
Crash Fix, add Respawn method (#1227)
* Crashes Fix
* Add Respawn
* Crashes Fix
* Update McClient.cs
* Update McClient.cs
* Fix Air item count to 0
2020-08-22 11:17:31 +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
ORelio
a6a5f0c333 Fix TimeoutDetector killing itself (#1219) 2020-08-20 13:29:02 +02:00
ORelio
e6bd2090ab Fix AutoAttack variable name 2020-08-20 13:28:40 +02:00
ReinforceZwei
fb3f5ed040
Use MC 1.16 translation files (#1223)
In order to support newer translations like piglin-related kill messages
* Update translation file indexes web URL to the latest
* Update translation file local assets location
2020-08-20 13:07:13 +02:00
Рома Данилов
3adf7c4468
Add OnDeath event for ChatBots (#1220)
* Add New Event
* new Event
2020-08-18 21:08:19 +02:00
ReinforceZwei
e71d0e2383
Improve AutoAttack (#1218)
* Improve AutoAttack
- New attack mode
- Fix abnormally low attack damage
* Add document for AutoCraft
* Improve code style and user feedback
* Correct spelling mistakes
2020-08-18 13:02:36 +02:00
ReinforceZwei
2fd610aa65
Fix SetSlot (#1144)
* Fix SetSlot - Pull request no #1217
2020-08-18 12:57:56 +02:00
ReinforceZwei
d8afda34fb Fix AutoDrop being loaded when inventory handling is disabled 2020-08-17 18:13:01 +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
ReinforceZwei
ee5199f760 Fix AutoCraft still being loaded when inventory handling is disabled 2020-08-17 16:31:51 +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
08db87e5f6
Fix 1.16 entity metadata and equipment (#1211)
* Fix 1.16 Entity Equipment
* Fix #1209
Rename variable to meet naming rule
* Remove key checking
* Revert "Fix 1.16 Entity Equipment"
This reverts commit 6c46fc3ba4.
* Remove comment related to `data[key] = value`
Comment is not needed anymore as the value is set or overwritten automatically (no catch)
2020-08-17 11:43:10 +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
ORelio
4fb47f20c7 Improve WindowActionType doc (#1208) 2020-08-15 21:32:30 +02:00
ReinforceZwei
2c8ec4aa4a
Implemented entity metadata to keep track of entity health (#1205)
* Implement entity metadata protocol handling
* Add health information for entity
* Make AutoAttack check entity health
* LivingEntity: Default health is 1.0 as per https://wiki.vg/Entity_metadata#Living_Entity
* Fix entity metadata for lower MC versions
* Fix commit  888297d (1.0f instead of 1.0)
* Add OnEntityHealth ChatBot event (Remove protocol-dependant stuff from McClient (undo part of 85c32b9))
* Remove OnEntityMetadata in favor of OnEntityHealth
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-08-15 15:32:46 +02:00
ReinforceZwei
526dabd1e7
Implement inventory mouse item dragging (#1208)
* Implement inventory mouse item dragging
* SendWindowAction: Format switch/align statements
* Document window action types
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
2020-08-15 14:17:18 +02:00
Рома Данилов
4a3a23eb1d
Update VkMessager.cs (#1203)
* Update VkMessager.cs
* Fix
* Complite
* Update VkMessager.cs
2020-08-14 20:43:59 +02:00
ReinforceZwei
dbffe98cd0
Update AutoAttack (#1204)
Move animation packet out of the loop to reduce the packet sent per second
2020-08-14 20:43:06 +02:00
ORelio
c3ace103c6 Fix crash on MC 1.7 update score (#1199) 2020-08-13 23:05:23 +02:00
Рома Данилов
3c30b34b91
Update VK API (#1201)
* Update VK API
* Fix copy paste
2020-08-13 10:30:35 +02:00
ORelio
59981c785b Fix crash on MC 1.7 chat message (#1199) 2020-08-12 22:05:48 +02:00
Рома Данилов
3f94814bda
VkMessager: New SendMessage RandomID core (#1198) 2020-08-12 21:47:20 +02:00
ReinforceZwei
e6d34c3cf1
Add entity handling for 1.10 to 1.12.2 (#1195)
* Fix entity type data type for 1.13 below
* Add entity handling for 1.10 to 1.12.2
* Update comments for EntityPalette113
2020-08-11 13:44:18 +02:00
ORelio
a28409043c Implement Forge FML2 protocol (MC 1.13+) (#1184)
Forge uses a different handshake scheme in FML2 protocol.
This handshake scheme uses LoginPluginRequest/Response packets.
2020-08-11 12:52:38 +02:00
ReinforceZwei
aeac56890b Fix AutoCraft bugs
Fix recipe parse error
Fix crashes on crafting failure
2020-08-11 10:34:32 +02:00
Рома Данилов
d33677a245 Update VK API Version 2020-08-10 20:13:20 +02:00
ORelio
294d85d5e1 Fix joining Forge servers without mods (#1189)
Regression from 74151097ff
2020-08-09 18:41:13 +02:00
ORelio
b4d99eb8a3 Add color test in debug mode (#1187) 2020-08-09 18:38:24 +02:00
ORelio
74151097ff Implement FML2 mod list in server ping (#1184) 2020-08-08 22:08:38 +02:00