Repository navigation
Upgrade Guide 1.20.1 ‐ 1.20.2
Emil Balicki edited this page Dec 11, 2023
·
4 revisions
When updating the support of the Caged Mobs to Minecraft 1.20.2 several things need to be taken into account.
Inside the JSON files, the conditions should be changed to forge:condition, as well as, changed from a list to a single object.
Old code:
"conditions": [
{
"type": "forge:mod_loaded",
"modid": "alexsmobs"
}
],New code:
"forge:condition": {
"type": "forge:mod_loaded",
"modid": "alexsmobs"
},In the case of multiple modid required, use the forge:and condition (generally, any forge condition should work). Example:
"forge:condition": {
"type": "forge:and",
"values": [
{
"type": "forge:mod_loaded",
"modid": "quark"
},
{
"type": "forge:mod_loaded",
"modid": "betterdefaultbiomes"
}
]
},- New Craft Tweaker recipes now do not require the recipe ID to be provided. Example
val better_pig = entities.create("minecraft:pig", 1200, false, 1, "farm");instead ofval better_pig = entities.create("exampledatapack:betterpig","minecraft:pig", 1200, false, 1, "farm");. - The display block for the environment recipes now requires blocks and not block states. Example:
<block:minecraft:grass_block>instead of<blockstate:minecraft:grass_block> - When adding a new Loot to either Entity Recipe or Additional Loot Recipe using the all parameters method, two new parameters need to be provided, namely the
nbtNameandnbtData. These parameters can be used to apply custom NBT data to the dropped item. Example:entityRecipe.addLoot(<item:minecraft:potion>,<item:minecraft:air>, 0.8, 1, 2, false, false, -1, false, "Potion", "minecraft:invisibility");. For more info look at the corresponding Craft Tweaker support page for Minecraft 1.20.2. - (Not strictly a 1.20.2 change, but remember to do it) Renamed some environment JSON files to be consistent with others. The environment recipe file names are now named after the input block and not the category they are related to.
- Changes:
-
environments/end→environments/end_stone -
environments/farm→environments/hay_block -
environments/nether→environments/magma_block -
environments/snow→environments/snow_block -
environments/cave→environments/stone
-
- Changes:
- (Not strictly a 1.20.2 change, but remember to do it) Updated the name of the entities folder, which stores data pack's JSON files related to mobs. This change includes changes for the Caged Mobs files and all supported mods included by default. (Renamed
mobs→entities). -Example:entities.getEntity("cagedmobs:entities/cow");instead ofentities.getEntity("cagedmobs:mobs/cow");.
Any questions? Ask them here on GitHub or at CurseForge!