This tutorial is set by the author's setting without permission.
I saw the MOD when making a integrated package, which felt great, but only supported the original and Alex creatures. This is a pity, so I tried to add a new statue with a packet and found that it was feasible.
There is no need to say more about the basal format of the packet, please check wiki by yourself.
The file path is Data/Trofers/Trofers/
The subfolders under the file path can read the data/trofters/true/<"naming space>/naming space .json
Take the monthly childbirth mother of the four seasons as an example.
Create the file path
Data/Trofers/Trofers/Abundant_Seasons_2/Yue_yu_mu.json
Next is the internal json file
{{"Conditions": [[
{{
"Modid": "Abundant_seasons_2", // modid
"Type": "Forge: MOD_LOADED" // This is a must -fill item. The original entity does not need this line.
}
],,,
"Name": {
"COLOR": "#C0C6ff", // Color
"Translate": "trophy.trofers.composed", // must fill in item
"With": [[
{{
"Translate": "Entity.abundant_Seasons_2.yue_yu_MU" //
}
]
},
"Display": {
"Offset": {
"Z": -1.5 // Z axis offset, you can fill in x or y, or you can delete this line)
},
"Scale": 0.8 // Model size
},
"Entity": {
"Type": "Abundant_seasons_2: yue_yu_mu"
},
"Colors": {{
"Base": "#606060",
"Accent": "#c0c6ff"},
"Effects": {
"Sound": {{
"Soundevent": "Minecraft: Entity.spider.ambient" // Sound effect
},
"Rewards": {
"Loottable": "Trofers: Trophies/Abundant_Seasons_2/Yue_yu_mu", // Get the way, this is a specific look behind.
"COOLDOWN": 9600 // cooling time
}
}
}
The acquisition of the statue also needs to write the JSON file
The path is Data/Trofers/LOOT_TABLES/TROPHIES/
We write the loot watch of the monthly mother -in -law
{{"Pools": [[
{{
"Rolls": 1.0,
"Bonus_rolls": 0.0,
"ENTRIES": [[
{{
"Type": "Trofers: Optional_item",
"When": [
{{
"Modid": "Abundant_seasons_2", // modid
"Type": "FORGE: MOD_LOADED"
}
], "Name": "Abundant_seasons_2: yue_yu_mu" // physical registration name
}
]
}
]
}
Immediately after writing LOOT_MODIFIERS, the path is Data/Trofers/LOOT_MODIFIERS/
Let's take the monthly childcare mother as an example.
File inside text:
{
"": ": [
{
"condition": "minecraft: killed_by_player" // Get the condition, the default is killed by the player
},
{
contact ":" troftom_trophy_chance "// must be filled
],
"trophybase": "Trofers: Small_plate_plate", // size
" trophies ": [
{
Entity": "Abundant_seasons_2: yue_yu_mu", // physical ID
Trofers: Abundant_seaso ns_2/yue_yu_mu "// Path
}
],
"type": "Trofers: add_entity_trophy" // Must -fill
}and then include the LOOT_MODIFIERS we wrote on the list
The path is Data/Forge/Loot_modifiers/Global_Loot_modifiers.json
The default text is
{{"Replace": false,
"ENTRIES": [[
"Trofers: Vanilla_trophies",
"Trofers: Alexsmobs_trophies"]
}
We add a line
{
"replace": false,
"entries":
Trofers: vanilla_trophies",
Trofers: alexsmobs_trophies ",pre class = "brush: none;"> Trofers: Abundant_seasons_2_trophies "
}
Finally, load the data packet and open the game to see the finished product.