Skip to content

Commit

Permalink
Merge pull request #17 from Tschipcraft/dev
Browse files Browse the repository at this point in the history
v1.5.4
  • Loading branch information
Tschipcraft authored Dec 3, 2024
2 parents 0b67200 + cf59bd7 commit 50e6031
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 25 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/temp
/temp
/unused

# Package Files #
*.jar
*.zip
5 changes: 5 additions & 0 deletions .spyglassrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"env": {
"gameVersion": "1.21.4"
}
}
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- **Added support for Minecraft 1.21.3** 💰
- **Added support for Minecraft 1.21.4** 🪵
- Re-enabled upside down spiders for 1.21.4+ as [MC-128225](https://bugs.mojang.com/browse/MC-128225) was fixed
7 changes: 3 additions & 4 deletions data/more_mobs/function/install.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ function more_mobs:settings/defaults
advancement revoke @a only tschipcraft:menu

# Team
# Spiders hanging from ceilings is broken since Snapshot 23w40a, no need to initialize the team
#team add ts.mm.nonametag
#team modify ts.mm.nonametag nametagVisibility never
#team join ts.mm.nonametag @e[type=#more_mobs:spider,tag=ts.mm.s_onceiling]
team add ts.mm.nonametag
team modify ts.mm.nonametag nametagVisibility never
team join ts.mm.nonametag @e[type=#more_mobs:spider,tag=ts.mm.s_onceiling]

# Schedule
schedule function more_mobs:general/effect_loop_trigger 1s
6 changes: 3 additions & 3 deletions data/more_mobs/function/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## by Tschipcraft

## Mobs
## Variated Mobs
execute if score $global ts.mm.version matches 1933.. as @e[type=#more_mobs:parsable,tag=!ts.mm.parsed,tag=!ts.mm.exclude,tag=!smithed.entity,tag=!smithed.block,tag=!global.ignore,tag=!global.ignore.kill] at @s run function more_mobs:general/parse


## Upside Down Spiders
# Spiders hanging from ceilings is broken since Snapshot 23w40a, no need to check
#execute if score $global ts.mm.version matches 1933..3678 if score $upsided_s ts.mm.settings matches 1..2 as @e[type=#more_mobs:spider,tag=!ts.mm.exclude,tag=!smithed.entity,tag=!smithed.block,tag=!global.ignore,tag=!global.ignore.kill] at @s run function more_mobs:spider/main
# Disabled until 1.21.4-pre1, since it is impossible to delete an entities CustomName in these versions, see https://bugs.mojang.com/browse/MC-128225
execute if score $global ts.mm.version matches 4179.. if score $upsided_s ts.mm.settings matches 1..2 as @e[type=#more_mobs:spider,tag=!ts.mm.exclude,tag=!smithed.entity,tag=!smithed.block,tag=!global.ignore,tag=!global.ignore.kill] at @s run function more_mobs:spider/main
10 changes: 5 additions & 5 deletions data/more_mobs/function/settings/core.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ execute if score $val_loot ts.mm.settings matches 0 run tellraw @s ["",{"text":
execute if score $val_loot ts.mm.settings matches -1 run tellraw @s [{"text":" └Add additional valuable loot [off]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
execute if score $val_loot ts.mm.settings matches 2 run tellraw @s [{"text":" └Add additional valuable loot [on]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]

execute unless score $global ts.mm.version matches 3679.. if score $upsided_s ts.mm.settings matches 1 run tellraw @s ["",{"text":"Upside Down Spiders","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"If enabled, spiders will turn upside down when hanging on ceilings."}]}},{"text":" \u0020 "},{"text":"[on]","bold":true,"color":"green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/enable_spiders"}},{"text":" \u0020| \u0020"},{"text":"[off]","color":"dark_red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/disable_spiders"}}]
execute unless score $global ts.mm.version matches 3679.. if score $upsided_s ts.mm.settings matches 0 run tellraw @s ["",{"text":"Upside Down Spiders","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"If enabled, spiders will turn upside down when hanging on ceilings."}]}},{"text":" \u0020 "},{"text":"[on]","color":"dark_green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/enable_spiders"}},{"text":" \u0020| \u0020"},{"text":"[off]","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/disable_spiders"}}]
execute unless score $global ts.mm.version matches 3679.. if score $upsided_s ts.mm.settings matches -1 run tellraw @s [{"text":"Upside Down Spiders [off]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
execute unless score $global ts.mm.version matches 3679.. if score $upsided_s ts.mm.settings matches 2 run tellraw @s [{"text":"Upside Down Spiders [on]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
execute if score $global ts.mm.version matches 3679.. run tellraw @s {"text":"Upside Down Spiders [on] | [off]","color":"gray","bold":false,"hoverEvent":{"action":"show_text","value":[{"text":"This feature is not available in this version due to MC-128225 not having a workaround anymore."}]},"clickEvent":{"action":"open_url","value":"https://bugs.mojang.com/browse/MC-128225"}}
execute if score $global ts.mm.version matches 4179.. if score $upsided_s ts.mm.settings matches 1 run tellraw @s ["",{"text":"Upside Down Spiders","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"If enabled, spiders will turn upside down when hanging on ceilings."}]}},{"text":" \u0020 "},{"text":"[on]","bold":true,"color":"green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/enable_spiders"}},{"text":" \u0020| \u0020"},{"text":"[off]","color":"dark_red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/disable_spiders"}}]
execute if score $global ts.mm.version matches 4179.. if score $upsided_s ts.mm.settings matches 0 run tellraw @s ["",{"text":"Upside Down Spiders","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"If enabled, spiders will turn upside down when hanging on ceilings."}]}},{"text":" \u0020 "},{"text":"[on]","color":"dark_green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/enable_spiders"}},{"text":" \u0020| \u0020"},{"text":"[off]","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/disable_spiders"}}]
execute if score $global ts.mm.version matches 4179.. if score $upsided_s ts.mm.settings matches -1 run tellraw @s [{"text":"Upside Down Spiders [off]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
execute if score $global ts.mm.version matches 4179.. if score $upsided_s ts.mm.settings matches 2 run tellraw @s [{"text":"Upside Down Spiders [on]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
execute unless score $global ts.mm.version matches 4179.. run tellraw @s {"text":"Upside Down Spiders [on] | [off]","color":"gray","bold":false,"hoverEvent":{"action":"show_text","value":[{"text":"This feature is not available in this Minecraft version due to MC-128225."}]},"clickEvent":{"action":"open_url","value":"https://bugs.mojang.com/browse/MC-128225"}}

execute if score $global ts.mm.version matches 3330.. if score $mobs_burn ts.mm.settings matches 1 run tellraw @s ["",{"text":"Let mobs with custom heads burn in daylight","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"If enabled, undead mobs with custom heads will burn in the daylight."}]}},{"text":" \u0020 "},{"text":"[on]","bold":true,"color":"green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/enable_burning"}},{"text":" \u0020| \u0020"},{"text":"[off]","color":"dark_red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/disable_burning"}}]
execute if score $global ts.mm.version matches 3330.. if score $mobs_burn ts.mm.settings matches 0 run tellraw @s ["",{"text":"Let mobs with custom heads burn in daylight","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"If enabled, undead mobs with custom heads will burn in the daylight."}]}},{"text":" \u0020 "},{"text":"[on]","color":"dark_green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/enable_burning"}},{"text":" \u0020| \u0020"},{"text":"[off]","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/disable_burning"}}]
Expand Down
2 changes: 1 addition & 1 deletion data/more_mobs/function/settings/defaults.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##by Tschipcraft
# Set default settings upon world reload or data pack reset
# Sets default settings during installation or if entry is incorrect
# Called by install.mcfunction

execute unless score $enable_heads ts.mm.settings matches -1..2 run scoreboard players set $enable_heads ts.mm.settings 1
Expand Down
5 changes: 3 additions & 2 deletions data/more_mobs/function/spider/inair.mcfunction
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## by Tschipcraft

tag @s remove ts.mm.s_onceiling
# TODO: Replace with data remove in future versions when https://bugs.mojang.com/browse/MC-128225 is fixed
execute if score $global ts.mm.version matches ..3678 run data merge entity @s {CustomNameVisible:0b,CustomName:""}
# https://bugs.mojang.com/browse/MC-128225 got fixed in 1.21.4-pre1
execute if score $global ts.mm.version matches 4179.. run data remove entity @s CustomName
execute if score $global ts.mm.version matches 4179.. run data remove entity @s CustomNameVisible
team leave @s
2 changes: 1 addition & 1 deletion data/more_mobs/function/version_checker.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

scoreboard objectives add ts.mm.version dummy
execute store result score $global ts.mm.version run data get entity @r DataVersion
execute unless score $global tvc_ignore matches 1 if score $global ts.mm.version matches 4100.. run tellraw @a [{"text":"[More Mobs] ","color":"gray"},{"text":"?","bold":true,"color":"gold"},{"text":" Future unknown Minecraft version above 1.21.3 detected! This data pack/mod may not work correctly anymore! Please make sure to check for updates in the menu! (","color":"gold"},{"text":"/trigger tschipcraft.menu","underlined":true,"color":"gold","clickEvent":{"action":"run_command","value":"/trigger tschipcraft.menu"},"hoverEvent":{"action":"show_text","contents":"Click here"}},{"text":")","color":"gold"}]
execute unless score $global tvc_ignore matches 1 if score $global ts.mm.version matches 4200.. run tellraw @a [{"text":"[More Mobs] ","color":"gray"},{"text":"?","bold":true,"color":"gold"},{"text":" Future unknown Minecraft version above 1.21.4 detected! This data pack/mod may not work correctly anymore! Please make sure to check for updates in the menu! (","color":"gold"},{"text":"/trigger tschipcraft.menu","underlined":true,"color":"gold","clickEvent":{"action":"run_command","value":"/trigger tschipcraft.menu"},"hoverEvent":{"action":"show_text","contents":"Click here"}},{"text":")","color":"gold"}]
# Note: 1.14x-1.20x uses the old folder names (function -> functions)

execute unless score $global ts.mm.version matches 1.. run function more_mobs:version_checker/try_again
7 changes: 4 additions & 3 deletions data/more_mobs/functions/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
## by Tschipcraft

## Mobs
## Variated Mobs
execute if score $global ts.mm.version matches 1933.. as @e[type=#more_mobs:parsable,tag=!ts.mm.parsed,tag=!ts.mm.exclude,tag=!smithed.entity,tag=!smithed.block,tag=!global.ignore,tag=!global.ignore.kill] at @s run function more_mobs:general/parse

## Extension for 1.16 and above
execute if score $global ts.mm.version matches 1933.. run function more_mobs:general/main_extension_116


## Upside Down Spiders
# Spider
# Disabled for 23w40a (1.20.3) until 1.21.4-pre1, since it is impossible to delete/reset an entities CustomName in these versions, see https://bugs.mojang.com/browse/MC-267259
execute if score $global ts.mm.version matches 1933..3678 if score $upsided_s ts.mm.settings matches 1..2 as @e[type=#more_mobs:spider,tag=!ts.mm.exclude,tag=!smithed.entity,tag=!smithed.block,tag=!global.ignore,tag=!global.ignore.kill] at @s run function more_mobs:spider/main


## Parse items (until 24w09a since custom names are stored in block entities now)
## Parse items
# Only necessary until 24w09a since custom names are stored in block entities now
execute if score $global ts.mm.version matches ..3818 as @e[type=minecraft:item,tag=!ts.mm.parsed_item,tag=!smithed.entity,tag=!smithed.block,tag=!global.ignore] run function more_mobs:general/parse_head_items/check


Expand Down
2 changes: 1 addition & 1 deletion data/more_mobs/functions/settings/core.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ execute unless score $global ts.mm.version matches 3679.. if score $upsided_s ts
execute unless score $global ts.mm.version matches 3679.. if score $upsided_s ts.mm.settings matches 0 run tellraw @s ["",{"text":"Upside Down Spiders","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"If enabled, spiders will turn upside down when hanging on ceilings."}]}},{"text":" \u0020 "},{"text":"[on]","color":"dark_green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/enable_spiders"}},{"text":" \u0020| \u0020"},{"text":"[off]","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/disable_spiders"}}]
execute unless score $global ts.mm.version matches 3679.. if score $upsided_s ts.mm.settings matches -1 run tellraw @s [{"text":"Upside Down Spiders [off]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
execute unless score $global ts.mm.version matches 3679.. if score $upsided_s ts.mm.settings matches 2 run tellraw @s [{"text":"Upside Down Spiders [on]","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
execute if score $global ts.mm.version matches 3679.. run tellraw @s {"text":"Upside Down Spiders [on] | [off]","color":"gray","bold":false,"hoverEvent":{"action":"show_text","value":[{"text":"This feature is not available in this version due to MC-128225 not having a workaround anymore."}]},"clickEvent":{"action":"open_url","value":"https://bugs.mojang.com/browse/MC-128225"}}
execute if score $global ts.mm.version matches 3679.. run tellraw @s {"text":"Upside Down Spiders [on] | [off]","color":"gray","bold":false,"hoverEvent":{"action":"show_text","value":[{"text":"This feature is not available in this Minecraft version due to MC-128225 not having a workaround anymore."}]},"clickEvent":{"action":"open_url","value":"https://bugs.mojang.com/browse/MC-128225"}}

execute if score $global ts.mm.version matches 3330.. if score $mobs_burn ts.mm.settings matches 1 run tellraw @s ["",{"text":"Let mobs with custom heads burn in daylight","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"If enabled, undead mobs with custom heads will burn in the daylight."}]}},{"text":" \u0020 "},{"text":"[on]","bold":true,"color":"green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/enable_burning"}},{"text":" \u0020| \u0020"},{"text":"[off]","color":"dark_red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/disable_burning"}}]
execute if score $global ts.mm.version matches 3330.. if score $mobs_burn ts.mm.settings matches 0 run tellraw @s ["",{"text":"Let mobs with custom heads burn in daylight","bold":true,"hoverEvent":{"action":"show_text","contents":[{"text":"If enabled, undead mobs with custom heads will burn in the daylight."}]}},{"text":" \u0020 "},{"text":"[on]","color":"dark_green","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/enable_burning"}},{"text":" \u0020| \u0020"},{"text":"[off]","bold":true,"color":"red","clickEvent":{"action":"run_command","value":"/function more_mobs:settings/disable_burning"}}]
Expand Down
2 changes: 1 addition & 1 deletion data/more_mobs/functions/settings/defaults.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##by Tschipcraft
# Set default settings upon world reload or data pack reset
# Sets default settings during installation or if entry is incorrect
# Called by install.mcfunction

execute unless score $enable_heads ts.mm.settings matches -1..2 run scoreboard players set $enable_heads ts.mm.settings 1
Expand Down
1 change: 0 additions & 1 deletion data/more_mobs/functions/spider/inair.mcfunction
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## by Tschipcraft

tag @s remove ts.mm.s_onceiling
# TODO: Replace with data remove in future versions when https://bugs.mojang.com/browse/MC-128225 is fixed
execute if score $global ts.mm.version matches ..3678 run data merge entity @s {CustomNameVisible:0b,CustomName:""}
team leave @s
2 changes: 1 addition & 1 deletion pack.mcmeta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "moremobs",
"pack": {
"pack_format": 15,
"supported_formats": [4,57],
"supported_formats": [4,61],
"description": "Tschipcraft's More Mobs \n└ v${version} ● mc${mc_version}"
},
"overlays": {
Expand Down

0 comments on commit 50e6031

Please sign in to comment.