Skip to content

Conversation

MNDIA
Copy link

@MNDIA MNDIA commented Oct 12, 2025

Type of change

  • Bug fix
  • New feature

Description

The breakBlock method modifies the private field breakingThisTick and collaborates with other @EventHandler in BlockUtils.
To enable detailed control over basic break operations without affecting existing functionality, I have added a new method:

public static boolean breakBlock(BlockPos blockPos, SwingMode swing, Supplier<Direction> getDirection) 

With the new enum:

    public enum SwingMode {
        None,
        SendPacket,
        Normal
    }

This enables the use of custom block surface logic and detailed swing control when invoking basic breakBlock methods.

Already tested in addons

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

@MNDIA MNDIA changed the title Update BlockUtils.java Enable granular control over the breakBlock method Oct 12, 2025
@MNDIA MNDIA closed this by deleting the head repository Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant