Scarpet: Add `__on_player_placing_block` (name subject to change)
See original GitHub issueCurrently, __on_player_places_block is fired after the player places a block, not before. According to #1497, changing this “would involve a significant behaviour change, breaking many scripts”.
As a compromise, a new event __on_player_places_block_pre should be added, which functions just like __on_player_places_block, the only difference being it fires before the block is placed.
By doing this, existing scripts can keep the current behavior, while new scripts can take advantage of the new event and the features in #1497 to block the placement of a block under certain conditions.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It was added in the cancellation PR, triggering before the placing, allowing to cancel. The old event
__on_player_places_blockremained untouched.maybe
__on_player_placing_blockcos it’s right as the player is placing the block, as opposed to after they place it?