Skip to content

Common Config

Redheris edited this page Nov 3, 2026 · 1 revision

Common config is configs/preventbuild/preventbuild.json file.

By default, it looks like this:

{
  "fix_pick_item_by_block": true,
  "slot_change_waiting_timeout_ms": 3000,
  "log_slot_change_waiting_time": false
}

The PreventBuild mod includes a fix of the issue that often disrupt conditions' context when building:

Pick item by block packet ("Pick Block", middle button click) can change the selected slot on the server side before the client will be notified. It leads to a problem when the client sends a useItemOn packet with different context from the server-side data. This fix blocks any interactions until the SetHeldSlot packet is received.
(Normally, it takes fractions of a second (I got 50-60 ms in my tests with ~40-60 ms ping and ~5-30 ms in singleplayer)

Using this config, you can:

  • fix_pick_item_by_block: false - turn this fix off;
  • slot_change_waiting_timeout_ms: {time} - change timeout of waiting for a SetHeldSlot packet;
  • log_slot_change_waiting_time: true - see how much time it takes to receive a SetHeldSlot packet after requesting picking a block, so you can estimate is it somehow critical for you.

Notes:

  • log_slot_change_waiting_time always resets to false on every client restart;
  • To update the common config in the game, use /pb config update command.

Clone this wiki locally