* Fix players not being removed from world on timeout
* Spawn new task for each command
Undo bandaid fix
* Fix cargo fmt
* Move console commands and RCON commands into seperate tokio task
Per the logger documentation:
> Enables the user to choose log level by setting RUST_LOG=<level> environment variable. This will use the default level set by with_level if RUST_LOG is not set or can't be parsed as a standard log level.
> This must be called after with_level. If called before with_level, it will have no effect.
Personally, I feel that using a config file, which defaults to *false* to configure whether or not to listen to the environment for enabling and disabling logging is a bit dumb. Usually environment variables are meant to allow you to modify the configuration of a program for one "environment", not necessarily permanently. Especially when you get more complicated environment filtering.
Additionally, I'd like to use this as a springboard to advocate for a few things, primarily introducing the idea of migrating away from `log` to `tracing`, as there's a lot more that can be done with regards to performance testing.
* Added spawn egg functionality
* Readd changes from before merge
* Added basic attacks on mobs
* Fixed spawn rotation and position
* Updated entities.json
* Fixed entity registry
* Added correct bounding boxes per entity
* Various fixes
* use right data types in entity registry
* fix: clippy
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* Pick Item Changes
* Changed some logging
* Pick Item working for hotbar slots
* Basic functionality, changes needed to adhere to expected minecraft behaviour
* Clean up code
* Added todo for pick from entity
* Added item swapping
* Swapping and cleanup
* Fix for rebase
* Remove unused function
* Bugfix
* remove todo
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* fix(combat): kick for self-attacking
* chore(combat): fix the duplication of the word client
* chore(pumpkin/src/net/packet/play.rs#Player/handle_interact): remove useless parens
* fix(combat): compare entity IDs, not actual objects
* chore(pumpkin/src/net/packet/play): `cargo fmt`
* 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>
* Added chest and furnace
* Corrected interactive block functionality
* Fixed merge
* Added standard functions and player remove on destroy
* Added unique block standard functions
* Fix clippy
* Fix deadlock in standard function
Lock session.lock so other processes know that we currently read and write to the level. This is vanilla behavior.
Test:
Tested to start the a new server while on was locking the file, and got `Failed to lock level: AlreadyLocked("session.lock")` as expected