Skip to content

Commit

Permalink
Correct version checks/pack formats
Browse files Browse the repository at this point in the history
  • Loading branch information
tryashtar committed Jun 20, 2024
1 parent 283a97a commit 5f0a560
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 14 deletions.
Binary file modified 1.15/Shulker Preview Data Pack (1.15).zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
execute store result score #version shulker_preview run data get entity @a[limit=1] DataVersion
execute if score #version shulker_preview matches 1..1967 run tellraw @a [{"text":"\nOutdated Minecraft version!\nYou need to be on version ","color":"red"},{"text":"1.14.3","color":"yellow"},{"text":" or later for shulker previews to work!"}]
execute if score #version shulker_preview matches 1..1967 run scoreboard players set #setup shulker_preview -1
execute if score #version shulker_preview matches 1968.. if score #setup shulker_preview matches -1 run scoreboard players set #setup shulker_preview 0
execute if score #version shulker_preview matches 1..2224 run tellraw @a [{"text":"\nOutdated Minecraft version!\nYou need to be on version ","color":"red"},{"text":"1.15","color":"yellow"},{"text":" or later for shulker previews to work!"}]
execute if score #version shulker_preview matches 1..2224 run scoreboard players set #setup shulker_preview -1
execute if score #version shulker_preview matches 2225.. if score #setup shulker_preview matches -1 run scoreboard players set #setup shulker_preview 0

scoreboard players add #setup shulker_preview 0
execute if score #setup shulker_preview matches 0 run tellraw @a {"translate":"%1$s","with":[{"text":"\nDon't forget to equip the resource pack!\n","color":"red"},""]}
Expand Down
Binary file modified 1.16/Shulker Preview Dark Theme (1.16).zip
Binary file not shown.
Binary file modified 1.16/Shulker Preview Data Pack (1.16).zip
Binary file not shown.
2 changes: 1 addition & 1 deletion 1.16/resourcepack_dark/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 5,
"pack_format": 6,
"description": "(apply this pack above the normal resource pack)"
}
}
Binary file modified 1.17/Shulker Preview Data Pack (1.17).zip
Binary file not shown.
Binary file modified 1.18/Shulker Preview Dark Theme (1.18).zip
Binary file not shown.
Binary file modified 1.18/Shulker Preview Data Pack (1.18).zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# check for sufficient Minecraft version
execute store result score #version shulker_preview run data get entity @a[limit=1] DataVersion
execute if score #version shulker_preview matches 1..2715 run tellraw @a [{"text":"\nOutdated Minecraft version!\nYou need to be on version ","color":"red"},{"text":"1.17-pre1","color":"yellow"},{"text":" or later for shulker previews to work!\n"},{"text":"Download for older versions here\n","color":"blue","underlined":true,"clickEvent":{"action":"open_url","value":"https://tryashtar.github.io/shulker-preview"}}]
execute if score #version shulker_preview matches 1..2715 run scoreboard players set #install shulker_preview -1
execute if score #version shulker_preview matches 2716.. if score #install shulker_preview matches -1 run scoreboard players set #install shulker_preview 0
execute if score #version shulker_preview matches 1..2839 run tellraw @a [{"text":"\nOutdated Minecraft version!\nYou need to be on version ","color":"red"},{"text":"21w42a","color":"yellow"},{"text":" or later for shulker previews to work!\n"},{"text":"Download for older versions here\n","color":"blue","underlined":true,"clickEvent":{"action":"open_url","value":"https://tryashtar.github.io/shulker-preview"}}]
execute if score #version shulker_preview matches 1..2839 run scoreboard players set #install shulker_preview -1
execute if score #version shulker_preview matches 2840.. if score #install shulker_preview matches -1 run scoreboard players set #install shulker_preview 0

# check for resource pack equipped/success message
scoreboard players add #install shulker_preview 0
Expand Down
2 changes: 1 addition & 1 deletion 1.18/resourcepack_dark/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 7,
"pack_format": 8,
"description": "(apply this pack above the normal resource pack)"
}
}
Binary file modified 1.19/Shulker Preview Dark Theme (1.19).zip
Binary file not shown.
Binary file modified 1.19/Shulker Preview Data Pack (1.19).zip
Binary file not shown.
Binary file modified 1.19/Shulker Preview Resource Pack (1.19).zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# check for sufficient Minecraft version
execute store result score #version shulker_preview run data get entity @a[limit=1] DataVersion
execute if score #version shulker_preview matches 1..2715 run tellraw @a [{"text":"\nOutdated Minecraft version!\nYou need to be on version ","color":"red"},{"text":"1.17-pre1","color":"yellow"},{"text":" or later for shulker previews to work!\n"},{"text":"Download for older versions here\n","color":"blue","underlined":true,"clickEvent":{"action":"open_url","value":"https://tryashtar.github.io/shulker-preview"}}]
execute if score #version shulker_preview matches 1..2715 run scoreboard players set #install shulker_preview -1
execute if score #version shulker_preview matches 2716.. if score #install shulker_preview matches -1 run scoreboard players set #install shulker_preview 0
execute if score #version shulker_preview matches 1..3104 run tellraw @a [{"text":"\nOutdated Minecraft version!\nYou need to be on version ","color":"red"},{"text":"1.19","color":"yellow"},{"text":" or later for shulker previews to work!\n"},{"text":"Download for older versions here\n","color":"blue","underlined":true,"clickEvent":{"action":"open_url","value":"https://tryashtar.github.io/shulker-preview"}}]
execute if score #version shulker_preview matches 1..3104 run scoreboard players set #install shulker_preview -1
execute if score #version shulker_preview matches 3105.. if score #install shulker_preview matches -1 run scoreboard players set #install shulker_preview 0

# check for resource pack equipped/success message
scoreboard players add #install shulker_preview 0
Expand Down
2 changes: 1 addition & 1 deletion 1.19/datapack/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 10,
"pack_format": 12,
"description": {
"text": "Shulker Box tooltip preview: data pack",
"color": "#8fdff7"
Expand Down
2 changes: 1 addition & 1 deletion 1.19/resourcepack/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 9,
"pack_format": 13,
"description": {
"text": "Shulker Box tooltip preview: resource pack",
"color": "#8fdff7"
Expand Down
2 changes: 1 addition & 1 deletion 1.19/resourcepack_dark/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 7,
"pack_format": 13,
"description": "(apply this pack above the normal resource pack)"
}
}

0 comments on commit 5f0a560

Please sign in to comment.