Update logical iframes via datapack
This commit is contained in:
parent
41562e1ba7
commit
cb06105892
|
|
@ -1028,21 +1028,6 @@
|
||||||
},
|
},
|
||||||
"path": "mods/kotlinforforge-4.11.0-all.jar"
|
"path": "mods/kotlinforforge-4.11.0-all.jar"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"downloads": [
|
|
||||||
"https://cdn.modrinth.com/data/6sYYcZFx/versions/ogY1TqWD/logical-iframes-1.0.1.jar"
|
|
||||||
],
|
|
||||||
"env": {
|
|
||||||
"client": "required",
|
|
||||||
"server": "required"
|
|
||||||
},
|
|
||||||
"fileSize": 35440,
|
|
||||||
"hashes": {
|
|
||||||
"sha1": "c6f32b2aafda3f39880022026b1b58702d1863ab",
|
|
||||||
"sha512": "7fab7f901a5414dfc428b55f4e3a90e8f66c2b81888cd2fe80a9b16d63e79711409d08594d94f48f44800f0033f04fd80168da18d606d93180dbfd0208192f64"
|
|
||||||
},
|
|
||||||
"path": "mods/logical-iframes-1.0.1.jar"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"downloads": [
|
"downloads": [
|
||||||
"https://cdn.modrinth.com/data/NRjRiSSD/versions/3w0IxNtk/memoryleakfix-forge-1.17%2B-1.1.5.jar"
|
"https://cdn.modrinth.com/data/NRjRiSSD/versions/3w0IxNtk/memoryleakfix-forge-1.17%2B-1.1.5.jar"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"parent": "logical_iframes:root",
|
||||||
|
"criteria": {
|
||||||
|
"requirement": {
|
||||||
|
"trigger": "minecraft:entity_hurt_player",
|
||||||
|
"conditions": {
|
||||||
|
"damage": {
|
||||||
|
"type": {
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"id": "logical_iframes:melee",
|
||||||
|
"expected": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rewards": {
|
||||||
|
"function": "logical_iframes:damage/entity_hurt_player"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
"parent": "logical_iframes:root",
|
||||||
|
"criteria": {
|
||||||
|
"requirement": {
|
||||||
|
"trigger": "minecraft:player_hurt_entity",
|
||||||
|
"conditions": {
|
||||||
|
"damage": {
|
||||||
|
"type": {
|
||||||
|
"tags": [
|
||||||
|
{
|
||||||
|
"id": "logical_iframes:melee",
|
||||||
|
"expected": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"entity": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:inverted",
|
||||||
|
"term": {
|
||||||
|
"condition": "minecraft:entity_scores",
|
||||||
|
"entity": "this",
|
||||||
|
"scores": {
|
||||||
|
"logical_iframes.timer": {
|
||||||
|
"min": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "minecraft:inverted",
|
||||||
|
"term": {
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"entity": "this",
|
||||||
|
"predicate": {
|
||||||
|
"type": "minecraft:player"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rewards": {
|
||||||
|
"function": "logical_iframes:damage/player_hurt_entity"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"criteria": {
|
||||||
|
"root": {
|
||||||
|
"trigger": "minecraft:tick"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"parent": "logical_iframes:root",
|
||||||
|
"criteria": {
|
||||||
|
"requirement": {
|
||||||
|
"trigger": "minecraft:entity_hurt_player",
|
||||||
|
"conditions": {
|
||||||
|
"damage": {
|
||||||
|
"source_entity": {
|
||||||
|
"type": "#logical_iframes:slimes"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rewards": {
|
||||||
|
"function": "logical_iframes:slime_fix"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
advancement revoke @s only logical_iframes:entity_hurt_player
|
||||||
|
|
||||||
|
execute unless entity @s[tag=logical_iframes.tick] run function logical_iframes:damage/knockback/apply
|
||||||
|
execute if score @s logical_iframes.timer matches 1..9 run function logical_iframes:damage/player_prevent_armor_damage/armor
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
scoreboard players set @s logical_iframes.timer 10
|
||||||
|
tag @s add logical_iframes.tick
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
attribute @s minecraft:generic.knockback_resistance modifier remove logical_iframes:kb_res
|
||||||
|
|
||||||
|
tag @s remove logical_iframes.tick
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
advancement revoke @s only logical_iframes:player_hurt_entity
|
||||||
|
|
||||||
|
execute as @e[type=!#logical_iframes:invalid_targets,nbt={HurtTime:10s},distance=0.01..10] run function logical_iframes:damage/knockback/apply
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
data modify storage logical_iframes:temp Inventory set from entity @s Inventory
|
||||||
|
|
||||||
|
function logical_iframes:damage/player_prevent_armor_damage/fix_armor_macro_1 {slot_num:100,slot:"feet"}
|
||||||
|
function logical_iframes:damage/player_prevent_armor_damage/fix_armor_macro_1 {slot_num:101,slot:"legs"}
|
||||||
|
function logical_iframes:damage/player_prevent_armor_damage/fix_armor_macro_1 {slot_num:102,slot:"chest"}
|
||||||
|
function logical_iframes:damage/player_prevent_armor_damage/fix_armor_macro_1 {slot_num:103,slot:"head"}
|
||||||
|
|
||||||
|
stopsound @a[distance=..16] * minecraft:item.armor.equip_chain
|
||||||
|
stopsound @a[distance=..16] * minecraft:item.armor.equip_diamond
|
||||||
|
stopsound @a[distance=..16] * minecraft:item.armor.equip_elytra
|
||||||
|
stopsound @a[distance=..16] * minecraft:item.armor.equip_generic
|
||||||
|
stopsound @a[distance=..16] * minecraft:item.armor.equip_gold
|
||||||
|
stopsound @a[distance=..16] * minecraft:item.armor.equip_iron
|
||||||
|
stopsound @a[distance=..16] * minecraft:item.armor.equip_leather
|
||||||
|
stopsound @a[distance=..16] * minecraft:item.armor.equip_netherite
|
||||||
|
stopsound @a[distance=..16] * minecraft:item.armor.equip_turtle
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
$data modify storage logical_iframes:temp item set from storage logical_iframes:temp Inventory[{Slot:$(slot_num)b}]
|
||||||
|
execute if data storage logical_iframes:temp {item:{components:{"minecraft:unbreakable":{}}}} run return 1
|
||||||
|
|
||||||
|
execute store result score #damage logical_iframes.misc run data get storage logical_iframes:temp item.components."minecraft:damage"
|
||||||
|
scoreboard players remove #damage logical_iframes.misc 1
|
||||||
|
execute store result storage logical_iframes:temp for_macro.damage int 1 run scoreboard players get #damage logical_iframes.misc
|
||||||
|
|
||||||
|
$data modify storage logical_iframes:temp for_macro.slot set value $(slot)
|
||||||
|
function logical_iframes:damage/player_prevent_armor_damage/fix_armor_macro_2 with storage logical_iframes:temp for_macro
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
$item modify entity @s armor.$(slot) [{"function":"minecraft:set_components","components":{"minecraft:damage":$(damage)}}]
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
execute if score @s logical_iframes.timer matches 10 run attribute @s minecraft:generic.knockback_resistance modifier add logical_iframes:kb_res 1 add_value
|
||||||
|
|
||||||
|
scoreboard players remove @s logical_iframes.timer 1
|
||||||
|
execute if score @s logical_iframes.timer matches 0 run function logical_iframes:damage/knockback/remove
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
scoreboard objectives add logical_iframes.timer dummy
|
||||||
|
scoreboard objectives add logical_iframes.misc dummy
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
execute as @e[type=!#logical_iframes:invalid_targets,tag=logical_iframes.tick] run function logical_iframes:damage/tickdown
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
advancement revoke @s only logical_iframes:slimes_hurt_player
|
||||||
|
|
||||||
|
execute on attacker run effect give @s weakness 1 255 true
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:magic",
|
||||||
|
"minecraft:wither"//,
|
||||||
|
// "minecraft:on_fire"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:mob_attack",
|
||||||
|
"minecraft:mob_attack_no_aggro",
|
||||||
|
"minecraft:player_attack"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:area_effect_cloud",
|
||||||
|
"minecraft:armor_stand",
|
||||||
|
"minecraft:arrow",
|
||||||
|
"minecraft:block_display",
|
||||||
|
"minecraft:boat",
|
||||||
|
"minecraft:breeze_wind_charge",
|
||||||
|
"minecraft:chest_boat",
|
||||||
|
"minecraft:chest_minecart",
|
||||||
|
"minecraft:command_block_minecart",
|
||||||
|
"minecraft:dragon_fireball",
|
||||||
|
"minecraft:egg",
|
||||||
|
"minecraft:end_crystal",
|
||||||
|
"minecraft:ender_pearl",
|
||||||
|
"minecraft:evoker_fangs",
|
||||||
|
"minecraft:experience_bottle",
|
||||||
|
"minecraft:experience_orb",
|
||||||
|
"minecraft:eye_of_ender",
|
||||||
|
"minecraft:falling_block",
|
||||||
|
"minecraft:fireball",
|
||||||
|
"minecraft:firework_rocket",
|
||||||
|
"minecraft:fishing_bobber",
|
||||||
|
"minecraft:furnace_minecart",
|
||||||
|
"minecraft:glow_item_frame",
|
||||||
|
"minecraft:hopper_minecart",
|
||||||
|
"minecraft:interaction",
|
||||||
|
"minecraft:item",
|
||||||
|
"minecraft:item_display",
|
||||||
|
"minecraft:item_frame",
|
||||||
|
"minecraft:leash_knot",
|
||||||
|
"minecraft:lightning_bolt",
|
||||||
|
"minecraft:llama_spit",
|
||||||
|
"minecraft:marker",
|
||||||
|
"minecraft:ominous_item_spawner",
|
||||||
|
"minecraft:painting",
|
||||||
|
"minecraft:potion",
|
||||||
|
"minecraft:shulker_bullet",
|
||||||
|
"minecraft:small_fireball",
|
||||||
|
"minecraft:snowball",
|
||||||
|
"minecraft:spawner_minecart",
|
||||||
|
"minecraft:spectral_arrow",
|
||||||
|
"minecraft:text_display",
|
||||||
|
"minecraft:tnt",
|
||||||
|
"minecraft:tnt_minecart",
|
||||||
|
"minecraft:trident",
|
||||||
|
"minecraft:wind_charge",
|
||||||
|
"minecraft:wither_skull"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"slime",
|
||||||
|
"magma_cube"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"#minecraft:is_explosion"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:out_of_world"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:magic"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:magic",
|
||||||
|
"minecraft:thorns",
|
||||||
|
"#minecraft:is_projectile",
|
||||||
|
"#minecraft:is_explosion"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:on_fire"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:on_fire",
|
||||||
|
"minecraft:in_wall",
|
||||||
|
"minecraft:cramming",
|
||||||
|
"minecraft:drown",
|
||||||
|
"minecraft:fly_into_wall",
|
||||||
|
"minecraft:generic",
|
||||||
|
"minecraft:wither",
|
||||||
|
"minecraft:dragon_breath",
|
||||||
|
"minecraft:starve",
|
||||||
|
"minecraft:fall",
|
||||||
|
"minecraft:freeze",
|
||||||
|
"minecraft:stalagmite",
|
||||||
|
"minecraft:magic",
|
||||||
|
"minecraft:indirect_magic",
|
||||||
|
"minecraft:out_of_world",
|
||||||
|
"minecraft:generic_kill",
|
||||||
|
"minecraft:sonic_boom",
|
||||||
|
"minecraft:outside_border"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:sonic_boom",
|
||||||
|
"#minecraft:is_projectile",
|
||||||
|
"#logical_iframes:melee",
|
||||||
|
"#logical_iframes:dot",
|
||||||
|
"#minecraft:is_explosion",
|
||||||
|
"minecraft:fall"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:starve"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:sonic_boom"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:out_of_world",
|
||||||
|
"minecraft:generic_kill"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:out_of_world",
|
||||||
|
"minecraft:generic_kill"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"#minecraft:bypasses_armor",
|
||||||
|
"minecraft:falling_anvil",
|
||||||
|
"minecraft:falling_stalactite"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:falling_anvil",
|
||||||
|
"minecraft:falling_block",
|
||||||
|
"minecraft:falling_stalactite"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:in_fire"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:drown"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:fireworks",
|
||||||
|
"minecraft:explosion",
|
||||||
|
"minecraft:player_explosion",
|
||||||
|
"minecraft:bad_respawn_point"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:fall",
|
||||||
|
"minecraft:stalagmite"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:in_fire",
|
||||||
|
"minecraft:on_fire",
|
||||||
|
"minecraft:lava",
|
||||||
|
"minecraft:hot_floor",
|
||||||
|
"minecraft:unattributed_fireball",
|
||||||
|
"minecraft:fireball"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:freeze"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:lightning_bolt"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:arrow",
|
||||||
|
"minecraft:trident",
|
||||||
|
"minecraft:mob_projectile",
|
||||||
|
"minecraft:unattributed_fireball",
|
||||||
|
"minecraft:fireball",
|
||||||
|
"minecraft:wither_skull",
|
||||||
|
"minecraft:thrown"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:mob_attack_no_aggro"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:drown"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:explosion",
|
||||||
|
"minecraft:player_explosion",
|
||||||
|
"minecraft:bad_respawn_point"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"replace": true,
|
||||||
|
"values": [
|
||||||
|
"minecraft:magic",
|
||||||
|
"minecraft:indirect_magic",
|
||||||
|
"minecraft:thorns"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"minecraft:drown",
|
||||||
|
"minecraft:in_wall"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"logical_iframes:load"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"values": [
|
||||||
|
"logical_iframes:main"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 15,
|
||||||
|
"description": "Reinventing the entire I-frames mechanic"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue