Skip to content

Orb of Ankou 1.21.5 #1128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: update-1.21.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions gm4/contributors.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,9 @@
{
"name": "Venomousbirds",
"links": ["https://venomousbirds.artstation.com/"]
},
{
"name": "MulverineX",
"links": ["https://modrinth.com/user/MulverineX"]
}
]
49 changes: 49 additions & 0 deletions gm4/plugins/refactor_external.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from beet import Context, ListOption
from beet.contrib.rename_files import rename_files
from beet.contrib.find_replace import find_replace


def beet_default(ctx: Context):
"""
Refactors an external library to use GM4 prefixing.
Deletes `#minecraft:load` and `#minecraft:tick` function tags
from external library to allow for proper lantern load versioning.
"""

try:
if "prefix" in ctx.meta["gm4"]["refactor_external"]:
to_prefix: ListOption[str] = ListOption(
__root__=ctx.meta["gm4"]["refactor_external"]["prefix"]
)
for namespace in to_prefix.entries():
prefixed_namespace = f"gm4_{namespace}"
ctx.require(
rename_files(
data_pack={
"match": "*",
"find": f"^{namespace}:([a-z_/]+)",
"replace": f"{prefixed_namespace}:\\1",
}
)
)
ctx.require(
find_replace(
data_pack={"match": "*"},
substitute={
"find": f"\\b{namespace}",
"replace": f"{prefixed_namespace}",
},
)
)
except KeyError:
pass

try:
del ctx.data.function_tags["minecraft:load"]
except KeyError:
pass

try:
del ctx.data.function_tags["minecraft:tick"]
except KeyError:
pass
2 changes: 2 additions & 0 deletions gm4_orb_of_ankou/beet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ pipeline:
- gm4_metallurgy.shamir_model_template
- gm4.plugins.extend.module
- gm4.plugins.include.lib_custom_crafters
- gm4.plugins.include.lib_player_motion

meta:
gm4:
versioning:
required:
gm4_metallurgy: 1.5.0
lib_custom_crafters: 3.4.0
lib_player_motion: 1.4.2
schedule_loops:
- main
- tick
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,7 @@
"criteria": {
"crossbow_shot": {
"trigger": "minecraft:shot_crossbow",
"conditions": {
"item": {
"components": {
"minecraft:charged_projectiles": [
{
"id": "minecraft:arrow"
}
]
}
}
}
"conditions": {}
}
},
"rewards": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ scoreboard objectives add gm4_oa_snk_num dummy
scoreboard objectives add gm4_oa_marker dummy
scoreboard objectives add gm4_oa_feign_t dummy
scoreboard objectives add gm4_oa_sniff dummy
scoreboard objectives add gm4_oa_jump_stop dummy
scoreboard objectives add gm4_health health
scoreboard objectives add gm4_oa_sneak minecraft.custom:minecraft.sneak_time
scoreboard objectives add gm4_oa_swim minecraft.custom:minecraft.swim_one_cm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ effect give @a[gamemode=!spectator,tag=gm4_pneuma_gliding,scores={gm4_oa_swim=1.
scoreboard players reset @a gm4_oa_swim

# soaring
tag @a[tag=gm4_oa_soaring_off_ground,nbt={OnGround:1b}] remove gm4_oa_soaring_off_ground
effect give @a[gamemode=!spectator,tag=gm4_oa_soaring_off_ground] jump_boost 2 255 true
execute as @a[tag=gm4_oa_soaring_off_ground,nbt={OnGround:1b}] run function gm4_orb_of_ankou:pneumas/soaring/remove_fall_protection

# sniffing
scoreboard players remove @a[scores={gm4_oa_sniff=1..}] gm4_oa_sniff 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ execute at @s[tag=gm4_pneuma_synergetic] run function gm4_orb_of_ankou:pneumas/s
# soaring
execute at @s[tag=gm4_oa_soaring_active] run function gm4_orb_of_ankou:pneumas/soaring/apply

# disable jump revert
scoreboard players remove @a[scores={gm4_oa_jump_stop=1..}] gm4_oa_jump_stop 1
execute as @a[scores={gm4_oa_jump_stop=1}] run attribute @s minecraft:jump_strength modifier remove gm4_orb_of_ankou:prevent_jump
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ effect give @s[tag=gm4_pneuma_aggressive] strength 3 1 true
execute if entity @s[tag=gm4_pneuma_volatile] run function gm4_orb_of_ankou:pneumas/volatile

execute if entity @s[tag=gm4_pneuma_feigning,scores={gm4_health=..10}] run function gm4_orb_of_ankou:pneumas/feigning/apply

execute if entity @s[tag=gm4_oa_soaring_off_ground] run function gm4_orb_of_ankou:pneumas/soaring/damaged
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# run from advancement "trigers/shoot_crossbow"

advancement revoke @s only gm4_orb_of_ankou:triggers/shoot_crossbow
execute if entity @s[tag=gm4_pneuma_blasting,nbt={Inventory:[{id:"minecraft:blaze_powder"}]}] run function gm4_orb_of_ankou:pneumas/blasting
execute if entity @s[tag=gm4_pneuma_blasting,nbt={Inventory:[{id:"minecraft:blaze_powder"}]}] if entity @e[type=minecraft:arrow,limit=1,distance=..2] run function gm4_orb_of_ankou:pneumas/blasting

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# run from advancement_triggers/shoot_crossbow

# summon fireball at player's location
summon minecraft:small_fireball ~ ~1 ~ {Tags:["gm4_oa_fireball"],power:[0.0,0.0,0.0],Motion:[0.0,0.0,0.0]}
summon minecraft:small_fireball ~ ~1 ~ {Tags:["gm4_oa_fireball"],Motion:[0.0,0.0,0.0]}

# copy motion of arrow to fireball
data modify entity @e[type=small_fireball,tag=gm4_oa_fireball,distance=..2,limit=1] power set from entity @e[type=minecraft:arrow,limit=1,distance=..2] Motion
data modify entity @e[type=small_fireball,tag=gm4_oa_fireball,distance=..2,limit=1] Motion set from entity @e[type=minecraft:arrow,limit=1,distance=..2] Motion
kill @e[type=arrow,distance=..2,limit=1]

# clear blaze powder from player
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# @s = player with dashing pneuma who stopped sneaking
# run from pneumas/sneak/stopped

execute rotated ~ 0 if block ^ ^0.9 ^.1 #gm4:no_collision if block ^ ^0.5 ^1.1 #gm4:no_collision run summon armor_stand ^ ^0.5 ^1 {Invisible:1b,Small:1b,Invulnerable:1b,CustomName:"Dashing Stand",Tags:["gm4_oa_dasher","gm4_oa_new_dasher","smithed.entity","smithed.strict"],attributes:[{id:"minecraft:max_health",base:1.0}]}
execute rotated ~ 0 if block ^ ^0.9 ^.1 #gm4:no_collision if block ^ ^0.5 ^1.1 #gm4:no_collision run summon marker ^ ^0.5 ^1 {CustomName:"Dashing Vector",Tags:["gm4_oa_dash_vector"]}
scoreboard players operation $current gm4_oa_id = @s gm4_oa_id

# store player pos
data modify storage gm4_oa_dashing:temp Pos set from entity @s Pos
execute store result score $target_x gm4_pneuma_data run data get storage gm4_oa_dashing:temp Pos[0] 100
execute store result score $target_z gm4_pneuma_data run data get storage gm4_oa_dashing:temp Pos[2] 100
execute store result score $target_x gm4_pneuma_data run data get storage gm4_oa_dashing:temp Pos[0] 1000
execute store result score $target_z gm4_pneuma_data run data get storage gm4_oa_dashing:temp Pos[2] 1000

# store sneak count
execute if score @s gm4_oa_snk_num matches 10..19 run scoreboard players set $multiplier gm4_pneuma_data 1
execute if score @s gm4_oa_snk_num matches 20..39 run scoreboard players set $multiplier gm4_pneuma_data 2
execute if score @s gm4_oa_snk_num matches 40..59 run scoreboard players set $multiplier gm4_pneuma_data 3
execute if score @s gm4_oa_snk_num matches 60.. run scoreboard players set $multiplier gm4_pneuma_data 4
execute if score @s gm4_oa_snk_num matches 10..19 run scoreboard players set $multiplier gm4_pneuma_data 8
execute if score @s gm4_oa_snk_num matches 20..39 run scoreboard players set $multiplier gm4_pneuma_data 14
execute if score @s gm4_oa_snk_num matches 40..59 run scoreboard players set $multiplier gm4_pneuma_data 18
execute if score @s gm4_oa_snk_num matches 60.. run scoreboard players set $multiplier gm4_pneuma_data 24

# give armor stand motion
ride @s mount @e[type=armor_stand,tag=gm4_oa_new_dasher,distance=..3,limit=1]
execute as @e[type=armor_stand,tag=gm4_oa_new_dasher,distance=..3,limit=1] at @s run function gm4_orb_of_ankou:pneumas/dashing/set_motion
tag @e[type=armor_stand,tag=gm4_oa_new_dasher,distance=..3,limit=1] remove gm4_oa_new_dasher
playsound minecraft:entity.player.small_fall player @a[distance=..8] ~ ~ ~ 0.7 0.6
# set motion
tag @s add gm4_oa_dasher
execute as @e[type=marker,tag=gm4_oa_dash_vector,distance=..3,limit=1] run function gm4_orb_of_ankou:pneumas/dashing/set_motion
tag @s remove gm4_oa_dasher

# keep player on dash trajectory
schedule function gm4_orb_of_ankou:pneumas/dashing/temp_tick 1t
playsound minecraft:entity.player.small_fall player @a[distance=..8] ~ ~ ~ 0.7 0.6
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@


# link armor stand to player
scoreboard players operation @s gm4_oa_id = $current gm4_oa_id
# @s = dash marker
# located at player who started dashing
# run from pneumas/dashing/prepare

# get vector
data modify storage gm4_oa_dashing:temp Pos set from entity @s Pos
execute store result score $motion_x gm4_pneuma_data run data get storage gm4_oa_dashing:temp Pos[0] 100
execute store result score $motion_z gm4_pneuma_data run data get storage gm4_oa_dashing:temp Pos[2] 100
execute store result score $motion_x gm4_pneuma_data run data get storage gm4_oa_dashing:temp Pos[0] 1000
execute store result score $motion_z gm4_pneuma_data run data get storage gm4_oa_dashing:temp Pos[2] 1000

scoreboard players operation $motion_x gm4_pneuma_data -= $target_x gm4_pneuma_data
scoreboard players operation $motion_z gm4_pneuma_data -= $target_z gm4_pneuma_data
Expand All @@ -16,9 +15,11 @@ scoreboard players operation $motion_x gm4_pneuma_data *= $multiplier gm4_pneuma
scoreboard players operation $motion_z gm4_pneuma_data *= $multiplier gm4_pneuma_data

# set motion
execute store result entity @s Motion[0] double 0.0045 run scoreboard players get $motion_x gm4_pneuma_data
execute store result entity @s Motion[2] double 0.0045 run scoreboard players get $motion_z gm4_pneuma_data
data modify entity @s Motion[1] set value 0.4d
scoreboard players operation $x gm4_player_motion.api.launch = $motion_x gm4_pneuma_data
scoreboard players set $y gm4_player_motion.api.launch 5200
scoreboard players operation $z gm4_player_motion.api.launch = $motion_z gm4_pneuma_data
execute as @a[tag=gm4_oa_dasher,limit=1] run function #gm4_player_motion:launch_xyz

## clean up
data remove storage gm4_oa_dashing:temp Pos
kill @s

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ effect give @s invisibility 10 255 true
effect give @s resistance 10 255 true
effect give @s slowness 10 255 true
effect give @s weakness 10 255 true
effect give @s jump_boost 10 128 true
effect give @s regeneration 10 0 false
attribute @s minecraft:jump_strength modifier add gm4_orb_of_ankou:prevent_jump -1024 add_multiplied_total
scoreboard players set @s gm4_oa_jump_stop 13

# set data of hostile mobs
tag @e[type=#gm4_orb_of_ankou:feigning_affected,distance=..50] add gm4_oa_feigning
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# @s = player with soaring pneuma
# @s = player with soaring pneuma activated
# run from main

execute if entity @s[x_rotation=-79.99..79.99] run function gm4_orb_of_ankou:pneumas/soaring/idle
execute if entity @s[tag=!gm4_oa_soaring_idle,x_rotation=-79.99..79.99] run function gm4_orb_of_ankou:pneumas/soaring/idle

execute if entity @s[x_rotation=-90..-80] run function gm4_orb_of_ankou:pneumas/soaring/ascend

execute if entity @s[x_rotation=80..90] run effect clear @s levitation
execute if entity @s[x_rotation=80..90] run function gm4_orb_of_ankou:pneumas/soaring/descend

effect give @s slow_falling 3 0 true
tag @s add gm4_oa_soaring_off_ground
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# @s = player with soaring pneuma looking up
# run from pneumas/soaring/apply

effect clear @s levitation
tag @s remove gm4_oa_soaring_idle
effect give @s levitation 2 3 true

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @s = player with soaring pneuma looking down
# run from pneumas/soaring/apply

tag @s remove gm4_oa_soaring_idle
attribute @s minecraft:gravity modifier remove gm4_orb_of_ankou:soaring_gravity
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
# run from pneumas/soaring/apply

effect clear @s levitation
effect give @s levitation 3 255 true
tp @s
attribute @s minecraft:gravity modifier add gm4_orb_of_ankou:soaring_gravity -0.08 add_value
tag @s add gm4_oa_soaring_idle
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @s = player that was previously soaring, and has landed
# run from main

tag @s remove gm4_oa_soaring_off_ground
attribute @s minecraft:fall_damage_multiplier modifier remove gm4_orb_of_ankou:soaring_fall_protection
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tag @s[tag=!gm4_oa_no_soaring] add gm4_oa_soaring_active
tag @s remove gm4_oa_no_soaring
playsound minecraft:entity.ender_dragon.flap player @s[tag=gm4_oa_soaring_active] ~ ~ ~ 0.4 1.6
playsound minecraft:entity.player.small_fall player @s[tag=!gm4_oa_soaring_active] ~ ~ ~ 0.4 1.6
effect clear @s[tag=!gm4_oa_soaring_active] levitation
attribute @s[tag=gm4_oa_soaring_active] minecraft:fall_damage_multiplier modifier add gm4_orb_of_ankou:soaring_fall_protection -1024 add_value
attribute @s[tag=!gm4_oa_soaring_active] minecraft:gravity modifier remove gm4_orb_of_ankou:soaring_gravity

tag @s add gm4_oa_soaring_toggled

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
summon minecraft:zombie ~ ~0.2 ~ {Fire:1000000,Motion:[0.0,0.6,0.0],Silent:1b,CustomNameVisible:0b,DeathLootTable:"gm4:empty",Health:10.0f,IsBaby:1b,CanBreakDoors:0b,CanPickUpLoot:0b,Tags:["gm4_oa_unset","gm4_oa_ignore","gm4_oa_fire_sprite"],CustomName:{"translate":"entity.gm4.fire_sprite","fallback":"Fire Sprite§"},Team:"gm4_hide_name",equipment:{head:{id:"minecraft:golden_helmet",count:1,components:{"minecraft:custom_model_data":"entity/fire_sprite","minecraft:enchantment_glint_override":true}}},drop_chances:{head:0F},active_effects:[{id:"minecraft:invisibility",amplifier:0b,duration:1000000,show_particles:0b}],attributes:[{id:"minecraft:follow_range",base:8},{id:"minecraft:attack_damage",base:1},{id:"minecraft:attack_knockback",base:0},{id:"minecraft:spawn_reinforcements",base:0}]}

# randomize motion in x and z
execute as @e[type=zombie,tag=gm4_oa_unset,limit=1] run function gm4_orb_of_ankou:soul_forge/entities/randomize_motion
execute as @e[type=zombie,tag=gm4_oa_unset,limit=1] run function gm4_orb_of_ankou:soul_forge/entities/set_data/randomize_motion

# visuals
playsound minecraft:entity.blaze.hurt hostile @a[distance=..12] ~ ~ ~ 0.6 1.2

This file was deleted.

This file was deleted.

Loading
Loading