jacksonhardaway / locksmith

🔐 A mod about locks.
https://www.curseforge.com/minecraft/mc-mods/locksmith
Other
9 stars 8 forks source link

[Question] Is it possible to manually add chests? #19

Closed Bob74 closed 2 years ago

Bob74 commented 2 years ago

What version are you seeing the problem on?

1.18.2

Describe the issue

Mod version : Fabric 1.18.2 - 1.0.3


Hi, I really love your mod!

I'm making a modpack and I noticed it is not compatible with some modded chests (from Ironchests Restocked and Charm)

ironchests:dirt_chest
ironchests:copper_chest
ironchests:iron_chest
ironchests:gold_chest
ironchests:diamond_chest
ironchests:obsidian_chest
ironchests:crystal_chest
ironchests:netherite_chest

charm:acacia_chest
charm:acacia_trapped_chest
charm:azalea_chest
charm:azalea_trapped_chest
charm:birch_chest
charm:birch_trapped_chest
charm:crimson_chest
charm:crimson_trapped_chest
charm:dark_oak_chest
charm:dark_oak_trapped_chest
charm:ebony_chest
charm:ebony_trapped_chest
charm:jungle_chest
charm:jungle_trapped_chest
charm:oak_chest
charm:oak_trapped_chest
charm:spruce_chest
charm:spruce_trapped_chest
charm:warped_chest
charm:warped_trapped_chest

Is it possible to add lock compatibility using a datapack?

latest.log

(Question)
jacksonhardaway commented 2 years ago

You can add blocks in the locksmith:lockable tag

Bob74 commented 2 years ago

If someone is looking for this, create a datapack and add the following file:

data/locksmith/tags/blocks/lockable.json

{
  "replace": false,
  "values": [
    "#minecraft:wooden_doors",
    "#minecraft:wooden_trapdoors",
    "#minecraft:fence_gates",
    {"id": "ironchests:dirt_chest", "required": true},
    {"id": "ironchests:copper_chest", "required": true},
    {"id": "ironchests:iron_chest", "required": true},
    {"id": "ironchests:gold_chest", "required": true},
    {"id": "ironchests:diamond_chest", "required": true},
    {"id": "ironchests:obsidian_chest", "required": true},
    {"id": "ironchests:crystal_chest", "required": true},
    {"id": "ironchests:netherite_chest", "required": true},
    {"id": "charm:acacia_chest", "required": true},
    {"id": "charm:acacia_trapped_chest", "required": true},
    {"id": "charm:azalea_chest", "required": true},
    {"id": "charm:azalea_trapped_chest", "required": true},
    {"id": "charm:birch_chest", "required": true},
    {"id": "charm:birch_trapped_chest", "required": true},
    {"id": "charm:crimson_chest", "required": true},
    {"id": "charm:crimson_trapped_chest", "required": true},
    {"id": "charm:dark_oak_chest", "required": true},
    {"id": "charm:dark_oak_trapped_chest", "required": true},
    {"id": "charm:ebony_chest", "required": true},
    {"id": "charm:ebony_trapped_chest", "required": true},
    {"id": "charm:jungle_chest", "required": true},
    {"id": "charm:jungle_trapped_chest", "required": true},
    {"id": "charm:oak_chest", "required": true},
    {"id": "charm:oak_trapped_chest", "required": true},
    {"id": "charm:spruce_chest", "required": true},
    {"id": "charm:spruce_trapped_chest", "required": true},
    {"id": "charm:warped_chest", "required": true},
    {"id": "charm:warped_trapped_chest", "required": true},
    {
      "id": "#c:chest",
      "required": false
    },
    {
      "id": "#forge:chests",
      "required": false
    },
    {
      "id": "#c:barrel",
      "required": false
    },
    {
      "id": "#forge:barrels",
      "required": false
    }
  ]
}
GamerTable commented 1 year ago

Hey, sorry for posting on a Closed thread but you can just add the tag/line {"id": "#c:wooden_chests", "required": true}, And this will make most modded chests work without having to individually put one by one. data/locksmith/tags/blocks/lockable.json

Hope this helps!


{
  "replace": false,
  "values": [
    "#minecraft:wooden_doors",
    "#minecraft:wooden_trapdoors",
    "#minecraft:fence_gates",
    {"id": "#c:wooden_chests", "required": true},
    {"id": "#paradise_lost:wooden_chests", "required": true},
    {"id": "#paradise_lost:doors", "required": true},
    {
      "id": "#c:chest",
      "required": false
    },
    {
      "id": "#forge:chests",
      "required": false
    },
    {
      "id": "#c:barrel",
      "required": false
    },
    {
      "id": "#forge:barrels",
      "required": false
    }
  ]
}