Add documentation to make the invoke mechanism easier to understand
Make it clear in documentation that code is invoked synchronously
Use Action and Func<T> for minimizing the amount of code to write
Use type parameter T to automatically adjust return value type
Throw exceptions on the calling thread, not the main thread
Resolve#51
* Realms: update to new API; fix HTTP Get
* Realms: suggested changes
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
* Realms: suggested changes
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
* Add negative number support for JSON parser
* Nice print realms worlds result
* Option to join Realms world with world ID
* Suggested changes
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
* Failure handle
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
* world id paired with index
* fix text
* Clean up the code a bit
* Add setting for displaying Realms worlds
* Rename Realms worlds setting
* Put messages into translation file
Co-authored-by: Zizhen Lian <zizhlian@umd.edu>
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
Co-authored-by: ReinforceZwei <39955851+ReinforceZwei@users.noreply.github.com>
* Implement Microsoft account login
* Create proxied web request class
* Whole bunch of code that doesn't work
* I finally FIXED IT
It took me 2 hours to resolve the problem
* Fill the missed method summary
* Remove some unused code
* Revert http version
* Remove JSON parsing bug workaround
Not needed anymore as per e06438b582
* Remove comment asking about clientID
Client ID is used for session token refreshes. Random UUID without hyphens
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
* First implementation
* Improve chunk reading performance
* Fix indentation
* Remove debug information
* Update MultiBlockChange packet
* Move skip varint to a method
* Fix crash when not using block palette
* Fix DataTypes.cs not compiling on .NET 4.0
Binary (0b) values not handled so converted to Hexadecimal (0x)
* Use the 1.16 chunk parsing code for 1.15 too
Document the differences in padding and factor the code
Co-authored-by: ORelio <ORelio@users.noreply.github.com>
* 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>
Skip login step and join even when forge info is missing in server info.
However, this only works for 1.13+. Server info retrieval is required
for enabling Forge support on older Minecraft versions.
* 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
* 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>
* 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
* 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>
* 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)
* 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>
Move SessionFileMonitor into a generic FileMonitor class
Use FileMonintor for both SessionCache and the Mailer bot
Allows multiple MCC instances to share the same database files
(Add files missing in the previous commit)
Move SessionFileMonitor into a generic FileMonitor class
Use FileMonintor for both SessionCache and the Mailer bot
Allows multiple MCC instances to share the same database files