简介
游戏阶段附属,允许整合包作者对矿物(实际可以为任何方块)增加阶段,在玩家解锁该阶段之前这些方块会伪装成其他方块,其硬度、掉落物也会随之改变,且不允许玩家对其右键。
替换方法(需要 CraftTweaker)
替换为原版石头:
mods.orestages.OreStages.addReplacement(String stage, IIngredient original);
替换为其他方块:
mods.orestages.OreStages.addReplacement(String stage, IIngredient original, IItemStack replacement);
按方块 id 替换方块(用于无物品形式的方块):
mods.orestages.OreStages.addReplacementById(String stage, String original, String replacement);
另一种替换形式(官方页面解释为如果使用非玩家方式破坏方块,如使用机器或者爆炸,那么方块会掉落其伪装前的掉落物):
mods.orestages.OreStages.addNonDefaultingReplacement(String stage, IIngredient original);
mods.orestages.OreStages.addNonDefaultingReplacement(String stage, IIngredient original, IItemStack replacement);
mods.orestages.OreStages.addNonDefaultingReplacementById(String stage, String original, String replacement);
一些官方示例:
mods.orestages.OreStages.addReplacementById("one", "minecraft:potatoes:*", "minecraft:tallgrass:2");
mods.orestages.OreStages.addReplacementById("two", "minecraft:wheat:*", "minecraft:carrots:3");
mods.orestages.OreStages.addReplacementById("three", "minecraft:nether_wart:*", "minecraft:beetroots");
mods.orestages.OreStages.addReplacement("four", <minecraft:dirt>, <minecraft:stone>);
mods.orestages.OreStages.addReplacement("one", <minecraft:obsidian>, <minecraft:cobblestone>);
mods.orestages.OreStages.addNonDefaultingReplacement("one", <minecraft:torch:*>, <minecraft:redstone_torch>);
mods.orestages.OreStages.addReplacement("five", <minecraft:furnace:*>, <minecraft:stone>);
画廊
演示