Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions gm4_monsters_unbound/beet.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: gm4_monsters_unbound
name: Monsters Unbound
version: 1.0.X
version: 1.1.X

data_pack:
load: .
Expand All @@ -19,13 +19,14 @@ meta:
required:
lib_forceload: 1.3.0
lib_lore: 1.1.0
gm4_survival_refightalized: 1.0.0
schedule_loops:
- tick
- main
- slow_clock
website:
description: Mobs gain special effects based on their biome.
recommended:
- gm4_survival_refightalized
video: null
wiki: https://wiki.gm4.co/wiki/Monsters_Unbound
credits:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"frame": "task"
},
"parent": "gm4:survival_refightalized_armor_damage",
"parent": "gm4:root",
"criteria": {
"kill_elite": {
"trigger": "minecraft:player_killed_entity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
# schedule from mob/process/elite/zephyr/skeleton/start

scoreboard players set $keep_tick.elite_process_zephyr gm4_mu_keep_tick 0
execute as @e[type=#gm4_survival_refightalized:skeleton_types,tag=gm4_mu_elite.zephyr_skeleton_burst] at @s run function gm4_monsters_unbound:mob/process/elite/zephyr/skeleton/arrow_burst
execute as @e[type=#gm4_monsters_unbound:skeleton_types,tag=gm4_mu_elite.zephyr_skeleton_burst] at @s run function gm4_monsters_unbound:mob/process/elite/zephyr/skeleton/arrow_burst

execute if score $keep_tick.elite_process_zephyr gm4_mu_keep_tick matches 1 run schedule function gm4_monsters_unbound:clocks/elite/zephyr_process 3t
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 46
summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 46
summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 96
summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 96
summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 1
summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 1
summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 16
summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 16
summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 86
summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 86
summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 66
summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 66
summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 76
summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 76
summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 56
summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 56
summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 31
summon skeleton ~ ~ ~ {Tags:["gm4_mu_elite","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

scoreboard players set $prepicked_elite gm4_mu_data 31
summon zombie ~ ~ ~ {Tags:["gm4_sr_was_baby","gm4_mu_debug_mob"]}
execute as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute if score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_survival_refightalized:mob/init/calc_difficulty_overworld
execute unless score gm4_survival_refightalized load.status matches 1.. as @n[tag=gm4_mu_debug_mob] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,24 @@ scoreboard objectives add gm4_mu_generation dummy
scoreboard objectives add gm4_mu_frozen_time dummy
scoreboard objectives add gm4_mu_feared_time dummy
scoreboard objectives add gm4_mu_keep_tick dummy
scoreboard objectives add gm4_mu_config dummy
# add sr_data for compatibility
scoreboard objectives add gm4_sr_data dummy

# configs
execute unless score $spawn_phantoms gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $spawn_phantoms gm4_sr_config 1
execute unless score $spawn_phantoms gm4_mu_config matches -2147483648..2147483647 run scoreboard players set $spawn_phantoms gm4_mu_config 1

# disable natural phantom spawning
execute unless score $phantoms_disabled gm4_mu_data matches 1 run gamerule doInsomnia false
execute unless score $phantoms_disabled gm4_mu_data matches 1 run data modify storage gm4:log queue append value {type:"text",message:{"text":"[INFO] Monsters Unbound changed gamerule doInsomnia to false"}}
scoreboard players set $phantoms_disabled gm4_mu_data 1
execute store result score $doinsomnia gm4_mu_data run gamerule doInsomnia
execute if score $spawn_phantoms gm4_sr_config matches 1 if score $doinsomnia gm4_mu_data matches 1 run data modify storage gm4:log queue append value {type:"text",message:[{"text":"[WARN]","color":"red"},{"text":" Monsters Unbound requires doInsomnia to be false, but it is true. ","color":"white"},{"text":"click here to fix","color":"red","clickEvent":{"action":"suggest_command","value":"/gamerule doInsomnia false"}}]}
execute if score $spawn_phantoms gm4_mu_config matches 1 if score $doinsomnia gm4_mu_data matches 1 run data modify storage gm4:log queue append value {type:"text",message:[{"text":"[WARN]","color":"red"},{"text":" Monsters Unbound requires doInsomnia to be false, but it is true. ","color":"white"},{"text":"click here to fix","color":"red","clickEvent":{"action":"suggest_command","value":"/gamerule doInsomnia false"}}]}

# mob caps
execute unless score $mob_limit.husk_army gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.husk_army gm4_sr_config 128
execute unless score $mob_limit.spore_zombie gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.spore_zombie gm4_sr_config 128
execute unless score $mob_limit.phantom gm4_sr_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.phantom gm4_sr_config 48
execute unless score $mob_limit.husk_army gm4_mu_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.husk_army gm4_mu_config 128
execute unless score $mob_limit.spore_zombie gm4_mu_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.spore_zombie gm4_mu_config 128
execute unless score $mob_limit.phantom gm4_mu_config matches -2147483648..2147483647 run scoreboard players set $mob_limit.phantom gm4_mu_config 48

# elite teams
team add gm4_mu_elite.glacial
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
schedule function gm4_monsters_unbound:main 16t

# modify mobs
# if survival_refightalized is installed the modification is instead started from there
execute unless score gm4_survival_refightalized load.status matches 1.. as @e[type=#gm4_monsters_unbound:modify,tag=!smithed.entity,tag=!gm4_mu_processed,nbt=!{PersistenceRequired:1b}] at @s run function gm4_monsters_unbound:mob/init/check_mob

# process cloaked creepers
execute as @e[type=creeper,tag=gm4_mu_cloaked_creeper] at @s if entity @a[gamemode=!spectator,gamemode=!creative,distance=..3.1] run function gm4_monsters_unbound:mob/process/cloaked_creeper

# zombie spores
execute as @e[type=item,tag=gm4_mu_spore] at @s run function gm4_monsters_unbound:mob/process/spore/advance
execute as @e[type=#gm4_survival_refightalized:zombie_types,tag=gm4_mu_spore_zombie,predicate=gm4_monsters_unbound:technical/on_fire] run function gm4_monsters_unbound:mob/process/spore/burn_on_head
execute as @e[type=#gm4_monsters_unbound:zombie_types,tag=gm4_mu_spore_zombie,predicate=gm4_monsters_unbound:technical/on_fire] run function gm4_monsters_unbound:mob/process/spore/burn_on_head

# traps
execute as @e[type=marker,tag=gm4_mu_snowy_trap] at @s if entity @a[gamemode=!spectator,gamemode=!creative,distance=..7] run function gm4_monsters_unbound:mob/process/reveal_snowy_trap
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# initiate newly spawned mobs (mobs without any tags)
# @s = mobs that can be buffed
# at @s
# run from main

# /!\ This function only runs if Survival Refightalized is not installed

# pre-mark mob as processed if it spawned in the air (from a spawner), these do not get modified
# mobs in the modify_in_air list are ignored here
execute if block ~ ~-0.01 ~ #gm4:no_collision run tag @s[type=!#gm4_monsters_unbound:modify_in_air] add gm4_mu_processed

# if the mob is riding another mob *do* modify them
scoreboard players set $mounted gm4_mu_data 0
execute if entity @s[tag=gm4_mu_processed] on vehicle run scoreboard players set $mounted gm4_mu_data 1
execute if score $mounted gm4_mu_data matches 1 run tag @s remove gm4_mu_processed

execute unless entity @s[tag=gm4_mu_processed] run function gm4_monsters_unbound:mob/init/initialize
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ attribute @s minecraft:attack_damage modifier add gm4_monsters_unbound:elite_buf
attribute @s minecraft:movement_speed modifier add gm4_monsters_unbound:elite_buff.fire -0.45 add_multiplied_total
attribute @s minecraft:burning_time modifier add gm4_monsters_unbound:elite_buff.fire -1 add_multiplied_total

enchant @s[type=#gm4_survival_refightalized:skeleton_types] flame
scoreboard players set @s[type=#gm4_survival_refightalized:skeleton_types] gm4_sr_arrow.damage_change -18
scoreboard players add @s[type=#gm4_survival_refightalized:skeleton_types] gm4_sr_arrow.fire_delay 2
item replace entity @s[type=!#gm4_survival_refightalized:skeleton_types] weapon.mainhand with blaze_rod[enchantments={fire_aspect:2}]
enchant @s[type=#gm4_monsters_unbound:skeleton_types] flame
scoreboard players set @s[type=#gm4_monsters_unbound:skeleton_types] gm4_sr_arrow.damage_change -18
scoreboard players add @s[type=#gm4_monsters_unbound:skeleton_types] gm4_sr_arrow.fire_delay 2
item replace entity @s[type=!#gm4_monsters_unbound:skeleton_types] weapon.mainhand with blaze_rod[enchantments={fire_aspect:2}]
data modify entity @s drop_chances.mainhand set value 0

item replace entity @s armor.head with magma_block[enchantments={binding_curse:1},enchantment_glint_override=false]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ attribute @s minecraft:attack_knockback modifier add gm4_monsters_unbound:elite_
attribute @s minecraft:water_movement_efficiency modifier add gm4_monsters_unbound:elite_buff.giant 0.85 add_value
attribute @s minecraft:movement_speed modifier add gm4_monsters_unbound:elite_buff.giant -0.35 add_multiplied_total

attribute @s[type=#gm4_survival_refightalized:skeleton_types] minecraft:scale modifier add gm4_monsters_unbound:elite_buff.giant_size 0.507537 add_multiplied_total
attribute @s[type=!#gm4_survival_refightalized:skeleton_types] minecraft:scale modifier add gm4_monsters_unbound:elite_buff.giant_size 0.538461 add_multiplied_total
attribute @s[type=#gm4_monsters_unbound:skeleton_types] minecraft:scale modifier add gm4_monsters_unbound:elite_buff.giant_size 0.507537 add_multiplied_total
attribute @s[type=!#gm4_monsters_unbound:skeleton_types] minecraft:scale modifier add gm4_monsters_unbound:elite_buff.giant_size 0.538461 add_multiplied_total

enchant @s[type=#gm4_survival_refightalized:skeleton_types] punch 2
enchant @s[type=#gm4_survival_refightalized:skeleton_types] power 1
enchant @s[type=#gm4_monsters_unbound:skeleton_types] punch 2
enchant @s[type=#gm4_monsters_unbound:skeleton_types] power 1

scoreboard players set @s[type=#gm4_survival_refightalized:skeleton_types] gm4_sr_arrow.fire_delay 7
scoreboard players set @s[type=#gm4_monsters_unbound:skeleton_types] gm4_sr_arrow.fire_delay 7

item replace entity @s armor.head with cobblestone[enchantment_glint_override=false,minecraft:enchantments={projectile_protection:5,binding_curse:1}] 1
data modify entity @s drop_chances.head set value 0
Expand Down
Loading
Loading