From 3a62e6d095cbb182b793177c9fae1a1d7c16c8a8 Mon Sep 17 00:00:00 2001 From: UndeadMaelys Date: Sat, 20 Feb 2021 12:10:44 +0100 Subject: [PATCH] uploading --- README.md | 28 +++++++++++ data/minecraft/tags/functions/tick.json | 5 ++ .../functions/assigner/player.mcfunction | 4 ++ .../functions/assigners.mcfunction | 4 ++ data/undeadm-core/functions/init.mcfunction | 47 +++++++++++++++++++ .../functions/player_assign.mcfunction | 4 ++ .../functions/scoreboards.mcfunction | 18 +++++++ data/undeadm-core/functions/tick.mcfunction | 17 +++++++ .../tags/blocks/no_collision.json | 30 ++++++++++++ .../tags/entity_types/undead.json | 17 +++++++ .../entity/die/magic_missile.mcfunction | 14 ++++++ .../entity/spawn/fire_blast.mcfunction | 19 ++++++++ .../entity/spawn/fire_blast_death.mcfunction | 10 ++++ .../entity/spawn/magic_missile.mcfunction | 22 +++++++++ .../entity/tick/fire_blast.mcfunction | 43 +++++++++++++++++ .../entity/tick/magic_missile.mcfunction | 47 +++++++++++++++++++ .../functions/fire_blast_figure.mcfunction | 6 +++ .../give/netherite_dagger.mcfunction | 1 + .../functions/give/netherite_sword.mcfunction | 1 + .../give/staff_magic_missile.mcfunction | 1 + data/undeadm-m1/functions/hsec.mcfunction | 2 + data/undeadm-m1/functions/init.mcfunction | 5 ++ data/undeadm-m1/functions/tick.mcfunction | 19 ++++++++ .../functions/use/staff_fire_blast.mcfunction | 9 ++++ .../use/staff_magic_missile.mcfunction | 10 ++++ pack.mcmeta | 9 ++++ 26 files changed, 392 insertions(+) create mode 100644 README.md create mode 100644 data/minecraft/tags/functions/tick.json create mode 100644 data/undeadm-core/functions/assigner/player.mcfunction create mode 100644 data/undeadm-core/functions/assigners.mcfunction create mode 100644 data/undeadm-core/functions/init.mcfunction create mode 100644 data/undeadm-core/functions/player_assign.mcfunction create mode 100644 data/undeadm-core/functions/scoreboards.mcfunction create mode 100644 data/undeadm-core/functions/tick.mcfunction create mode 100644 data/undeadm-core/tags/blocks/no_collision.json create mode 100644 data/undeadm-core/tags/entity_types/undead.json create mode 100644 data/undeadm-m1/functions/entity/die/magic_missile.mcfunction create mode 100644 data/undeadm-m1/functions/entity/spawn/fire_blast.mcfunction create mode 100644 data/undeadm-m1/functions/entity/spawn/fire_blast_death.mcfunction create mode 100644 data/undeadm-m1/functions/entity/spawn/magic_missile.mcfunction create mode 100644 data/undeadm-m1/functions/entity/tick/fire_blast.mcfunction create mode 100644 data/undeadm-m1/functions/entity/tick/magic_missile.mcfunction create mode 100644 data/undeadm-m1/functions/fire_blast_figure.mcfunction create mode 100644 data/undeadm-m1/functions/give/netherite_dagger.mcfunction create mode 100644 data/undeadm-m1/functions/give/netherite_sword.mcfunction create mode 100644 data/undeadm-m1/functions/give/staff_magic_missile.mcfunction create mode 100644 data/undeadm-m1/functions/hsec.mcfunction create mode 100644 data/undeadm-m1/functions/init.mcfunction create mode 100644 data/undeadm-m1/functions/tick.mcfunction create mode 100644 data/undeadm-m1/functions/use/staff_fire_blast.mcfunction create mode 100644 data/undeadm-m1/functions/use/staff_magic_missile.mcfunction create mode 100644 pack.mcmeta diff --git a/README.md b/README.md new file mode 100644 index 0000000..00914fe --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +UndeadMaelys' Expansion Packs + +0 - Core + MANDATORY for all packs to work. + +1 - Weapons + ADDS custom weapons (some with custom mechanics): + 1 - Daggers (All tiers) + 2 - Curved Sword (All tiers) + 3 - Katana (All tiers) + 4 - Pike (All tiers) + 5 - Warhammmer (All tiers) + 6 - Great Sword (All tiers) + 7 - Great Curved Sword (All tiers) + 8 - Great Axe (All tiers) + 9 - Halberd (All tiers) + 10 - Great Hammer (All tiers) + + MODIFIES minecraft base weapons, the Sword and the Axe. + 1 - Sword damage values stay the same. + 2 - Axe has modified damage and speed values. + + ADDS custom magic staves: + 1 - Magic Missile Staff + 2 - Fire Blast Staff + 3 - Ice Shock Staff + 4 - Bone Dancer Staff + diff --git a/data/minecraft/tags/functions/tick.json b/data/minecraft/tags/functions/tick.json new file mode 100644 index 0000000..a178704 --- /dev/null +++ b/data/minecraft/tags/functions/tick.json @@ -0,0 +1,5 @@ +{ + "values": [ + "undeadm-core:tick" + ] +} diff --git a/data/undeadm-core/functions/assigner/player.mcfunction b/data/undeadm-core/functions/assigner/player.mcfunction new file mode 100644 index 0000000..af0c1fa --- /dev/null +++ b/data/undeadm-core/functions/assigner/player.mcfunction @@ -0,0 +1,4 @@ +tellraw @a[scores={me-debugging=1..}] "undeadmaelys-core:assigner/player" + +scoreboard players add $count me-core_uid 1 +scoreboard players operation @s me-core_uid = $count me-core_uid diff --git a/data/undeadm-core/functions/assigners.mcfunction b/data/undeadm-core/functions/assigners.mcfunction new file mode 100644 index 0000000..35ea7c4 --- /dev/null +++ b/data/undeadm-core/functions/assigners.mcfunction @@ -0,0 +1,4 @@ +tellraw @a[scores={me-debugging=1..}] "undeadmaelys-core:assigners" + +scoreboard players set $count me-core_uid 0 +execute as @a run function undeadmaelys-core:assigner/player diff --git a/data/undeadm-core/functions/init.mcfunction b/data/undeadm-core/functions/init.mcfunction new file mode 100644 index 0000000..a3a448c --- /dev/null +++ b/data/undeadm-core/functions/init.mcfunction @@ -0,0 +1,47 @@ +# for debug +tellraw @a[scores={me-debugging=1..}] "undeadm-core:scoreboards" + +# auto init clear (no more init during the game!) +data modify storage undeadm-core:init status set value 1 + +# try to init other modules + +#weapons mod +function undeadm-m1:init + +### core module + +## core system + +# for debug! + scoreboard objectives add me-debugging dummy + +## tick counter + + scoreboard objectives add me-core_tickC dummy + scoreboard players set $tps me-core_tickC 20 + +## assigners + + scoreboard objectives add me-core_uid dummy + scoreboard players set $count me-core_uid 0 + +## player input checkers + +# check for right click + scoreboard objectives add me-core_rc minecraft.used:minecraft.carrot_on_a_stick + +# check for shifting + scoreboard objectives add me-core_shift minecraft.custom:minecraft.sneak_time + +## custom entity trackers + +# to keep custom entities alive for a specific amount of time: timer + scoreboard objectives add me-core_entityT dummy + +# to keep custom entities alive for a specific amount of time: maxtime + scoreboard objectives add me-core_entityMT dummy + +# to keep custom entities in check for a specific amount of time: control1 + scoreboard objectives add me-core_entityC1 dummy + diff --git a/data/undeadm-core/functions/player_assign.mcfunction b/data/undeadm-core/functions/player_assign.mcfunction new file mode 100644 index 0000000..0b198b3 --- /dev/null +++ b/data/undeadm-core/functions/player_assign.mcfunction @@ -0,0 +1,4 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-core:assigner/player" + +scoreboard players add $count me-core_uid 1 +scoreboard players operation @s me-core_uid = $count me-core_uid diff --git a/data/undeadm-core/functions/scoreboards.mcfunction b/data/undeadm-core/functions/scoreboards.mcfunction new file mode 100644 index 0000000..37e5ea0 --- /dev/null +++ b/data/undeadm-core/functions/scoreboards.mcfunction @@ -0,0 +1,18 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-core:scoreboards" + +## custom scoresboard systems + +# tickC - tick distributor handling +scoreboard players add $current me-core_tickC 1 +execute if score $current me-core_tickC = $tps me-core_tickC run scoreboard players operation $current me-core_tickC -= $tps me-core_tickC + +# entity maxtime +execute as @e[tag=EntityTimer] run scoreboard players add @s me-core_entityT 1 +execute as @e[tag=EntityTimer] if score @s me-core_entityT >= @s me-core_entityC1 run tag @s add Control1 +execute as @e[tag=EntityTimer] if score @s me-core_entityT >= @s me-core_entityPI run tag @s add PostInit +execute as @e[tag=EntityTimer] if score @s me-core_entityT >= @s me-core_entityMT run tag @s add Dying + +## clean scoreboards (these represent bool checks) +scoreboard players reset @a me-core_rc +scoreboard players reset @a me-core_shift + diff --git a/data/undeadm-core/functions/tick.mcfunction b/data/undeadm-core/functions/tick.mcfunction new file mode 100644 index 0000000..585bdd7 --- /dev/null +++ b/data/undeadm-core/functions/tick.mcfunction @@ -0,0 +1,17 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-core:tick" + +# self init +execute unless data storage undeadm-core:init {status:1} run function undeadm-core:init + +## call other modules & optimization tick distribution + +# call weapon hsec every half a sec and for tick every tick +execute if score $current me-core_tickC matches 1 run function undeadm-m1:hsec +execute if score $current me-core_tickC matches 11 run function undeadm-m1:hsec +function undeadm-m1:tick + +# manage assigners +execute if score $current me-core_tickC matches 10 run function undeadm-core:assigners + +# manage scores +function undeadm-core:scoreboards diff --git a/data/undeadm-core/tags/blocks/no_collision.json b/data/undeadm-core/tags/blocks/no_collision.json new file mode 100644 index 0000000..cd59219 --- /dev/null +++ b/data/undeadm-core/tags/blocks/no_collision.json @@ -0,0 +1,30 @@ +{ + "replace": false, + "values": [ + "minecraft:air", + "minecraft:comparator", + "minecraft:grass", + "minecraft:lever", + "minecraft:redstone_wire", + "minecraft:redstone_torch", + "minecraft:redstone_wall_torch", + "minecraft:repeater", + "minecraft:tall_grass", + "minecraft:wall_torch", + "#minecraft:buttons", + "#minecraft:carpets", + "#minecraft:leaves", + "#minecraft:fire", + "#minecraft:flower_pots", + "#minecraft:flowers", + "#minecraft:tall_flowers", + "minecraft:sweet_berry_bush", + "#minecraft:banners", + "#minecraft:portals", + "#minecraft:rails", + "#minecraft:saplings", + "#minecraft:signs", + "#minecraft:underwater_bonemeals", + "#minecraft:wall_post_override" + ] +} diff --git a/data/undeadm-core/tags/entity_types/undead.json b/data/undeadm-core/tags/entity_types/undead.json new file mode 100644 index 0000000..cddf9cb --- /dev/null +++ b/data/undeadm-core/tags/entity_types/undead.json @@ -0,0 +1,17 @@ +{ + "replace": false, + "values": [ + "minecraft:drowned", + "minecraft:husk", + "minecraft:phantom", + "minecraft:skeleton", + "minecraft:skeleton_horse", + "minecraft:stray", + "minecraft:wither", + "minecraft:wither_skeleton", + "minecraft:zoglin", + "minecraft:zombie", + "minecraft:zombie_villager", + "minecraft:zombified_piglin" + ] +} diff --git a/data/undeadm-m1/functions/entity/die/magic_missile.mcfunction b/data/undeadm-m1/functions/entity/die/magic_missile.mcfunction new file mode 100644 index 0000000..2883d26 --- /dev/null +++ b/data/undeadm-m1/functions/entity/die/magic_missile.mcfunction @@ -0,0 +1,14 @@ +# reset cd for owner +execute at @s as @a if score @s me-core_uid = @e[limit=1,sort=nearest,tag=MagicMissile] me-core_uid if score @s me-weap_staffCD > $10 me-weap_staffCD run scoreboard players operation @s me-weap_staffCD = $10 me-weap_staffCD + +# magic explosion! (little) +particle minecraft:end_rod ^ ^ ^-0.15 0 0 0 0.1 5 + +# play dead sound to nearby players +playsound undeadm-m1:entity.magic_missile.die neutral @a ~ ~ ~ 0.5 2 + +# play dead sound to owner +execute as @a if score @s me-core_uid = @e[limit=1,sort=nearest,tag=MagicMissile] me-core_uid at @s run playsound undeadm-m1:entity.magic_missile.die neutral @a ~ ~ ~ 0.5 2 + +# die +kill @s diff --git a/data/undeadm-m1/functions/entity/spawn/fire_blast.mcfunction b/data/undeadm-m1/functions/entity/spawn/fire_blast.mcfunction new file mode 100644 index 0000000..ba9f1cd --- /dev/null +++ b/data/undeadm-m1/functions/entity/spawn/fire_blast.mcfunction @@ -0,0 +1,19 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:spawn/magic_missile" + +summon minecraft:armor_stand ^ ^ ^1 {Invisible:1b,Marker:1,Tags:["EntityTimer","FireBlast","Init"]} + +# link uid to player +execute at @s as @e[tag=Init] store result score @s me-core_uid run scoreboard players get @p me-core_uid + +# init variables +execute as @e[tag=Init] run scoreboard players set @s me-core_entityMT 40 +execute as @e[tag=Init] run scoreboard players set @s me-core_entityC1 35 +execute as @e[tag=Init] run scoreboard players set @s me-core_entityPI 1 + +## give projectile data +# get rotation from player (so it aims the same way) +execute as @e[tag=FireBlast,tag=Init] if score @s me-core_uid = @p me-core_uid store result entity @s Rotation[0] float 1 run data get entity @p Rotation[0] 1 +execute as @e[tag=FireBlast,tag=Init] if score @s me-core_uid = @p me-core_uid store result entity @s Rotation[1] float 1 run data get entity @p Rotation[1] 1 + +# stop projectile from getting any more init data +execute as @e[tag=Init] run tag @s remove Init diff --git a/data/undeadm-m1/functions/entity/spawn/fire_blast_death.mcfunction b/data/undeadm-m1/functions/entity/spawn/fire_blast_death.mcfunction new file mode 100644 index 0000000..23061fd --- /dev/null +++ b/data/undeadm-m1/functions/entity/spawn/fire_blast_death.mcfunction @@ -0,0 +1,10 @@ +summon minecraft:falling_block ~ ~ ~ {Motion:[0.075d,0.2d,0.075d],Time: 1,BlockState:{Name: "minecraft:fire"}} +summon minecraft:falling_block ~ ~ ~ {Motion:[-0.075d,0.2d,0.075d],Time: 1,BlockState:{Name: "minecraft:fire"}} +summon minecraft:falling_block ~ ~ ~ {Motion:[-0.075d,0.2d,-0.075d],Time: 1,BlockState:{Name: "minecraft:fire"}} +summon minecraft:falling_block ~ ~ ~ {Motion:[0.075d,0.2d,-0.075d],Time: 1,BlockState:{Name: "minecraft:fire"}} +summon minecraft:falling_block ~ ~ ~ {Motion:[0.075d,0.2d,0d],Time: 1,BlockState:{Name: "minecraft:fire"}} +summon minecraft:falling_block ~ ~ ~ {Motion:[-0.075d,0.2d,0d],Time: 1,BlockState:{Name: "minecraft:fire"}} +summon minecraft:falling_block ~ ~ ~ {Motion:[0d,0.2d,0.075d],Time: 1,BlockState:{Name: "minecraft:fire"}} +summon minecraft:falling_block ~ ~ ~ {Motion:[0d,0.2d,-0.075d],Time: 1,BlockState:{Name: "minecraft:fire"}} +summon minecraft:falling_block ~ ~ ~ {Motion:[0d,0.2d,0d],Time: 1,BlockState:{Name: "minecraft:fire"}} + diff --git a/data/undeadm-m1/functions/entity/spawn/magic_missile.mcfunction b/data/undeadm-m1/functions/entity/spawn/magic_missile.mcfunction new file mode 100644 index 0000000..f3c88f1 --- /dev/null +++ b/data/undeadm-m1/functions/entity/spawn/magic_missile.mcfunction @@ -0,0 +1,22 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:spawn/magic_missile" + +summon minecraft:armor_stand ^ ^ ^1 {Invisible:1b,Marker:1,Tags:["EntityTimer","MagicMissile","Init"]} + +# link uid to player +execute at @s as @e[tag=Init] store result score @s me-core_uid run scoreboard players get @p me-core_uid + +# init variables +execute as @e[tag=Init] run scoreboard players set @s me-core_entityMT 100 +execute as @e[tag=Init] run scoreboard players set @s me-core_entityC1 2 + +# set CD equal to entity max time +execute at @s as @e[tag=Init] if score @s me-core_uid = @p me-core_uid run scoreboard players operation @p me-weap_staffCD = @s me-core_entityMT +execute at @s as @e[tag=Init] if score @s me-core_uid = @p me-core_uid run scoreboard players operation @p me-weap_staffCD += $10 me-weap_staffCD + +# flavour! +execute as @e[tag=Init] run playsound undeadm-m1:entity.magic_missile.spawn neutral @a ~ ~ ~ + +playsound undeadm-m1:entity.magic_missile.die neutral @a ~ ~ ~ 1 + +# stop projectile from getting any more init data +execute as @e[tag=Init] run tag @s remove Init diff --git a/data/undeadm-m1/functions/entity/tick/fire_blast.mcfunction b/data/undeadm-m1/functions/entity/tick/fire_blast.mcfunction new file mode 100644 index 0000000..c656f61 --- /dev/null +++ b/data/undeadm-m1/functions/entity/tick/fire_blast.mcfunction @@ -0,0 +1,43 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:tick/fire_blast" + +## FireBlast CUSTOM ENTITY (VIA ARMOR STAND) +# +# Travels 20 blocks -> 10 bps during 2 seconds +# Collision with collisionable blocks +# Doesn't deal contact damage +# On death by collision, summon falling fires +# +# Particles: +# @tick: campfire_cozy_smoke: ~ ~ ~, 0 0 0, 0.0001, 1 +# @death: lava: ^ ^ ^-0.15, 0 0 0, 0.1, 50 +# +# Sounds: +# @death: entity.fire_blast.die: neutral, @a + +## collision +# if no collison, move +execute if block ^ ^ ^0.5 #undeadm-core:no_collision run tp ^ ^ ^0.5 +# if collision, dying +execute unless block ^ ^ ^0.5 #undeadm-core:no_collision run tag @s add Dying + +# if it hits an entity, starts dying +execute if entity @s[tag=PostInit] if entity @e[gamemode=!spectator,tag=!FireBlast,dx=0,dy=0,dz=0] run tag @s add Dying + +## some particles! (unless dying) +# first particle - cool smoke, makes the trail! +execute unless entity @s[tag=Dying] run particle minecraft:campfire_cosy_smoke ~ ~ ~ 0 0 0 0.001 1 + +## if dying +# reset owner's wand CD to 10 (only if greater than 10) +execute if entity @s[tag=Dying] as @a if score @s me-core_uid = @e[limit=1,sort=nearest,tag=FireBlast] me-core_uid if score @s me-weap_staffCD > $10 me-weap_staffCD run scoreboard players set @s me-weap_staffCD 10 +# fire explosion! (little) +execute if entity @s[tag=Dying] run particle minecraft:lava ^ ^ ^-0.15 0 0 0 0.1 50 +# summon fires! +execute if entity @s[tag=Dying] run function undeadm-m1:spawn/fire_blast_death +# play dead sound +execute if entity @s[tag=Dying] run playsound undeadm-m1:entity.fire_blast.die neutral @a +# die +execute if entity @s[tag=Dying] run kill @s + + + diff --git a/data/undeadm-m1/functions/entity/tick/magic_missile.mcfunction b/data/undeadm-m1/functions/entity/tick/magic_missile.mcfunction new file mode 100644 index 0000000..2ba2afd --- /dev/null +++ b/data/undeadm-m1/functions/entity/tick/magic_missile.mcfunction @@ -0,0 +1,47 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:tick/magic_missile" + +## MagicMissile CUSTOM ENTITY (VIA ARMOR STAND) +# +# Travels 30 blocks -> 6 bps during 5 seconds +# Collision with collisionable blocks +# Deals 6 collision damage (potion effect instant damage) +# Can be redirected by the player using the staff +# +# Particles: +# @tick: end_rod: ~ ~ ~, 0 0 0, 0, 2 +# @tick: end_rod: ~ ~ ~, 0.05 0.05 0.05, 0.025, 1 +# @death: end_rod: ^ ^ ^-0.15, 0 0 0, 0.1, 5 +# +# Sounds: +# @tick (every 5 ticks): entity.magic_missile.tick: neutral, @a +# @tick (every 5 ticks): entity.magic_missile.tick: neutral, @s (owner) +# @summon: entity.magic_missile.spawn: neutral, @a + +## collision +# if no collison, move +execute if block ^ ^ ^0.3 #undeadm-core:no_collision run tp ^ ^ ^0.3 +# if collision, dying +execute unless block ^ ^ ^0.3 #undeadm-core:no_collision run tag @s add Dying + +# if it hits an entity, deals damage & dying +execute if entity @s[tag=Control1] as @e[tag=!MagicMissile,dx=0,dy=0,dz=0] run effect give @s minecraft:instant_damage 1 0 +execute if entity @s[tag=Control1] if entity @e[tag=!MagicMissile,dx=0,dy=0,dz=0] unless entity @e[gamemode=!spectator,tag=!MagicMissile,dx=0,dy=0,dz=0] run tag @s add Dying + +execute if score $current me-core_tickC matches 1 run playsound undeadm-m1:entity.magic_missile.spawn neutral @a ~ ~ ~ +execute if score $current me-core_tickC matches 6 run playsound undeadm-m1:entity.magic_missile.spawn neutral @a ~ ~ ~ +execute if score $current me-core_tickC matches 11 run playsound undeadm-m1:entity.magic_missile.spawn neutral @a ~ ~ ~ +execute if score $current me-core_tickC matches 16 run playsound undeadm-m1:entity.magic_missile.spawn neutral @a ~ ~ ~ + +execute if score $current me-core_tickC matches 1 as @a if score @s me-core_uid = @e[limit=1,sort=nearest,tag=MagicMissile] me-core_uid at @s run playsound undeadm-m1:entity.magic_missile.spawn neutral @s ~ ~ ~ +execute if score $current me-core_tickC matches 6 as @a if score @s me-core_uid = @e[limit=1,sort=nearest,tag=MagicMissile] me-core_uid at @s run playsound undeadm-m1:entity.magic_missile.spawn neutral @s ~ ~ ~ +execute if score $current me-core_tickC matches 11 as @a if score @s me-core_uid = @e[limit=1,sort=nearest,tag=MagicMissile] me-core_uid at @s run playsound undeadm-m1:entity.magic_missile.spawn neutral @s ~ ~ ~ +execute if score $current me-core_tickC matches 16 as @a if score @s me-core_uid = @e[limit=1,sort=nearest,tag=MagicMissile] me-core_uid at @s run playsound undeadm-m1:entity.magic_missile.spawn neutral @s ~ ~ ~ + +## some particles! (unless dying) +# first particle - white points at position: form a straight line +execute unless entity @s[tag=Dying] run particle minecraft:end_rod ~ ~ ~ 0 0 0 0 2 +# second particle - white points dispersing a lot more openly than the straight line: creates magic leaking effect +execute unless entity @s[tag=Dying] run particle minecraft:end_rod ~ ~ ~ 0.05 0.05 0.05 0.025 1 + +## if dying +execute if entity @s[tag=Dying] run function undeadm-m1:entity/die/magic_missile diff --git a/data/undeadm-m1/functions/fire_blast_figure.mcfunction b/data/undeadm-m1/functions/fire_blast_figure.mcfunction new file mode 100644 index 0000000..a66a904 --- /dev/null +++ b/data/undeadm-m1/functions/fire_blast_figure.mcfunction @@ -0,0 +1,6 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:fire_blast_figure" + +execute positioned ~ ~0.05 ~0.5 run particle minecraft:flame ^ ^ ^ 0.25 0 0 0 1 +execute positioned ~ ~0.05 ~-0.5 run particle minecraft:flame ^ ^ ^ 0.25 0 0 0 1 +execute positioned ~0.5 ~0.05 ~ run particle minecraft:flame ^ ^ ^ 0 0 0.25 0 1 +execute positioned ~-0.5 ~0.05 ~ run particle minecraft:flame ^ ^ ^ 0 0 0.25 0 1 diff --git a/data/undeadm-m1/functions/give/netherite_dagger.mcfunction b/data/undeadm-m1/functions/give/netherite_dagger.mcfunction new file mode 100644 index 0000000..206c3e8 --- /dev/null +++ b/data/undeadm-m1/functions/give/netherite_dagger.mcfunction @@ -0,0 +1 @@ +give @s minecraft:netherite_sword{CustomModelData:2303,HideFlags:0,AttributeModifiers:[{AttributeName:"generic.attack_damage",Name:"",Slot:"mainhand",Amount:5.5,Operation:0,UUID:[I;1040147046,1075008485,1040819647,1563507848]},{AttributeName:"generic.attack_speed",Name:"",Slot:"mainhand",Amount:-2,Operation:0,UUID:[I;1040147046,1075008485,1040819647,1563507848]}],display:{Name:'{"text":"Netherite Dagger","italic":"false"}'}} 1 diff --git a/data/undeadm-m1/functions/give/netherite_sword.mcfunction b/data/undeadm-m1/functions/give/netherite_sword.mcfunction new file mode 100644 index 0000000..a37b515 --- /dev/null +++ b/data/undeadm-m1/functions/give/netherite_sword.mcfunction @@ -0,0 +1 @@ +give @s minecraft:netherite_sword{CustomModelData:0,HideFlags:0,AttributeModifiers:[{AttributeName:"generic.attack_damage",Name:"a",Slot:"mainhand",Amount:7,Operation:0,UUID:[I;1040147046,1075008485,1040819647,1563507848]},{AttributeName:"generic.attack_speed",Name:"b",Slot:"mainhand",Amount:-2.4,Operation:0,UUID:[I;1040147046,1075008485,1040819647,1563507848]}],display:{Name:'{"text":"Netherite Sword","italic":"false"}'}} 1 diff --git a/data/undeadm-m1/functions/give/staff_magic_missile.mcfunction b/data/undeadm-m1/functions/give/staff_magic_missile.mcfunction new file mode 100644 index 0000000..028acfb --- /dev/null +++ b/data/undeadm-m1/functions/give/staff_magic_missile.mcfunction @@ -0,0 +1 @@ +give @s minecraft:carrot_on_a_stick{Damage:1,CustomModelData:2201,HideFlags:0,display:{Name:'{"text":"Magic Missile Staff","italic":"false"}'}} 1 diff --git a/data/undeadm-m1/functions/hsec.mcfunction b/data/undeadm-m1/functions/hsec.mcfunction new file mode 100644 index 0000000..c6baf74 --- /dev/null +++ b/data/undeadm-m1/functions/hsec.mcfunction @@ -0,0 +1,2 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:hsec" + diff --git a/data/undeadm-m1/functions/init.mcfunction b/data/undeadm-m1/functions/init.mcfunction new file mode 100644 index 0000000..e9846b6 --- /dev/null +++ b/data/undeadm-m1/functions/init.mcfunction @@ -0,0 +1,5 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:init" + +scoreboard objectives add me-m1_staffCD dummy +scoreboard players set $0 me-m1_staffCD 0 +scoreboard players set $10 me-m1_staffCD 10 diff --git a/data/undeadm-m1/functions/tick.mcfunction b/data/undeadm-m1/functions/tick.mcfunction new file mode 100644 index 0000000..ba10b45 --- /dev/null +++ b/data/undeadm-m1/functions/tick.mcfunction @@ -0,0 +1,19 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:tick" + +# check for magic staff usage! & clear out CD if present. +execute as @a if score @s me-weap_staffCD > $0 me-weap_staffCD run scoreboard players remove @s me-weap_staffCD 1 + +# call for use of MAGIC MISSILE +execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{CustomModelData:2201}}}] if score @s me-core_rc matches 1 at @s positioned ~ ~1.8 ~ positioned ^-0.5 ^ ^0.75 run function undeadm-m1:use/staff_magic_missile + +# call for use of FIRE BLAST +execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{CustomModelData:2202}}}] if score @s me-core_rc matches 1 at @s positioned ~ ~1.8 ~ positioned ^-0.5 ^ ^0.75 run function undeadm-m1:use/staff_fire_blast + + +# do MagicMissile as behaviour +execute as @e[tag=MagicMissile] at @s run function undeadm-m1:entity/tick/magic_missile +# do FireBlast as behaviour +execute as @e[tag=FireBlast] at @s run function undeadm-m1:entity/tick/fire_blast + +# draw badass fire around the fire blast mager +execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",tag:{CustomModelData:2202}}}] if entity @s[nbt={OnGround:1b}] at @s run function undeadm-m1:fire_blast_figure diff --git a/data/undeadm-m1/functions/use/staff_fire_blast.mcfunction b/data/undeadm-m1/functions/use/staff_fire_blast.mcfunction new file mode 100644 index 0000000..cb0fad4 --- /dev/null +++ b/data/undeadm-m1/functions/use/staff_fire_blast.mcfunction @@ -0,0 +1,9 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:use/magic_missile" + +## spawn projectile +execute unless score @s me-weap_staffCD > $0 me-weap_staffCD run function undeadm-m1:spawn/fire_blast + +# set CD equal to entity max time + 10 +execute unless score @s me-weap_staffCD > $0 me-weap_staffCD run execute at @s as @e[tag=FireBlast] if score @s me-core_uid = @p me-core_uid run scoreboard players operation @p me-weap_staffCD = @s me-core_entityMT + +execute unless score @s me-weap_staffCD > $0 me-weap_staffCD run scoreboard players operation @s me-weap_staffCD += $10 me-weap_staffCD diff --git a/data/undeadm-m1/functions/use/staff_magic_missile.mcfunction b/data/undeadm-m1/functions/use/staff_magic_missile.mcfunction new file mode 100644 index 0000000..73d2b27 --- /dev/null +++ b/data/undeadm-m1/functions/use/staff_magic_missile.mcfunction @@ -0,0 +1,10 @@ +tellraw @a[scores={me-debugging=1..}] "undeadm-m1:use/magic_missile" + +## spawn projectile +execute unless score @s me-weap_staffCD > $0 me-weap_staffCD run function undeadm-m1:entity/spawn/magic_missile + + +## give projectile data +# get rotation from player (so it aims the same way) +execute at @s as @e[tag=MagicMissile] if score @s me-core_uid = @p me-core_uid store result entity @s Rotation[0] float 1 run data get entity @p Rotation[0] 1 +execute as @e[tag=MagicMissile] if score @s me-core_uid = @p me-core_uid store result entity @s Rotation[1] float 1 run data get entity @p Rotation[1] 1 diff --git a/pack.mcmeta b/pack.mcmeta new file mode 100644 index 0000000..38bb945 --- /dev/null +++ b/pack.mcmeta @@ -0,0 +1,9 @@ +{ + "pack":{ + "pack_format":7, + "description":" + UndeadMaelys' Expansion Packs + Core, Module 1 (Weapons), Module 2 (Generation), Module 3 (Enemies), Module 4 (Systems) + " + } +}