* fix(worldgen): decouple structure references to eliminate DAG deadlocks
* Changed `StructureReferences` DAG radius from 8 to 0, removing the 17x17 chunk dependency lock.
* Removed `GenerationCache` dependency from `ProtoChunk::set_structure_references`.
* Implemented a 3x3 predictive region math loop to find candidate structure chunks instead of brute-forcing neighbor lookups.
* Added `lazily_generate_structure` to mathematically evaluate biomes using `BiomeSupplier` instead of requiring instantiated `ProtoChunk`s.
* Extracted deterministic placement math into `get_structure_chunk_in_region` to allow stateless structure prediction.
* chore: formatting
* refactor(worldgen): improve registry safety and document stronghold skip
* perf(worldgen): optimize biome supplier matching with stack enum
* feat(worldgen): implement global structure cache for concentric rings
* Add thread-safe `GlobalStructureCache` to mathematically calculate stronghold positions in O(1) time.
* Attach the cache to `VanillaGenerator` so the heavy trig calculations only happen once per world lifecycle.
* Thread the cache reference through the `worker_logic` and `generation` chunk loops.
* Update `set_structure_references` and `set_structure_starts` to resolve strongholds instantly without triggering DAG deadlocks.
* feat(structure): enhance structure placement with biome validation and noise sampling
NOTE: Current implementation uses pure mathematical chunk prediction. Exact vanilla
seed-parity (snapping to valid biomes) is deferred to a follow-up to avoid
complex BiomeSupplier dependencies during early initialization.
* feat(worldgen): enhance stronghold placement algorithm with dynamic ring progression and reservoir sampling to be as close mathematically as possible
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
When plugins are disabled via smashed pumpkin, they receive a
.deactivated suffix. The server was not recognizing this convention
and logged errors for each disabled plugin on startup. Skip files
with the .deactivated extension in load_plugins() so disabled
plugins are silently ignored.
* initial commit
# Conflicts:
# Cargo.toml
# Conflicts:
# Cargo.toml
* implemented more `DataResult` methods
* finished data result struct
* fixed clippy errors
* implemented `map_like` and more `dynamic_ops` methods
* finished most other `DynamicOps` methods
* Fixed doc in get_bytes
* added encoder and decoder files
* fixed some stuff and added primitive codecs
* added some primitive codecs (has errors for now)
* changed the "stream" ops methods
* reworked types of the coders and codecs, added list codecs
* added JSON ops
* fixed list codecs, added some doc test examples in `JsonOps`
* added lazy codecs
* added map encoders, decoders and struct builders
* actually added mapdecoder
* added encoder and decoder transformations
* fixed encoder and decoder transformations and added transformation functions and range codecs
* added field encoders and decoders and separated range codecs
* added field encoders and decoders and separated range codecs
* added BaseMapCodec and SimpleMapCodec
* added struct codecs and moved tests
* added `NbtOps`, unsigned number codec types, range codec tests, a struct test, detailed `Codec` documentation
* added optional field map codecs, the validator function and reworked struct builder functions
* added unbounded map and struct codec tests and reworked validated codecs
* did some visibility refactoring
* fixed some stuff and renamed unsigned number codecs
* fixed formatting
* fixed docs to reflect changes on renaming unsigned number codecs
* fixed validated test
* fixed doctest
* moved base_map_codec and fixed docs about codecs
* fixed some mistakes in the code
* fixed some more mistakes in the code and converted some `DataResult::error` calls to `DataResult::partial_error`
* fixed formatting
* fixed some incorrect docs
* removed `OnceLock`s in `MapCodec`s so they can be used more easily
* fixed transformer codec descriptions, added more `NbtOps` tests and fixed some `NbtOps` list methods
* fixed doctest
* added a method to allow creating a field using a `MapCodec` reference
* bifurcated `MapCodecCodec`s as well
* removed imports only for documentation and replaced them with intra-doc links
* added additional docs to `optional_field_with_default` and `lenient_optional_field_with_default` Codec methods for additional details on encoding
* renamed crate to `pumpkin-codecs` so that data fixing can be placed somewhere else not frequently used
* fixed invalid nbt tag for test
* reverted wrapping the tags for heterogeneous elements
* fixed a few more issues
* initial commit
# Conflicts:
# Cargo.toml
* added `NbtOps`, unsigned number codec types, range codec tests, a struct test, detailed `Codec` documentation
* renamed crate to `pumpkin-codecs` so that data fixing can be placed somewhere else not frequently used
* added either codecs and either map codecs
* added a test and extra either methods
* added extra assertion
* removed this crate's `either` module in favor of the `either` crate
* fixed rebase
* fixed Cargo.lock
* removed old folder
* removed `DataResult` change
* feat(wasm-api): port i18n module for plugin and host use
* feat(wasm-api): expand player WIT API
* feat(wit): make player APIs fallible and propagate errors
* feat(wit): add player info, inventory, and status queries
* feat(wit): add player permission and display name APIs
* initial commit
# Conflicts:
# Cargo.toml
* implemented more `DataResult` methods
* finished data result struct
* fixed clippy errors
* implemented `map_like` and more `dynamic_ops` methods
* finished most other `DynamicOps` methods
* Fixed doc in get_bytes
* added encoder and decoder files
* fixed some stuff and added primitive codecs
* added some primitive codecs (has errors for now)
* changed the "stream" ops methods
* reworked types of the coders and codecs, added list codecs
* added JSON ops
* fixed list codecs, added some doc test examples in `JsonOps`
* added lazy codecs
* added map encoders, decoders and struct builders
* actually added mapdecoder
* added encoder and decoder transformations
* fixed encoder and decoder transformations and added transformation functions and range codecs
* added field encoders and decoders and separated range codecs
* added field encoders and decoders and separated range codecs
* added BaseMapCodec and SimpleMapCodec
* added struct codecs and moved tests
* added `NbtOps`, unsigned number codec types, range codec tests, a struct test, detailed `Codec` documentation
* added optional field map codecs, the validator function and reworked struct builder functions
* added unbounded map and struct codec tests and reworked validated codecs
* did some visibility refactoring
* fixed some stuff and renamed unsigned number codecs
* fixed formatting
* fixed docs to reflect changes on renaming unsigned number codecs
* fixed validated test
* fixed doctest
* moved base_map_codec and fixed docs about codecs
* fixed some mistakes in the code
* fixed some more mistakes in the code and converted some `DataResult::error` calls to `DataResult::partial_error`
* fixed formatting
* fixed some incorrect docs
* removed `OnceLock`s in `MapCodec`s so they can be used more easily
* fixed transformer codec descriptions, added more `NbtOps` tests and fixed some `NbtOps` list methods
* fixed doctest
* added a fourth specific `NbtOps` test for byte buffers (`ByteArray`s in NBT)
* fixed grammar mistake
* log messages for discarded keys in `create_map`
* use the `tracing` crate for logging
* added a method to allow creating a field using a `MapCodec` reference
* bifurcated `MapCodecCodec`s as well
* removed imports only for documentation and replaced them with intra-doc links
* added additional docs to `optional_field_with_default` and `lenient_optional_field_with_default` Codec methods for additional details on encoding
* renamed crate to `pumpkin-codecs` so that data fixing can be placed somewhere else not frequently used
* fixed some more errors and reworked `nbt_ops`'s `ListCollector` to be like 1.21.11, also allows &str in `DataResult`'s creation methods
* fixed invalid nbt tag for test
* reverted wrapping the tags for heterogeneous elements
* renamed function parameter in `DataResult::apply_2`
* removed unnecessary comment
* fixed a few more issues
* fixed formatting
* fixed another mistake for `DataResult::add_message`
* renamed `DataResult` factory methods to be more idiomatic and removed unnecessary `dyn` method
* removed unnecessary `clone()`
* updated Cargo.lock
* Added BellBlock and BellBlockEntity
Plays sound, works with redstone (update_neighbours) and placement is
correct. Animation still missing (emit for game event/block update
packet not sent?)
* Added raiders_hear_bell function
Currently only returns dummy value
* Fix clippy errors
* cargo fmt
* Added placement validation and more
- Added placement validation
- removed reverse_horizontal_facing (now using .opposite())
- now removing block entity on block break
* Add Block Entity to mod.rs
* cargo fmt
* Small improvements
* fix cargo fmt
---------
Signed-off-by: Jonas <158217095+R40fendt@users.noreply.github.com>
* perf(network): migrate world broadcasts to O(V) chunk-based subscriptions
* Introduced `broadcast_to_chunk` and `broadcast_to_chunk_except` in `World` to utilize Chebyshev distance math for O(V) packet routing.
* Migrated block updates, block entity data, and synced block events to strictly broadcast to players with the target chunk loaded.
* Optimized entity network overhead by chunk-filtering movement, rotation, metadata, spawning, and equipment packets.
* Refactored sound events to use volume-aware, chunk-filtered loops instead of global server iterations.
* Ensured all edge cases, including passenger mounting/dismounting, player bed animations, and teleportation, utilize localized broadcasts.
* perf(network): optimize chunk broadcasts and fix bedrock exclusions
- Extracted Chebyshev distance math into `is_within_view_distance` helper
- Added `#[inline]` and `#[must_use]` attributes to the distance helper
- Fixed Bedrock packet echo bug by standardizing exclusions to use `entity_uuid` instead of `gameprofile.id`
- Removed dead metadata serialization code in `send_meta_data`
- Standardized sound attenuation math across audio events
- Cleaned up leftover developer TODO comments
* fix(world): leftover dev comment + leftover unmigrated bedrock exclusion
* skip random tick
* skip tick out of loop and better randomness
* min y
* formating
* properly ticking block and fluid check
* clippy
* fix malformed NBT and i64 overflow
* formating
---------
Co-authored-by: chocodev11 <chocodev11@users.noreply.github.com>
* initial commit
* added more functions
* ported /help command to new dispatcher
* /? shows similar usage to /help instead of `-> help`
* fixed /help bugs
* change min limit in `read_boxed_slice` to 0 so that empty command (`/`) doesn't cause an error
* fixed clippy errors
* formatted
* added convenience for fetching world and server from context
* fixed `min` mistakes to `max` instead
* changed node to now store a list of predicates as its requirement (permission included)
* added easier way to register aliases
* prevent unauthorized usage of command when aliased
* added `TextComponent::empty()` to create empty text only for the purpose of adding children to it
* added more documentation
* make argument more obvious
* fixed some issues (not done yet)
* added more clarification in comments & docs
* fixed fn docs
* fixed order of arguments in translated error
---------
Signed-off-by: Alexander Medvedev <lilalexmed@proton.me>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* feat(wasm-api): port world core events
# Conflicts:
# pumpkin/src/plugin/loader/wasm/wasm_host/wit/v0_1_0/context.rs
* fix(wasm-api): satisfy clippy for world event batch
* style(wasm-api): format world event registration
* feat: add mob ai throttling
* chore: formating
* fix: prevent entity leak and server timeout during death animation
* fix: vanilla parity + optimize entity position and rotation updates to reduce unnecessary broadcasts
* chore: formatting