Skip to content

Add block placement rules. #503

@rj00a

Description

@rj00a

Describe the problem related to your feature request.

Valence is lacking placement rules, i.e. the rules that should be followed when a player places or breaks a block. This includes the orientation of logs and stairs, redstone dust, torches, etc.

The client will predict these behaviors so it's important that we have direct support for it.

What solution would you like?

  1. Add a new method to ChunkLayer called place_block, similar to set_block but with placement rules.
  2. Document the difference between set_block and place_block.
  3. Make use of it in the building example.

What alternative(s) have you considered?

Putting this in a separate crate/plugin. But that doesn't seem necessary to me.

Additional context

Here's what Minestom does. Although I think its implementation is incomplete. We should check Vanilla source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions