我的世界[1.12.2]对研究内容进行魔改
在1.12.2版本下可以通过json文件的方式对研究内容进行魔改(之前版本用crt)。
配置文件在config\ftgumod下。
ftgumod.cfg的内容:
# Configuration file
general {
# 如果启用,研究可以被复制,方便中期其他玩家加入。
B:allowResearchCopy=true
# 如果启用,所有玩家在加入时都会获得一本研究书。
B:giveResearchBook=false
# jei隐藏方式,你可以隐藏物品和配方。
# 可选值:
# NOTHING
# LOCKED_RECIPES
# LOCKED_RECIPES_AND_ITEMS
S:jeiHide=LOCKED_RECIPES_AND_ITEMS
# 是否禁用模组自带的研究
B:loadDefaultTechnologies=false
}
然后在technologies下新建文件夹,作为命名空间(在此以ftgumod为例),在该文件夹下新建文件命名为_constants.json,作用类似于标签或矿辞,内容如下:
[
{
"ingredient": [
"minecraft:wooden_pickaxe",
"minecraft:stone_pickaxe",
"minecraft:iron_pickaxe",
"minecraft:golden_pickaxe",
"minecraft:diamond_pickaxe"
],
"name": "pickaxe"
},
...
]
这样,你就可以在之后的研究文件内使用”#pickaxe”来代表上面列举的镐。
新建文件夹作为章节名(以survival为例),以模组自带的survival.json为例,内容如下:
{
"display": {
"icon": {
"item": "minecraft:crafting_table"//作为图标
},
"title": {
"translate": "technology.survival.name"//翻译键,下同
},
"description": {
"translate": "technology.survival.desc"
},
"background": "minecraft:textures/blocks/dirt.png",//背景图片
"x": 0,
"y": 0//位置,根研究建议放在原点
},
"start": true,//true表示根研究
"unlock": [//解锁的物品列表
{
"type": "forge:ore_dict",
"ore": "plankWood"
},
{
"type": "forge:ore_dict",
"ore": "slabWood"
},
{
"type": "forge:ore_dict",
"ore": "stairWood"
},
{
"type": "forge:ore_dict",
"ore": "stickWood"
},
"minecraft:wooden_sword",
"minecraft:wooden_shovel",
"minecraft:wooden_pickaxe",
"minecraft:wooden_axe",
"minecraft:crafting_table",
"minecraft:torch",
"minecraft:bowl"
]
}
该研究无需进行任何操作即可自动解锁。
以其下级研究boat.json为例:
{
"display": {//图标、翻译键、位置设置,同上
"icon": {
"item": "minecraft:boat"
},
"title": {
"translate": "technology.boats.name"
},
"description": {
"translate": "technology.boats.desc"
},
"x": 2,
"y": 0
},
"parent": "ftgumod:survival/survival",//父研究,将上面的survival.json作为父研究
"idea": {//在创作台内的操作
"amount": 1,//物品需求数量
"ingredients": [
"minecraft:bowl"
]
},
"unlock": [//解锁物品
"#boat"
]
}
这是一个比较简单的研究,只需在创作台内消耗一个木碗即可解锁。
以stoneworking.json为例,这是一个需要研究台的研究,内容如下:
{
"display": {
"icon": {
"item": "minecraft:stone_pickaxe"
},
"title": {
"translate": "technology.stoneworking.name"
},
"description": {
"translate": "technology.stoneworking.desc"
},
"x": 2,
"y": 3
},
"parent": "ftgumod:survival/survival",
"idea": {
"amount": 2,
"ingredients": [
[
{
"type": "forge:ore_dict",
"ore": "stickWood"
},
"minecraft:wooden_sword",
"minecraft:wooden_shovel",
"minecraft:wooden_pickaxe",
"minecraft:wooden_axe",
"minecraft:wooden_hoe"
],
{
"item": "minecraft:cobblestone"
}
]
},
"research": {//研究台内的研究
"type": "ftgumod:match",//已知有两种格式,match和connect,match类似于工作台,在问号处放入key对应的物品即可;connect较为麻烦,在下面会举例。
"pattern": [//类似于原版工作台shaped配方,一个字符代表一个key,空格表示不需要任何物品。
" RC",
" SR",
"S "
],
"key": {
"R": {
"item": [
"minecraft:string",
"minecraft:reeds"
],
"hint": {
"translate": "technology.hint.rope"//提示的翻译键
}
},
"C": {
"item": "minecraft:cobblestone",
"hint": {
"translate": "technology.hint.head"
}
},
"S": {
"item": {
"type": "forge:ore_dict",
"ore": "stickWood"
},
"hint": {
"translate": "technology.hint.handle"
}
}
}
},
"unlock": [
"minecraft:stone_sword",
"minecraft:stone_shovel",
"minecraft:stone_pickaxe",
"minecraft:stone_axe"
]
}
这一研究需要在创作台消耗1木棍(或任何木制工具)和1圆石,会得到一张未完成研究的羊皮纸,将其放入研究台,按照图案放入木棍、圆石、线或甘蔗即可解锁。
另一种研究方式,以gem_armor.json为例:
{
...
"research": {
"type": "ftgumod:connect",
"left": {
"type": "forge:ore_dict",
"ore": "leather"
},
"right": {
"type": "forge:ore_dict",
"ore": "gemDiamond"
}
},
...
}
这表示从左(皮革)至右(钻石)依次放入相关产物,具体计算方式详见游戏设定。
有些研究需要触发才能进行研究,例如酿造的触发条件:
{
...
"criteria": {
"effect": {
"trigger": "minecraft:effects_changed"
},
"witch": {
"trigger": "minecraft:player_killed_entity",
"conditions": {
"entity": {
"type": "minecraft:witch"
}
}
},
"inspect": {
"trigger": "ftgumod:block_inspected",
"conditions": {
"block": "minecraft:cauldron",
"location": {
"biome": "swampland"
}
}
}
},
...
}
获得任何效果或者杀死女巫都能开启炼药的研究(炼药锅目前使用放大镜在沼泽潜行右键无效,触发方式未知)。
研究写完后无需重启游戏,但需要新建存档才能看到更改结果。