Separation of block interact disabling vs actual sneak/crouch #6548
Labels
Category: Gameplay
Related to Minecraft gameplay experience
Type: Enhancement
Contributes features or other improvements to PocketMine-MP
Problem description
There are currently two functions of player sneaking:
These two things are no longer coupled to the same thing. There are now 4 states for this:
false
false
false
true
true
false
true
true
Proposed solution
There needs to be a separation of crouching from the player's desire to disable block interactions.
Unfortunately, this is difficult to do cleanly, as
isSneaking
is aLiving
function, meaning that it should refer to crouching, but the most common usages of sneaking in plugins will probably be to disable block interactions.It's also difficult to choose a name for such a property.
Player->disableBlockInteractions()
is the best I can come up with, but I don't like it much.Relates to #6544
Alternative solutions that don't require API changes
The text was updated successfully, but these errors were encountered: