Sueta

Keep Illegal Blocks

1.4.3-mc1.20.6

Prevent illegal blocks from breaking/updating when a player right-clicks on an adjacent block — KIB scans and restores blocks to avoid destroying your build

·Plugin

Keep Illegal Blocks

KIB is a Paper plugin that prevents illegal blocks from breaking when a player interacts with an adjacent block.

with_kibwithout_kib
🖼️ Click to see more examples

There you go 😎:

chairs_ezgifrail_ezgifcopper_slabs_ezgif
drawbridge_ezgiflantern_ezgifend_portal_frame_ezgif
grave_ezgifcauldron_ezgifgate_ezgif

So what's the point?

A "reactive block" is a block that naturally updates or breaks due to Minecraft physics when an adjacent block is
modified. When using tools like a Debug Stick or plugins such as WorldEdit or Axiom, you can place a reactive block in a
way the game's physics would not normally allow. However, if an adjacent block is updated, the reactive block will
either break or reset to its natural state.

An "interactable block" is a block that a player can directly interact with by right-clicking. If reactive blocks
are adjacent to an interactable block, they may break or update when the interactable is used.

When a reactive block breaks or updates, adjacent reactive blocks can be affected too, causing a chain reaction.

→ This plugin fixes this behavior by restoring broken or updated reactive blocks.


🔵 List of reactive material categories

List of reactive material categories that are automatically restored by KIB when broken or updated:

  • amethyst-clusters
  • bamboos
  • banners
  • beds
  • bells
  • cactus
  • cakes
  • carpets
  • cave-vines - Cave vines + Cave vine plants
  • chorus-plants - Chorus plants only (chorus flowers are not supported yet)
  • cocoa
  • crops
  • comparators
  • corals - Does not apply to waterlogged corals
  • dead-bushes
  • doors
  • dripleaves
  • fences - Fences + Iron bars + Copper bars
  • ferns - Ferns + Large ferns
  • flowers
  • frogspawn
  • fungus
  • glass-panes
  • glow-lichens
  • grass
  • hanging-roots
  • hanging-signs
  • ladders
  • lanterns
  • leaf-litters
  • lily-pads
  • mangrove-propagules
  • mushrooms
  • nether-roots
  • nether-sprouts
  • nether-warts
  • pressure-plates
  • rails
  • redstone-wires
  • repeaters
  • saplings
  • scaffolding
  • sculk-veins
  • sea-pickles
  • signs
  • snow
  • speleothems - Pointed dripstones + Sulfur spikes
  • sugar-canes
  • sweet-berry-bushes
  • switches - Levers + Stone buttons + Wooden buttons
  • torches
  • tripwire-hooks
  • twisting-vines - Twisting vines + Twisting vine plants
  • vines
  • walls
  • weeping-vines - Weeping vines + Weeping vine plants
🔴 List of interactable material categories

List of interactable material categories recorded by KIB:

  • campfires
  • candles
  • cauldrons
  • cave-vines - Taking vine berries (Cave vines + Cave vine plants)
  • chiseled-bookshelves - Putting or taking a book from a chiseled bookshelf
  • comparators
  • composters
  • copper-blocks - Non-plain copper blocks that can be waxed or scraped
  • daylight-detectors
  • doors
  • end-portal-frames
  • gates
  • lecterns - Putting a book on a lectern
  • levers
  • repeaters
  • stone-buttons
  • sweet-berry-bushes - Taking bush berries
  • trap-doors
  • wooden-buttons
🤔 Here are a few examples
  • Place a torch on a door. When you open the door, the torch breaks.
    → The torch is "reactive", the door is "interactable".
  • Stack multiple doors vertically and open the bottom one. All doors above break.
    → All doors are "reactive", the bottom door is the "interactable" one.
  • Place a row of walls, then use a Debug Stick to create crenels, and use Axiom to add a button on each. When you press
    one button, all buttons break and all wall connections reset to their normal state.
    → Walls and buttons are "reactive", the pressed button is also "interactable".

NOTE - KIB does not support underwater restorations. This is why seagrass and kelp are not included in the
reactive material list.

WARNING - Even after being restored by KIB, some reactive blocks will still update naturally, such as cactus
breaking as they grow, or coral dying when not waterlogged. This is the default behavior of the game, KIB will NOT
prevent this
, even if they were initially placed using plugins like WorldEdit or Axiom (which rely on advanced chunk
management systems).


Why would I need it?

This may seem niche, but it can be very useful for specific builds made using plugins like WorldEdit or Axiom,
especially when using custom resource packs that significantly change block textures and models.

This may also interest you if other players come onto your map and are likely to interact with your builds and break
everything accidentally... 😅


How do I configure?

In your server directory, you can edit ./plugins/KeepIllegalBlocks/config.yml to:

  • Blacklist some reactive or interactable materials (everything is enabled by default)
  • Change the maximum number of reactive blocks to restore (default: 500)
  • Only allow KIB in creative mode (default: true)
  • Use PacketEvents if it is detected (default: true)

To reload your configuration, use the /kib reload command (it requires the kib.reload permission for a non-op
player).


Can the restoration be any smoother?

Yes, PacketEvents is highly recommended to improve client-side rendering
and performance.

It is automatically detected by KIB, and it is used to tweak network packets and make restorations completely
transparent by canceling reactive block break sounds and particles, as well as hiding flickering during restoration.

To find out which version of PacketEvents is recommended, check the “Dependencies” section for the version of KIB you
want to install.


FAQ

Why doesn't KIB restore my blocks when I break an adjacent block?

KIB does not trigger when you break blocks manually (left-click); it only restores blocks that were accidentally
broken as a result of an interaction (right-click). This could be an improvement area, but I don't have time to work
on it at the moment. However, Axiom has a "No update" feature for this use case.

Similar projects

Plugin →