GM4_Datapacks
GM4_Datapacks copied to clipboard
Update to 1.20.5 (DRAFT)
Very temporary work, expect multiple rebases and force pushes! Not a draft because I want to see how the workflow explodes.
Initial steps
- Apply overlays with script
- Update version numbers and pack formats
- Update test functions (manually)
- Disable player head logic in plugins
Fixing JSON resource load errors
- Turtle scute: Replace
minecraft:scute->minecraft:turtle_scute - Location predicates
- Search for
"biome"and"structure"->"biomes"and"structures"
- Search for
- Nested loot tables
- Replace
("type": ?"(?:minecraft:)?loot_table",\n\s+(?:"weight": \d+,\n\s+)?)"name"->$1"value" - Fix
gm4_end_fishing:gameplay/fish/scattered_treasureandgm4_end_fishing:gameplay/fish/valuablesmanually
- Replace
- Set lore function
- Note down the 4
replacetrue cases in fileslore.json,copy.jsonandupdate_sips.json - Replace
,\n\s+"replace": (false|true)-> (empty replacement) - Replace
("function": "(?:minecraft:)?set_lore",(\n\s+))->$1"mode": "append",$2 - Switch in previous 4 cases
append->replace_all
- Note down the 4
- Block and item predicates
- Replace
("block": \{\n\s+)"tag": "([a-z])->$1"blocks": "#$2 - Replace
("fluid": \{\n\s+)"tag": "([a-z])->$1"fluids": "#$2 - Replace
("(?:mainhand|offhand|head|chest|legs|feet)": \{\n\s+)"tag": "([a-z])->$1"items": "#$2 - Search for
"tag": "[a-z]and manually fix the 3 item predicates in advancements + 1 in match tool predicate - Replace all
"tag"->"blocks"inhas_beam.json
- Replace
- Attribute operations
- Replace
"addition"->"add_value" - Replace
"multiply_base"->"add_multiplied_base" - Replace
"multiply" ->"add_multiplied_total"` (doesn't appear in our repo)
- Replace
- Item sub predicates
- Search
"potion"and fix the 2 cases manually - Replace
\n(\s+)"enchantments": \[\n(\s+)\{\n(\s+)"enchantment": "([a-z_:]+)"\n(\s+)\}\n(\s+)\]->\n$1"predicates": {\n$2"minecraft:enchantments": [\n$2 {\n$3 "enchantment": "$4"\n$5 }\n$6 ]\n$1} - Replace
\n(\s+)"enchantments": \[\n(\s+)\{\n(\s+)"enchantment": "([a-z_:]+)",\n(\s+)"levels": (\d+)\n(\s+)\}\n(\s+)\]->\n$1"predicates": {\n$2"minecraft:enchantments": [\n$2 {\n$3 "enchantment": "$4",\n$5 "levels": $6\n$7 }\n$8 ]\n$1} - Search
"enchantments": \[\n\s+\{and fix the remaining 10 cases manually - Search
"durability", we don't have any in our repo
- Search
- Advancement icons
- Replace
"icon": \{\n(\s+)"item"->"icon": {\n$1"id"
- Replace
- Sweeping edge: Replace
minecraft:sweeping->minecraft:sweeping_edge - Update yellow shulker box
-
set_nbt- Replace
set_nbt",\n(\s+)"tag": "\{StoredEnchantments:\[\{lvl:(\d+)s,id:\\"([a-z_:]+)\\"\}\]\}"->set_components",\n$1"components": {\n$1 "minecraft:stored_enchantments": {\n$1 "$3": $2\n$1 }\n$1} - Replace
set_nbt",\n(\s+)"tag": "\{CustomModelData:'([a-z0-9_/]+)'\}"->set_components",\n$1"components": {\n$1 "minecraft:custom_model_data": "$2"\n$1} - A lot of manual work!
- Replace
-
copy_nbtTODO
Fixing mcfunction files
- Attribute operations
- Replace
(attribute .*) add$->$1 add_value - Replace
(attribute .*) multiply_base$->$1 add_multiplied_base - Replace
(attribute .*) multiply$->$1 add_multiplied_total
- Replace
- Item stack NBT
- Replace
Count:(\d+)b?->count:$1 - Replace
\.Count->.count
- Replace
- Manual work
- Search for
\.tag|tag\.|tag:\{
- Search for
Issues found while updating
-
gm4_trapped_signs.jsonneeds to be moved into agm4_recipesfolder -
lingering_bottle_of_lightning.jsontried to set tagsParticleandRadiusOnUse, were these ever applied? -
spore.jsonandmalachite_lump.jsonuse raw custom model data - mountaineering
new_skisused the existing data of the first iron nugget, instead of the iron boots - beehive inspector lists and schedules a main function that doesn't exist
Notes
- There may be a smarter way to implement Moneo without storing/hardcoding
MaxDurability - better armour stands no longer matches books with multiple pages
- crossbow cartridges no longer works with multishot or tipped arrows due to matching exact
charged_projectilescomponent - crossbow cartdirdges beehive predicate no longer checks that there are bees inside
- orb of ankou
shoot_crossbowadvancement no longer works with multishot - custom potion IDs are no longer allowed, affecting lightning in a bottle and potion liquids currently changed format to custom_data
{gm4_potion_liquids:'floating'}
Possible feature changes
- Should hypexperia also be applicable to hoes?