GM4_Datapacks
GM4_Datapacks copied to clipboard
Update to 1.20.5
Preview download for testing: https://github.com/Gamemode4Dev/GM4_Datapacks/actions/runs/9099290404/artifacts/1505990608
Continued from #978
Steps taken
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- A lot of manual work!
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
- Particle syntax
-
(^particle| run particle) (minecraft:)?(block|block_marker|falling_dust|dust_pillar) (minecraft:)?([a-z0-9_:]+)->$1 minecraft:$3{block_state:"minecraft:$5"} -
(^particle| run particle) (minecraft:)?(dust) ([\d.]+) ([\d.]+) ([\d.]+) ([\d.]+)->$1 minecraft:$3{color:[$4,$5,$6],scale:$7} -
(^particle| run particle) (minecraft:)?(entity_effect) ([\d~^.-]+ [\d~^.-]+ [\d~^.-]+) ([\d.]+) ([\d.]+) ([\d.]+)->$1 minecraft:$3{color:[$5,$6,$7,$8]} $4 0 0 0 $8 - Manually fix the remaining particles
(^particle| run particle) (minecraft:)?(dust_color_transition|sculk_charge|vibration|shriek)
-
- 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
- phantom scarecrows allowed the curse enchantment on other armor slots than the chest
- smelteries and tinkering compressors
place_downuses raw custom model data
Notes
- 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 cartridges beehive predicate no longer checks that there are bees inside
- orb of ankou
shoot_crossbowadvancement no longer works with multishot
Possible feature changes
- Should hypexperia also be applicable to hoes?