replacer (flux's redo)

provides a node replacement tool and a node inspection tool. slightly different than the other replacer variants.

Tools / Weapons / Armor

Download (31 KB)
For Luanti 5.7 and above

How do I install this?

replacers, but with fewer bugs and fewer "features"

the aim of this variant is to try to use the highest level APIs provided, to trigger all possible callbacks.

features

  • no building on the ocean
  • uses the game's builtin mechanisms as much as possible, so there's (hopefully) less need for lots of complicated integration w/ weird mods (awards, xp_redo, machines, etc.)
  • for server maintainers, api allows easy customization of behavior. want to limit it to the user's protected areas? almost trivial.

creaplacer

there's a special creative-only replacer. to get one, do /giveme replacer:creaplacer.

additional features of the creaplacer: * points at liquid nodes * longer range (10 nodes) * copies/pastes node metadata * can force-replace nodes (as long as they're not blacklisted or something)

API

blacklists
  • replacer.api.blacklist_item(itemstring)

blacklists itemstring from use in the replacer.

  • replacer.api.blacklist_groups(groups)

blacklist nodes w/ the given combination of groups from use in the replacer. e.g. lua groups = { cracky = 2, level = 2, } bans any node which has both cracky >= 2 and level >= 2

  • replacer.api.blacklist_item_replacement(itemstring)

blacklists itemstring from being replaced w/ the replacer.

  • replacer.api.blacklist_groups_replacement(groups)

blacklist nodes w/ the given combination of groups being replaced w/ the replacer. e.g. lua groups = { cracky = 2, level = 2, } bans any node which has both cracky >= 2 and level >= 2

over-ride-able callbacks
  • replacer.api.is_blacklisted(itemstring)

override if you want to customize the logic of what can be blacklisted

  • replacer.api.is_replacement_blacklisted(itemstring)

override if you want to customize the logic of what can be blacklisted from being replaced

  • replacer.api.can_copy(player, pos, node)

override if you want to customize which nodes a player can copy

  • replacer.api.can_place(player, pos, node)

override if you want to customize whether a node can be placed by a player

  • replacer.api.can_replace(player, pos, current_node, replace_node)

override if you want to customize whether a node can be replaced by a player

license

code license: * LGPL

media license: * replacer_inspector.png (C) Sokomine GPLv3+ * replacer_replacer.png (C) Sokomine GPLv3+

Reviews

Review

Do you recommend this mod?

  • One of my Favorite building tools

    I really enjoy using the replacer mod as a person who likes to build on servers. I may not be the greatest builder, but when placing nodes, this is so useful so you don't have to keep placing and digging when it doesn't face "just right" or you're frustrated using the screwdriver on every node that needs turned differently. You must have more in your inventory to use them, else you will get an error that tells you that you have no more to place and some nodes will be blacklisted, so you can't replace or place those nodes. (TBD by the Admin.)

    Also, I have this silly thing I do when I join a new server. I build with whatever material I can get the fastest - usually dirt, unless starter items are provided. That means I'm building a quick dirt box. (EYESORE! YUCK!) This is where the replacer is AMAZING!

    1. Place down whatever node you want to use.
    2. Shift + right click the node to select it.
    3. Left click to exchange an existing node for the one you selected.
    4. Right click to place the selected node on any exposed face of an existing node to place the selected node adjacent to the existing node where you clicked.
    5. If you want to switch over to another node, you would simply repeat step 2.

    Ok, so back to my dirt box starter house. I can spam replace all the dirt randomly or uniformly to make it look nice, such as turning it all to wood planks, if I have them in my inventory. I can also place nodes next to other nodes, so I could take stone stairs and create a roof, by placing them along the top most dirt's exposed side and exposed top. Some nodes will be filled in by hand, but those that have to be turned are easiest placed after the first one is placed and turned the direction needed.

    (See comment for more thoughts.)

    1 comments

Used By