baritone icon indicating copy to clipboard operation
baritone copied to clipboard

`BlockChangeEvent` only triggers on batch changes

Open ZacSharp opened this issue 9 months ago • 0 comments

Some information

Minecraft version: 1.19.4 Baritone version: v1.9.2-56-g497fb7482 (https://github.com/cabaletta/baritone/commit/497fb74829febf5bcf48732fa03abb3b90662dcb) Other mods (if used): None

Exception, error or logs

None

How to reproduce

  1. Modify GameEventHandler to log BlockChangeEvents
    @Override
    public void onBlockChange(BlockChangeEvent event) {
+        logDirect("BlockChangeEvent");
+        event.getBlocks().stream().forEach(p -> {
+            logDirect(p.first() + " is now " + p.second());
+        });
        if (Baritone.settings().repackOnAnyBlockChange.value) {
            final boolean keepingTrackOf = event.getBlocks().stream()
  1. Join a (single player) world
  2. break or place a block
  3. No events logged
  4. Change a lot of blocks at once (e.g. /fill ~ ~ ~ ~10 ~20 ~10 stone)
  5. Events logged (I got one per affected subchunk)

Modified settings

None

Final checklist

  • [x] I know how to properly use check boxes
  • [x] I have included the version of Minecraft I'm running, Baritone's version and Forge mods (if used).
  • [x] I have included steps to reproduce the issue.
  • [x] I have not pasted or written any OwO's or UwU's in this issue.

ZacSharp avatar Apr 14 '25 17:04 ZacSharp