Block-Item Tweaker is a straightforward utility for modpacks that allows to assign any arbitrary block to an arbitrary item by configuring their relation in a reloadable JSON. It effectively merges both, so that when you "place" the item, the block will be placed.
Block-items can be defined to be placed by right-clicking and shift-right-clicking (vanilla behavior) or ony when shift-right-clicking (useful for items with right-click uses)
Do note you will have to manually tweak the drops of the block to drop back the item with a mod like Dropt or CraftTweaker.
What can you do with this? Well, you will have to create the blocks yourself with another mod (ContentTweaker, Content Creator, BBLSOhMy, etc) or think of existing relations that make sense, but to give an example, placeable vanilla sticks, bowls, paper, books, etc, etc. Just asign a block to them.
Go to config\placeable.json or create the file if it doesn't exist, then define the item:block relationship. Below is a ready-to-test example.
Use command /placeable reload to test your changes in-game
{
"normal": {
"minecraft:stick": "minecraft:planks",
"minecraft:coal": {
"block": "minecraft:stained_glass",
"mode": "direct",
"state": {
"color": "red"
}
},
"minecraft:coal:1": {
"block": "minecraft:stonebrick",
"mode": "set_item",
"meta": 0
},
"minecraft:dye": "minecraft:wool",
"minecraft:golden_apple": {
"block": "minecraft:wool",
"mode": "set_item"
}
},
"sneaking": {
"minecraft:coal": {
"block": "minecraft:stained_glass",
"mode": "direct",
"state": {
"color": "green"
}
},
"minecraft:iron_ingot": "minecraft:iron_block"
}
}
Item metadata is definided directly on the item key; block meta/state must be defined in the dedicated fields.
Entries have a "mode" field, which can be "direct", "held_item", or "set_item". This is to solve the problem of some block placement logic possibly requiring the player to be actually holding a stack of the block.
Do note this mod's placement bypasses the forge block placement events, which means other mods might not be able to tell that the player placed the blocks; a potentiual issue with e.g. claim protection mods and the like.
Here is a demo of the mod as seen in Rebirth of the Night
Using the following config:
{
"normal": {
"minecraft:stick": {
"mode": "set_item",
"item": "betterwithmods:grate",
"meta": 0
},
"minecraft:bone": {
"mode": "set_item",
"item": "betterwithmods:grate",
"meta": 1
},
"simpleores:mythril_rod": {
"mode": "set_item",
"item": "betterwithmods:grate",
"meta": 2
},
"minecraft:bowl": "contenttweaker:bowl",
"minecraft:paper": {
"mode": "set_item",
"item": "bblsom:paper"
},
"minecraft:glass_bottle": "contenttweaker:bottle"
}
}
Graciously coded in its entirety by phantamanta44
Idea and logo by Foreck
PSA: mixinbooter versions 11.5 to 11.14 are incompatible with Fermium and thus BBLSOhMy if you want to use both loaders, it is recommended to downgrade mixinbooter or wait for a fix
Used in the demo video are Papers: BBLSOhMy's litter blocks; Bowl: ContentTweaker; and Stick: remodeled/retextured grate from Better With Mods