* simplify all
* fmt
* Consider using derive macro
* Add new events
* Add events call
* minor fixes
* minor fixes
* fix
* optimize code
* big changes
* fix skill issue
* fix
* Consider not specify patch version
* make logger shared
* i want test one thing
* Add one useful function
* add little amouth of docs
* use config instead
* revert changes
* fmt
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
we only used them for collect_vec. I think its worth the "effort" to write Vec type annotations ourself and have one big crate with way too may features we don't need less
* implement populate noise step of chunk generation
* fix gitignore
* pass thru seed
* add counter for edge case
* add entire chunk test case
* remove eclipse file
* remove packet timing
* precompute float divisions
* unsafe speed up
* slight aquifer optimization
* tweak block pos packing
* optimize perlin map
* precompute aquifer random positions
* fix aquifer regression
* refactor samplers, add tests to aquifer, and move chunk extractor to the extractors
* fix base density function error and add a bunch of test cases
* ignore expensive tests by default
* remove un-needed lifetimes
* remove minecraft prefix from block lookups
* fix populate noise bench
* slight optimizations
* read files at runtime to speed up test compilation speed and remove ignores
* remove new lines from test data so people stop freaking out about line count
* make extractor the same
* leverage branch prediction
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* Remove fastnbt as dependency
* Move to own NBT crate
* Added deserialization
Also replaced i8 bool's with bool's
* Use: fastnbt for pumpkin-world
Until i don't figure out why Arrays do not work, we can use fastnbt
* ctrlc: also handle `sigterm` and `sighup` via `termination` feature
This commit enables the `termination` feature in `ctrlc` so that
`sigterm` and `sighup` are also handled on UNIX systems. This in turn
improves Docker compatibility since containers now listen to the
`SIGTERM` signal it sends to containers when trying to stop the
container via `Ctrl-C` whilst attached.
* Replace `ctrlc` signal handling with `tokio`
This removes the `ctrlc` crate from the project, replacing (and upgrading) its functionality to also handle `sigterm` and `sighup`.
Sigterm handling is working on UNIX with this commit, I haven't tested Windows compatibility with `Ctrl-C` nor have I tested `sighup` or `sigint`.
Of course, compiles and runs on UNIX. Haven't tested Windows.
* fix: remove unused import; collapse if statement
* main: fix per-os signal handling
Will only compile Windows-specific/Unix-specific code when on their respective environments.
Handles signals in a separate tokio thread so it doesn't suspend the main thread.
Tested to work on UNIX (macOS) but not tested on Windows.
* main: cargo fmt
* main: fix setup_sighandler fn signature on windows
* main: attempt 2 at fixing windows sighandler
* main: enable ctrlc for all non-unix systems
Previously, ctrlc usage in tokio was only enabled on Windows systems
(since UNIX systems have their own signal handling in Pumpkin). Instead
of limiting ctrlc to just Windows, we can make it run on any non-UNIX
system since it should be platform independent anyhow.
This reverts commit a1b97730bd.
Due to Errors
```
thread 'tokio-runtime-worker' panicked at pumpkin-protocol/src/client/play/c_chunk_data.rs:84:25:
index out of bounds: the len is 4096 but the index is 25374
```
- Replaced all `std::sync::Mutex` by `parking_lot::Mutex` and refactored implementation accordingly
- Replaced all `Mutex<T> where T: Copy` by `crossbeam::AtomicCell<T>` and refactored implementation accordingly
- Made a `plugins` feature in `pumpkin-plugin`
- Made a `plugins` feature in `pumpkin`, which enables the `plugins` feature in `pumpkin-plugin`
- Made the feature default
- Set up dhat, when dhat-heap feature, the dhap memory profiler will run. Due to this tokio needs to be manually built.
- Rayon now explicitly built outside of tokio runtime.