Download Re-Fraction — Minecraft Mods — MetaMods

Re-Fraction

Active

Downloads

1

Last update

3 years ago
Client
Adventure
Libraries

Re-Fraction

Re-Fraction is a dedicated extension for the Scavenge system that enhances its functionality regarding block destruction and placement.

Key Features:

This addon significantly differs from the original Scavenge system, which is why it was developed as a separate modification. This allows for greater specialization and precision when dealing with specific gameplay mechanics.

System Usage:

The system utilizes special scripts to configure behavior. Here's an example configuration:

{
    "scripts": [
        {
            "id": "test:break_netherrack",
            "swing": true,
            "drop_rule": "block",
            "type": {
                "type": "break",
                "consume": true,
                "show": true
            },
            "targets": [
                {
                    "type": "block",
                    "id": "minecraft:nether_brick"
                }
            ],
            "properties": [
                {
                    "property": "scavenge_player:is_sneaking",
                    "error_message": "Player must sneak"
                },
                {
                    "property": "scavenge_utils:add_data",
                    "data": {
                        "break_data": {
                            "cancel": true
                        }
                    }
                }
            ],
            "drops": [
                {
                    "lootPool": "minecraft:blocks/iron_block"
                }
            ]
        }
    ]
}

Event Types:

The mod introduces two new event processing types:

  • "break" - triggers when a player attempts to destroy a target block
  • "place" - activates when a player places a single block

Important Technical Details:

The "consume" configuration does not stop the game action itself but prevents the execution of subsequent scripts. If it's necessary to completely cancel a block destruction or placement action, use the "scavenge_utils:add_data" property with "break_data" or "place_data" parameters where "cancel" is set to true.

Project members
Speiger

Speiger

Created: 8 Nov 2021

ID: 36586