Ancient Artifacts [Fabric]

Ancient Artifacts [Fabric]

10.9k Downloads

[Feature Suggestion] Configurable list of affected blocks

ehx-v1 opened this issue ยท 0 comments

commented

As it stands, the Artifact Totem structure affects precisely the End Portal Frames, not more, not less. This is useful for the "default" purpose, however modpack creators may have a wide array of plans with this, such as gating away dimensions from other mods instead. Additionally, some mods can have their own End Portal setup with its own activation (which modpack creators might also want to gate), or have another interaction involving End Portal Frames (that would also be gated despite having absolutely no correlation with this mod's purpose).

And that's where this idea comes in. The default config for this mod could look something like this:

{
    "affected_blocks": [
        "minecraft:end_portal_frame"
    ]
}

As you can see, the default behavior remains the same - End Portal Frames cannot be interacted with unless an Artifact Totem structure is nearby. However, users can then easily change it to something like this:

{
    "affected_blocks": [
        "minecraft:smithing_table",
        "minecraft:respawn_anchor"
    ]
}

This would result in the default behavior being disabled entirely. Instead, a nearby Artifact Totem is required for opening the Smithing Table GUI as well as using Respawn Anchors.

This could go even further. For example, if the config looks like this:

{
    "affected_blocks": [
        {
            "block": "minecraft:end_portal_frame",
            "item_list": [
                "minecraft:eye_of_ender"
            ],
            "use_item_list_as_whitelist": false
        }
    ]
}

Then there already is a chance that the resulting default behavior is slightly changed, closer to its goal. Namely, interacting with End Portal Frames is only disabled for Ender Eyes, leaving open the possibility for other items (e.g. other mods may be using End Portal Frames as inscribing stations for their own portal activators) to still interact with them as intended. Additionally, something like this can be configured:

{
    "affected_blocks": [
        {
            "block": "minecraft:end_portal_frame",
            "item_list": [
                "endutils:ender_staff",
                "dimdungeonsfabric:portal_key"
            ],
            "use_item_list_as_whitelist": true
        },
        {
            "block": "#betterend:pedestals",
            "item_list": [
                "betterend:amber_gem"
            ],
            "use_item_list_as_whitelist": false
        },
        {
            "block": "ironchest:gold_chest",
            "item_list": [
                "minecraft:air"
            ],
            "use_item_list_as_whitelist": true
        }
    ]
}

This does a few things:

  • While regular Eyes of Ender (and most replacements for them) still can't be inserted into End Portal Frames unless an Artifact Totem is nearby, an Ender Staff (from a custom mod that would probably be a specific modpack companion) can bypass the limitation and activate the End Portal early, and a Fabric port of Dimensional Dungeons (if it were to happen) can use them to activate its dungeon keys.
  • The second clause uses a block tag to achieve its goal. It disables inserting Amber Gems into Better End pedestals (of the regular kind) unless an Artifact Totem is nearby, thus leaving the creation of Eternal Portal materials openly accessible but gating the creation of Crystalite Armor behind the artifacts.
  • Gold Chests can only be opened with an empty hand unless an Artifact Totem is nearby. Additionally, upgrading them further is locked behind the Artifact Totem as well.

As you can see, the config option would convert this mod from a one-purpose thing into a versatile modpack tool, which in my books is always a good thing, especially when achieved with relatively little.