Data Packs Tool

Fence Tweaker

  • 1.6k views 6 today
  • save_alt 132 downloads
Compatibility
Minecraft 1.21
Changes include
    • 6
    • 7
    • 1
    mc_da
    Lvl 67High Grandmaster Technomancer
    250
    Fence Tweaker is a datapack that allows you to add or remove connections for all types of fences, walls, glass panes and iron bars. This allows for building tricks that would normally be impossible in survival Minecraft.

    COMPATIBILITY

    Fence tweaker works in Minecraft Java 1.21.5+. It should be compatible with most other datapacks and mods.

    GETTING STARTED

    First of all you need to craft a Fence Tweaker using 3 iron bars and 2 wooden fences (can be any wood type), as shown below.

    Fence Tweaker crafting recipe


    While holding a Fence Tweaker, right-click on a fence, stone wall, glass pane or fence gate to change its properties. More info is listed below.

    FENCES

    Right clik the center post with a Fence Tweaker to add a connection to its side. Right-click a connection to remove it.

    Fence gif 1


    If two fence blocks are adjacent, adding/removing a connection of one fence will automatically add/remove the connection for the adjacent fence (see below). To create individual connections, shift + right-click the fence instead.

    Fence gif 2


    GLASS PANES AND IRON BARS

    Glass panes and iron bars work similarly to fences: right-click the block with a Fence Tweaker to add or remove connections.

    Pane gif 1


    Block adjacency for glass panes and iron bars is handled the same as for fences: connections are added/removed from both blocks, unless you shift + right-click.

    Pane gif 2



    WALLS

    Modifying wall connections is a bit more complicated. Walls have 2 types of connections: low and tall. They also have a central pillar that can be removed.

    Right-click the central pillar with a fence tweaker to add a low connection to its side. Right-click a connection on the top to change its height from low to tall or vice versa. Right click a connection on the side to remove it.

    Wall gif 1


    As with fences, changing a connection for a wall will also change it for the adjacent wall unless you shift + right-click the block. There is one exception: if you shift + right-click the central pillar, Fence Tweaker will attempt to remove the center instead.

    Wall gif 2


    It is also possible to add or remove the central pillar. If the wall has no center, right-clicking it around the middle of the block will add the center pillar.
    If the wall has a center, right-clicking the central pillar on the top or bottom will attempt to remove it. If you want to remove the center from the side you have to shift + right-click it; just right-clicking will create a connection.

    Wall gif 3


    It is always possible to add a central pillar but it's not always possible to remove it.
    Rules for removing the central pillar (click to expand)
    Whether the center can be removed depends on the wall's connections. Normally the center pillar covers connections and removing it could cause visual bugs, as shown below.

    Visual bug

    The central pillar can be removed if every connection is covered by other connections. Examples:


    ex1
    The two connections are perpendicular and don't cover each other. The center can't be removed.


    ex2
    The three connections are all the same height, therefore they cover each other. The center can be removed.


    ex3
    The tall connection is not covered by the two lower connections. The center can't be removed.


    ex4
    The lower connection is covered by two perpendicular tall connections. The center can be removed.


    ex5
    The lower connection on the right is not fully covered by the two tall connections. The center can't be removed.




    FENCE GATES

    Fence gates have two possible heights: low and tall. If you shift + right-click a fance gate with a Fence Tweaker, it will toggle between the two heights.

    Fence gate gif



    BLOCK UPDATES

    Placing any block next to a modified block can remove custom connections. This is why it's recommended to place all blocks in your build before you modify any fence connections.

    Block update gif



    This is an unfinished proof of concept datapack. If you have any feedback, please leave it in the comment section.

    More like this

      Have something to say?

    ItsMatteo
    03/16/2025 5:48 pm
    Level 7 : Apprentice System
    amazing datapack!
    1

    Welcome