-
Notifications
You must be signed in to change notification settings - Fork 11
Revelations via Data Pack
You can specify custom Revelations via data pack via json.
In the data pack, these json files have to be placed in a folder resources/data/<<mod_id>>/revelations
-
block_states
: A mapping of block state definitions with original block to the block they should be visible as, when not revealed. Same format as thesetBlock
command -
items
: A mapping of item ids to the item they should be visible as, when not revealed -
advancement
(Identifier): the name of the advancement that will reveal all blocks and items when gotten
{
"block_states": {
"minecraft:grass": "minecraft:beacon",
"minecraft:tall_grass": "minecraft:obsidian",
"minecraft:tall_grass[half=upper]": "minecraft:netherite_block"
},
"items": {
"minecraft:nether_star": "minecraft:gunpowder"
},
"advancement": "minecraft:nether/root"
}
Now instead of grass, all the player sees are beacons, obsidian and netherite. That is, until they get the advancement "minecraft:nether/root", at which all those blocks turn "back" into grass. Nether Stars will look like enchanted gunpowder (since it inherits the enchantment glint of the nether stars). Of course this is a really useless example, but it get's the point across.
With version 1.1 comes a new optional option: Changing cloaked block and item names. For that just add two new entries item_name_replacements
and block_name_replacements
that map block / item ids to translation strings. These are getting looked up in language files, so you are able to create your own unique new names, or just reference existing ones.
In this example cloaked nether stars will have the name "Poppy" and diamond ore will read "Probably Stone?".
{
"advancement": "minecraft:adventure/root",
"block_states": {
"minecraft:grass": "minecraft:beacon"
},
"items": {
"minecraft:nether_star": "minecraft:gunpowder",
"minecraft:diamond_ore": "minecraft:stone"
},
"item_name_replacements": {
"minecraft:nether_star": "block.minecraft.poppy",
"minecraft:diamond_ore": "Probably Stone?",
"minecraft:grass": "block.minecraft.dandelion",
"minecraft:gold_ore": "Since Gold Ore is not in the items tag above, you should never see this"
},
"block_name_replacements": {
"minecraft:grass": "block.minecraft.dandelion"
}
}