* Add more to the To-Do
Added biomes, vegetation, player data saving, off hand, advancements, villagers and mobs inventory as objectives in the to-do
* Remove stack limits from the to-do
* feat: add linear chunk format with zstd lib dependency
* fixing a typo
* refactor: rename file handling methods for clarity and more lint fixes
* refactor: improve clarity on validation methods
* fix: invert version check in LinearFile header validation
* fix: remove leading dot from file path formatting in LinearChunkFormat
* refactor: improve error handling and method naming in LinearFile operations
* fix: ensure file is flushed after writing in LinearFile operations
* fix: lints and warnings
* fix: more lints
* refactor: streamline LinearFile structure and improve header management
* refactor: change chunks_headers to use Box for improved memory management and use exception to know if file exist
* refactor: update path parameter types to PathBuf for consistency and improved usability
* refactor: update path parameter types to Path avoiding uknown changes and adjust file truncation logic
* fix: avoid using the same path for different tests
* fix: fix some bytes sizes for the header based on the spec
* refactor: enable file truncation when opening for writing and simplify save method
* fix: removing IoSlices for windows issues.
* fix: clippy lints
* refactor: improve incompatible files cheking, some documentation and variable nameing
* feat: add file_format to ChunkConfig and implement format handling in Level
* feat: add error logging for invalid file headers and data size checks in LinearFile and tmp filenames on write
* feat: implement file locking mechanism for concurrent chunk read/write operations
* fix: bug at desserializing the chunks headers.
* Refactor chunk file locking mechanism to use DashMap for improved concurrency and simplify read/write guard management
* docs: Update documentation for LinearVersion enum with format references
* re-check workflows
* re-check lints 2
* rename config values
* Some doc improvements
---------
Co-authored-by: Mili <santiagoogle@hotmail.com>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* Add pumpkin-api crate for API definitions
* Add proc-macro definitions for pumpkin-api
* Add pumpkin-api and pumpkin-api-macros to workspace
* Add basic PluginManager implementation plugin loading
* Update .gitignore to include specific plugin file types
* Add example plugin
* Cargo fmt
* Fix clippy issues
* Refactoring to prevent a circular import
* Add base impl for plugin hooks
* Move plugin manager to server
* Make metadata have static lifetime
* Add default implementations to events
* Add hooks to proc macro
* Update example
* Fix formatting
* Fix clippy warnings
* Load metadata from Cargo.toml
* Mark plugins as an implemented feature :D
* Implement new event handling
* Create a static global reference to the plugin manager
* Emit player join and leave events
* Update macro generation
* Update example
* Fix formatting
* Fix clippy issue
* Simplify event handling
* Add plugin command to list plugins
* Make handlers async
* Update macros
* Update example
* Fix formatting and clippy issues
* Better styling on plugins command
* Fix clippy issues
* Cargo fmt
* Disable doctest for lib target on pumpkin crate
* New API for plugins
* Update api macros
* Update plugin example
* A bit of clean up
* Some QoL (and performance) improvements
* Cargo fmt and clippy fixes
* refactoring, better event handling, new context functions
* Async on_load and on_unload
* Fix mutex lock never going out of scope
* Async plugin loading
* Add plugin management command
* Fix clippy issues
* Fix import issues
* Move TcpConnection out of client
* Move packet encoding out of client
* Allow plugins to register commands
* Fix fmt and clippy
* Implement plugin list in query
* Make arguments public so that plugins can use them
* Update proc_macros to handle runtime
* Make tree_builder public for use in plugins
* Make FindArg trait public for use in plugins
* Update example plugin
* Fix merge related issues
* Fix cargo fmt
* Post-merge fixes (also 69th commit, nice)
* New event system
* cargo fmt
* Impl block break event
* cargo fmt and clippy
* Reduced plugin size
* Reduce dependency count
* Old code cleanup
* cargo fmt
* Add event priority and blocking options to event registration and handling
* Refactor event handling to support blocking execution and improve event registration
* Fix post-merge errors
* Update example plugin
* increase mpsc channel capacity and handle write errors gracefully
* Use Arc<Player> instead of &Player
* add missing import
* Update example plugin with playing sounds
* Remove example plugin
* Create plugins dir if doesnt exist
* Remove unused vars
* Remove unnecessary clones
* Fix impl
* cargo fmt
* Make server pub in context
* Starting work on Operator permission system
This commit adds the ops.json configuration found in vanilla
servers, and updates the basic configuration to handle the default
permission level.
Server now uses ops file and defaults players to op level 0
The /op command has been added but needs players to rejoin for now.
* Clippy Fix + need to Rejoin after /op removed
I found the source of the DeadLock. Updated set permission function.
Fix cargo formatting issues and clippy issues.
* Remove temp warn message
* Move OperatorConfig to server
As Snowiii pointed out, OperatorConfig is runtime data.
Revert most changes in pumpkin-config.
op_permission_level must say in the basic configuration for
parity with Minecraft.
* cargo fmt + cargo clippy
* Sync permission change with client
* Fixs issues @Commandcracker found in review
- Move PermissionLvl to core and removed OpLevel
- Move ops.json to /data/ops.json
- Fix permissions issue with /op command
- Shorten /op command description
* refactor into `data` folder
* create data dir when needed
* add to readme
* fix: conflicts
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* Add query options to config
Added packet data types
Correctly parse a handshake packet
Add tokio to pumpkin protocol for `AsyncReadExt` convenience functions
* Add repr(u8) so that PacketType is a byte
* Respond to handshake correctly
* Allow for proper decoding of status packets and properly handle errors in decoding
* Implement challange tokens and verify with token and address
* Encode Basic status packet
Switch to CString since its better to and null errors higher up the code
* Encode Full status packet
* Add forgotten fields to full status packet
* Correctly respond to query clients when requesting full status
* Return actual address and port of server
Respect config options
Remove uncessary debug derives
* Remove packet type as it is redundant/unnecssary
* Implement basic status request
Refactor code for better error handling
* Update README
* Show players correctly in full status packet
* Store all packets in structs instead of enums
Break up en/decoding for each packet
Reduce client tracking
Get rid of QueryClients struct
Stop storing of magic value and check during decoding
Added tests for all decoding and encoding
Fix all sugestions from @StripedMonkey
* Update JSON Files to 1.21.2
* Update constants to 1.21.2
* Port c_login_success to 1.21.2
* Fix: damage type
* Overhaul Packet ID system
We now use Packet IDS from enums.
1. This is very very nice for seeing which Packets are already implemented and which not.
2. This lets us easly port to newer Minecraft version, In vanilla there are no Packet ids hardcoded, Packet IDs will be parsed from a enum like this
* Port all Packets to 1.20.2
* Update README badge to 1.20.2
* Change doc for the new packet id system
I see people thinking Pumpkin does not have Chunk generation when they see that. What i actually meant was that there is no world folder structure saved. Pumpkin has Chunk generation
I still like to use target-cpu=native. The problem is that there is no cross platform way to the the env var RUSTFLAGS. I also don't want to have a script for that