- Parse the `model` field for skin textures in `player.rs` to support the hat skin model
- Update `player_info_update.rs` to mask unsupported action flags based on the Minecraft version (e.g., ignore `UPDATE_LIST_PRIORITY` for versions prior to 1.21.2)
- Add the `UPDATE_HAT` flag in `world/mod.rs` and send it alongside `UPDATE_LIST_PRIORITY`
- Sync multi-version `tracked_data` JSON files to reflect the protocol changes
Signed-off-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
CSoundEffect::new() scales the position by * 8 to convert from
fixed-point. write_packet_data was applying * 8 a second time,
resulting in positions being multiplied by 64.
Add regression test asserting the encoded X/Y/Z are exactly
floor(input_pos * 8), preventing this bug from reappearing.
* feat(protocol): generate particle ID remap tables
Generate version-specific particle registry mappings from the existing ViaBackwards data for every supported Java protocol version.\n\nExpose the generated remapper through pumpkin-data and enable it for pumpkin-protocol so packet serializers can translate current registry IDs for older clients.
* fix(protocol): remap explosion particles for older clients
Translate the explosion particle registry ID for each client's negotiated Java version before serializing the explode packet.\n\nWithout this remap, 1.21.11 interpreted the 26.2 explosion-emitter ID as falling dust, consumed the following bytes as particle data, and disconnected with a decoder exception. Add packet-level coverage for both 1.21.11 and 26.2 encodings.
* fix(protocol): remap particle IDs for older clients
Level-particle packets and particle entity metadata still encoded raw 26.2 registry IDs, causing older clients to decode the wrong particle schema and disconnect. Route every active outbound particle path through the version remapper, preserve metadata payloads, and cover 1.21.11 and 26.2 encodings with regression tests.
Add the `broadcast_console_to_ops` configuration option matching
vanilla's `broadcast-console-to-ops` server property. When set to
`false`, suppresses console and RCON command output from being
broadcast to online operators.
- Add `broadcast_console_to_ops` field to `CommandsConfig` (defaults
to `true` for vanilla compatibility)
- Track the setting via an `AtomicBool` in the command module
- Replace hardcoded `true` in `should_broadcast_console_to_ops` for
Console and RCON senders with the configurable value
- Initialize the setting during server startup from advanced config
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* refactor: less manual BlockMetadata impls
* refactor: added BlockId type
BlockId is a wrapper for u16: it is valid for any u16 that is the id of a Block.
- Changed the Block.id field type to BlockId
- added named BlockId constants
- BlockMetadata::ids() now returns Box<[BlockId]>
- adjusted pumpkin-macros to use BlockId constants
- fixed some methods that were comparing blockstate ids or item ids (u16) against block ids (previously u16)
TODO: check if unsafe blocks can be removed; The compiler might understand that BlockId is always a valid index into mappings::TYPE_FROM_RAW_ID
* refactor: added BlockStateId type
A BlockStateId is a safe wrapper around the numerical index of a BlockState in pumpkin-data. They help avoiding validity checks (outside of IO and, currently, plugins), and make it easier for other contributors to reason about what they're comparing; BlockStateIds, BlockIds or Item ids (still u16).
pumpkin-data::BlockStateId replaces RawBlockState and BlockStateId from pumpkin-world.
- added the BlockStateId wrapper type
- made (almost; plugins) every function interacting with block states or block state ids use the wrapper type
- changed codegen logic to create/work with BlockStateIds
- made ChunkPalette parsing check BlockStateId validity (pumpkin-world::chunk::format::ChunkSectionBlockStates)
TODO: check if unsafe blocks can be removed; The compiler might understand that BlockStateId is always a valid index into mappings::BLOCK_ID_FROM_STATE_ID and mappings::STATE_FROM_STATE_ID
* refactor: imports
changed every use pumpkin_world::BlockStateId to pumpkin_data::BlockStateId
* refactor: Block- & BlockStateId
finishing touches;
- rebased on latest mater
- ensure there are no bound checks on Block(State)Id conversions, making them extremely cheap
- this required unsafe std::hint::assert_unchecked annotations because the compiler is (occasionally) stupid
- on debug builds the bound checks still exist because of ub_checks (see rust unstable book for the feature of the same name)
- added Safety notes to hopefully prevent anyone from enabling the creation of invalid Block(State)Ids in the future
- fixed a benchmark
* starting implementing the advancement command
* implementing globally of the advancement command
* fixing lib.rs
* implementing the new Advancement argument and updating the AdvancementArgs lifetime
* updating wit by adding advancement as command arg
* cargo fmt
* fixing the advancement
hooking the saving
spawn blocking task for IO task
* fixing the update of load to be async
* adding await to load for a test
* fix when save is disable
* making save_enable check first
* fix conflict
* update hash
* fix wit change
* fix column_pos
* adding rust documentation
* typos fix
* removing example
* invalid advancement packet
* fix itemstack parsing to use ItemStack Template ones
* changing enum type from i32 to VarInt
* fix packet by switching up the frame type and flags
* fixing packet and loading of the advancement
* cargo clippy
* update wit