Draft
Conversation
# Conflicts: # src/bin/src/packet_handlers/play_packets/place_block.rs # src/lib/core/Cargo.toml
…nsure no missing entries
ReCore-sys
reviewed
Jan 28, 2026
# Conflicts: # src/bin/src/register_resources.rs
ReCore-sys
suggested changes
Feb 9, 2026
| use tracing::error; | ||
|
|
||
| #[derive(Resource, Default)] | ||
| pub struct BlockUpdates(Vec<BlockPos>); |
Contributor
There was a problem hiding this comment.
This should probably either be a VecDeque or a crossbeam queue
| /// This macro simple exists to make adding methods to blocks easier. | ||
| /// | ||
| /// The syntax for this macro is as follows: `fn <name>([mut]; <arguments>) [-> <return type>; <default return value>]` | ||
| macro_rules! block_behavior_trait { |
Contributor
There was a problem hiding this comment.
Could you give an example of how and where this would be used?
|
|
||
| impl BlockBehavior for SlabBlock { | ||
| #[inline(always)] | ||
| fn get_placement_state(&mut self, context: PlacementContext, world: &World, pos: BlockPos) { |
Contributor
There was a problem hiding this comment.
How would this take into account stuff like placing blocks inside others (eg. trying to place a block on another block's face but there is a door/sign/trapdoor in the way)? It might also need to take into account stuff like entity collisions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a simple system that allows for blocks to possess specific behavior such as different placement states, random ticking, and more.
I'm going to add methods that are still needed to the BlockBehavior trait, as well as adding documentation explaining how to implement behavior for a block. I am also going to rework the static registry to use block state ids rather than names.