Skip to content

Commit

Permalink
Add support for 1.20.2
Browse files Browse the repository at this point in the history
Minecraft 1.20.2 uses resource pack version 17. Unfortunately the commands for
setting invisibility changed, breaking backwards compatibiltiy. We now
use data pack format 17. The format changed in snapshot 23w32a.
  • Loading branch information
Peter Svensson committed Oct 23, 2023
1 parent 454f698 commit f143367
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Changes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
rev 1.2
-------

- Support for 1.20.2 and resource pack version 17
- Unfortunately the commands for setting invisibility changed, breaking backwards compatibiltiy.

rev 1.1
-------

Expand Down
2 changes: 1 addition & 1 deletion data/ridedragon/functions/summon_dragon.mcfunction
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Step the global counter. It is used as a pseudo-uuid that can be stored in the entity data.
scoreboard players add #rd_global_cnt rd_id 1

summon minecraft:horse ~ ~1 ~ {NoAI:1b,Invulnerable:1b,Tags:["dragonseat","dragon_temp"],DeathLootTable:"minecraft:empty",Attributes:[{Name:"generic.knockback_resistance",Base:10000f}],ActiveEffects:[{Id:14,Amplifier:0,Duration:2147483647,ShowParticles:0b}],Silent:1b}
summon minecraft:horse ~ ~1 ~ {NoAI:1b,Invulnerable:1b,Tags:["dragonseat","dragon_temp"],DeathLootTable:"minecraft:empty",Attributes:[{Name:"generic.knockback_resistance",Base:10000f}],active_effects:[{id:invisibility,amplifier:0,duration:2147483647,show_particles:0b}],Silent:1b}
scoreboard players operation @e[type=minecraft:horse,tag=dragon_temp,distance=..2,limit=1] rd_id = #rd_global_cnt rd_id
tag @e[type=minecraft:horse,tag=dragon_temp,distance=..2,limit=1] remove dragon_temp

Expand Down
2 changes: 1 addition & 1 deletion pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 10,
"pack_format": 17,
"description": "Ridable dragons by ptefar"
}
}

0 comments on commit f143367

Please sign in to comment.