Skip to content

DirectSection sends empty data array in chunk packet #36

Description

@Tonguechaude

Describe the Bug

When a chunk section contains more than 256 unique block state IDs, it transitions to a DirectSection. During network serialization, bits_per_entry is correctly set to 16, but data_array was hardcoded to an empty vec![].
The client expects to read 1024 u64 values (4096 blocks × 16 bits / 64) and ends up consuming bytes from the next packet, silently corrupting the chunk.

Hint : This is the same pattern already used for BiomeData::Mixed. No allocation, no loop — just a pointer cast.

To Reproduce

No response

Expected Behaviour

No response

Screenshots / Videos

No response

Temper Version

No response

Rust Version

No response

Server Logs

No response

Additional Context

No response

Is there an existing issue for this?

  • I have searched current existing issues before creating this.
  • I checked all the boxes without reading them
  • I have provided all necessary and relevant details, including logs, reproduction steps, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    TBD

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions