Skip to content

Commit

Permalink
0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
VisiVersa committed Jan 11, 2023
1 parent 811d971 commit 3ea46ba
Show file tree
Hide file tree
Showing 191 changed files with 907 additions and 120 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"values":[
"minecraft:armor_stand",
"minecraft:marker"
"minecraft:marker",
"minecraft:drowned"
]
}
3 changes: 2 additions & 1 deletion datapack/data/nucleus/tags/entity_types/scheduled/tick.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"values":[
"minecraft:armor_stand",
"minecraft:marker"
"minecraft:marker",
"minecraft:drowned"
]
}
37 changes: 37 additions & 0 deletions datapack/data/sanguine/advancements/sanguine/flesh_tuner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"display": {
"icon": {
"item": "minecraft:dispenser",
"nbt": "{CustomModelData:8361007}"
},
"title": {
"translate": "advancement.sanguine.flesh_tuner"
},
"description": [
{
"translate": "advancement.sanguine.flesh_tuner.desc"
},
"\n",
{
"text": "",
"color": "white",
"font": "sanguine:recipes"
},
"\n",
"\n",
"\n",
"\n",
"\n"
],
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"parent": "sanguine:sanguine/credence",
"criteria": {
"requirement": {
"trigger": "minecraft:impossible"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parent": "sanguine:technical/root",
"criteria": {
"requirement": {
"trigger": "minecraft:entity_hurt_player",
"conditions": {
"damage": {
"source_entity": {
"type": "minecraft:drowned",
"nbt": "{Tags:[\"sanguine.maul\"]}"
}
}
}
}
},
"rewards": {
"function": "sanguine:entity/technical/sounds/attack/maul"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parent": "sanguine:technical/root",
"criteria": {
"requirement": {
"trigger": "minecraft:entity_hurt_player",
"conditions": {
"damage": {
"source_entity": {
"type": "minecraft:vindicator",
"nbt": "{Tags:[\"sanguine.offal\"]}"
}
}
}
}
},
"rewards": {
"function": "sanguine:entity/technical/sounds/attack/offal"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"criteria": {
"requirement": {
"trigger": "minecraft:item_used_on_block",
"conditions": {
"location": {
"block": {
"blocks": [
"minecraft:dispenser"
],
"nbt": "{Lock:\"§flesh_tuner\\\\uF001\"}"
}
}
}
}
},
"rewards": {
"function": "sanguine:block/flesh_tuner/click"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
]
],
"rewards": {
"function": "sanguine:item/hat_entity_equip"
"function": "sanguine:item/hat_entity_equip/main"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@
"check": {
"trigger": "minecraft:player_interacted_with_entity",
"conditions": {
"player": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"items": [
"minecraft:warped_fungus_on_a_stick"
],
"nbt": "{sanguine:{id:\"blood_binding\"}}"
}
}
}
}
},
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"mainhand": {
"items": [
"minecraft:gold_ingot"
]
}
}
}
}
}
],
"entity": {
"nbt": "{Tags:[\"sanguine.effigy.blank\"]}"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ execute store result score @s smithed.data if entity @s[scores={smithed.data=0}]
execute store result score @s smithed.data if entity @s[scores={smithed.data=0}] if data storage smithed.crafter:input recipe{0:[{Slot:0b,id:"minecraft:air"},{Slot:1b,id:"minecraft:bone_block"},{Slot:2b,id:"minecraft:air"}],1:[{Slot:0b,id:"minecraft:bone"},{Slot:1b,id:"minecraft:structure_block",tag:{sanguine:{id:"amalgamate_flesh"}}},{Slot:2b,id:"minecraft:bone"}],2:[{Slot:0b,id:"minecraft:air"},{Slot:1b,id:"minecraft:structure_block",tag:{sanguine:{id:"bloody_fragment"}}},{Slot:2b,id:"minecraft:air"}]} run loot replace block ~ ~ ~ container.16 loot sanguine:items/effigy

execute store result score @s smithed.data if entity @s[scores={smithed.data=0}] if data storage smithed.crafter:input recipe{0:[{Slot:0b,id:"minecraft:structure_block",tag:{sanguine:{id:"amalgamate_flesh"}}},{Slot:1b,id:"minecraft:string"},{Slot:2b,id:"minecraft:structure_block",tag:{sanguine:{id:"amalgamate_flesh"}}}],1:[{Slot:0b,id:"minecraft:structure_block",tag:{sanguine:{id:"toxic_sac"}}},{Slot:1b,id:"minecraft:air"},{Slot:2b,id:"minecraft:structure_block",tag:{sanguine:{id:"toxic_sac"}}}],2:[{Slot:0b,id:"minecraft:air"},{Slot:1b,id:"minecraft:structure_block",tag:{sanguine:{id:"toxic_sac"}}},{Slot:2b,id:"minecraft:air"}]} run loot replace block ~ ~ ~ container.16 loot sanguine:items/gut_bundle

execute store result score @s smithed.data if entity @s[scores={smithed.data=0}] if data storage smithed.crafter:input recipe{0:[{Slot:0b,id:"minecraft:polished_blackstone"},{Slot:1b,id:"minecraft:polished_blackstone"},{Slot:2b,id:"minecraft:polished_blackstone"}],1:[{Slot:0b,id:"minecraft:polished_blackstone"},{Slot:1b,id:"minecraft:structure_block",tag:{sanguine:{id:"bloody_fragment"}}},{Slot:2b,id:"minecraft:polished_blackstone"}],2:[{Slot:0b,id:"minecraft:structure_block",tag:{sanguine:{id:"amalgamate_flesh"}}},{Slot:1b,id:"minecraft:structure_block",tag:{sanguine:{id:"amalgamate_flesh"}}},{Slot:2b,id:"minecraft:structure_block",tag:{sanguine:{id:"amalgamate_flesh"}}}]} run loot replace block ~ ~ ~ container.16 loot sanguine:items/flesh_tuner
16 changes: 16 additions & 0 deletions datapack/data/sanguine/functions/block/effigy/checks.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
scoreboard players reset #error sanguine.dummy

# Checks
execute if score #sanguine.xp sanguine.dummy < #sanguine.xp_min sanguine.dummy run scoreboard players set #error sanguine.dummy 1
execute unless score #max_health sanguine.dummy matches 2.. run scoreboard players set #error sanguine.dummy 2
execute if score @s sanguine.bindings matches 9.. run scoreboard players set #error sanguine.dummy 3
execute unless data storage sanguine:storage root.temp.item.tag.sanguine.binding run scoreboard players set #error sanguine.dummy 4

execute unless score #error sanguine.dummy matches 1.. run function sanguine:item/blood_binding/check_and_apply

# Display
execute if score #error sanguine.dummy matches 1 run data modify storage smithed.actionbar:input message set value {freeze:45,priority:'override',json:'{"translate":"ui.sanguine.blood_binding.xp","color":"red","with":[{"score":{"name":"#sanguine.xp_min","objective":"sanguine.dummy"}},{"score":{"name":"#sanguine.xp_cost","objective":"sanguine.dummy"}}]}'}
execute if score #error sanguine.dummy matches 2 run data modify storage smithed.actionbar:input message set value {freeze:45,priority:'override',json:'{"translate":"ui.sanguine.blood_binding.low_health","color":"red"}'}
execute if score #error sanguine.dummy matches 3 run data modify storage smithed.actionbar:input message set value {freeze:45,priority:'override',json:'{"translate":"ui.sanguine.blood_binding.too_many","color":"red"}'}
execute if score #error sanguine.dummy matches 4 run data modify storage smithed.actionbar:input message set value {freeze:45,priority:'override',json:'{"translate":"ui.sanguine.blood_binding.unbound","color":"red"}'}
execute if score #error sanguine.dummy matches 1.. run function #smithed.actionbar:message
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# Setup
data remove storage sanguine:storage root.temp
data modify storage sanguine:storage root.temp.item set from entity @s SelectedItem

execute if entity @s[advancements={sanguine:technical/player_interacted_with_entity/effigy={bind=true}}] run data modify storage sanguine:storage root.temp.action set value 1
execute if entity @s[advancements={sanguine:technical/player_interacted_with_entity/effigy={gold=true}}] run data modify storage sanguine:storage root.temp.action set value 2
execute if entity @s[advancements={sanguine:technical/player_interacted_with_entity/effigy={veins=true}}] run data modify storage sanguine:storage root.temp.action set value 3
execute if entity @s[advancements={sanguine:technical/player_interacted_with_entity/effigy={empty=true}}] run data modify storage sanguine:storage root.temp.action set value 4
execute if entity @s[advancements={sanguine:technical/player_interacted_with_entity/effigy={check=true}}] run data modify storage sanguine:storage root.temp.action set value 5

scoreboard players set @s manic.hide_sanity 60
# Determine Checks
execute store result score #sanguine.xp sanguine.dummy run xp query @s levels
execute if entity @s[gamemode=creative] run scoreboard players set #sanguine.xp sanguine.dummy 9999

Expand All @@ -18,13 +20,13 @@ scoreboard players operation #sanguine.xp_min sanguine.dummy += #sanguine.temp_0
scoreboard players operation #sanguine.xp_cost sanguine.dummy = @s sanguine.bindings
scoreboard players operation #sanguine.xp_cost sanguine.dummy += #3 sanguine.dummy

execute unless data storage sanguine:storage root.temp.action unless entity @s[tag=sanguine.scheduled.effigy] run title @s actionbar {"translate":"ui.sanguine.blood_binding.xp","with":[{"score":{"name":"#sanguine.xp_min","objective":"sanguine.dummy"}},{"score":{"name":"#sanguine.xp_cost","objective":"sanguine.dummy"}}],"color":"red"}
execute store result score #max_health sanguine.dummy run attribute @s minecraft:generic.max_health get

tag @s remove sanguine.tag
execute if data storage sanguine:storage root.temp.action run function sanguine:block/effigy/prevent_popup
execute if data storage sanguine:storage root.temp{action:1} run function sanguine:item/blood_binding/check
# Commit
execute if data storage sanguine:storage root.temp{action:1} run function sanguine:block/effigy/checks
execute if data storage sanguine:storage root.temp{action:5} run data modify storage smithed.actionbar:input message set value {freeze:45,priority:'override',json:'{"translate":"ui.sanguine.blood_binding.xp","color":"red","with":[{"score":{"name":"#sanguine.xp_min","objective":"sanguine.dummy"}},{"score":{"name":"#sanguine.xp_cost","objective":"sanguine.dummy"}}]}'}
execute if data storage sanguine:storage root.temp{action:5} run function #smithed.actionbar:message
execute anchored eyes run function sanguine:entity/technical/raycast/raycast
execute if data storage sanguine:storage root.temp{success:1b,consume:1b} run item modify entity @s[gamemode=!creative] weapon.mainhand sanguine:reduce_count/1
tag @s remove sanguine.tag

advancement revoke @s only sanguine:technical/player_interacted_with_entity/effigy

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
execute store result score #count sanguine.dummy run data get entity @s Item.Count
loot spawn ~ ~ ~ loot sanguine:technical/blocks/flesh_tuner
kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
execute as @e[tag=!smithed.entity,limit=1,type=item,distance=..2,nbt={PickupDelay:10s,Item:{id:"minecraft:dispenser",tag:{display:{Name:'{"font":"sanguine:technical","translate":"block.sanguine.flesh_tuner.name"}'}}}}] at @s run function sanguine:block/flesh_tuner/break/kill_item
particle item dispenser{CustomModelData:8361007} ~ ~ ~ 0.2 0.2 0.2 0.05 20 normal
kill @s
function sanguine:block/hopper_updating/undo
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
advancement revoke @s only sanguine:technical/item_used_on_block/click_flesh_tuner
stopsound @a[distance=..16] * block.chest.locked

data remove storage sanguine:storage root.temp
data modify storage sanguine:storage root.temp.item set from entity @s SelectedItem

execute if data storage sanguine:storage root.gamerules{flesh_tuner:1b} run function sanguine:block/flesh_tuner/gamerule_check/success
execute unless data storage sanguine:storage root.gamerules{flesh_tuner:1b} run function sanguine:block/flesh_tuner/gamerule_check/fail
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data modify storage smithed.actionbar:input message set value {freeze:45,priority:'notification',json:'{"translate":"ui.sanguine.flesh_tuner.blocked","color":"red"}'}
function #smithed.actionbar:message
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
execute anchored eyes run function sanguine:block/flesh_tuner/interact/raycast
execute if data storage sanguine:storage root.temp{success:1b} run function sanguine:block/flesh_tuner/player/main
execute anchored eyes run function sanguine:block/flesh_tuner/interact/raycast
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
execute if data storage sanguine:storage root.temp{vfx:1} run function sanguine:block/flesh_tuner/interact/vfx/bind
execute if data storage sanguine:storage root.temp{vfx:2} run function sanguine:block/flesh_tuner/interact/vfx/unbind
data modify storage sanguine:storage root.temp.success set value 1b
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
execute if block ^ ^ ^0.01 minecraft:dispenser{Lock:"§flesh_tuner\\uF001"} positioned ^ ^ ^0.01 align xyz as @e[dx=0,type=armor_stand,tag=sanguine.flesh_tuner,limit=1] positioned ~0.5 ~0.5 ~0.5 run function sanguine:block/flesh_tuner/interact/as_entity
execute if entity @s[distance=..5] unless block ^ ^ ^0.01 minecraft:dispenser{Lock:"§flesh_tuner\\uF001"} positioned ^ ^ ^0.01 run function sanguine:block/flesh_tuner/interact/raycast
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
playsound sanguine:block.flesh_tuner.bind block @a
particle dust 0.588 0.090 0.039 2 ~ ~0.75 ~ 0.25 0.1 0.25 1 10 force
particle dust 0.588 0.090 0.039 1 ~ ~ ~ 0.55 0.55 0.55 1 25 force
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
playsound sanguine:block.flesh_tuner.unbind block @a
particle dust 0.588 0.090 0.039 2 ~ ~0.75 ~ 0.25 0.1 0.25 1 5 force
particle dust 0.588 0.090 0.039 1 ~ ~ ~ 0.55 0.55 0.55 1 15 force
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
setblock ~ ~ ~ air
setblock ~ ~ ~ dispenser[facing=down]{CustomName:'{"font":"sanguine:technical","translate":"block.sanguine.flesh_tuner.name"}',Lock:"§flesh_tuner\\uF001",TransferCooldown:9999}

summon armor_stand ~ ~ ~ {CustomName:'{"translate":"block.sanguine.flesh_tuner"}',ArmorItems:[{},{},{},{id:"minecraft:dispenser",Count:1b,tag:{CustomModelData:8361007,sanguine:{stored_dispenser_data:[[],[]]}}}],Tags:["nucleus.entity","sanguine.entity","sanguine.block","sanguine.flesh_tuner","smithed.entity","smithed.block","nucleus.prevents_hoppers"],NoGravity:1b,Invisible:1b,Marker:1b}

function nucleus:block/hopper_updating/fill
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data modify storage smithed.actionbar:input message set value {freeze:45,priority:'notification',json:'{"translate":"ui.sanguine.flesh_tuner.error","color":"red"}'}
function #smithed.actionbar:message
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
team join sanguine.flesh_tuner @s
data modify storage smithed.actionbar:input message set value {freeze:45,priority:'notification',json:'{"translate":"ui.sanguine.flesh_tuner.join","color":"red"}'}
function #smithed.actionbar:message

data modify storage sanguine:storage root.temp.vfx set value 1
effect give @s minecraft:instant_damage 1 30 true

advancement grant @s only sanguine:sanguine/flesh_tuner
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
team leave @s
data modify storage smithed.actionbar:input message set value {freeze:45,priority:'notification',json:'{"translate":"ui.sanguine.flesh_tuner.leave","color":"red"}'}
function #smithed.actionbar:message

data modify storage sanguine:storage root.temp.vfx set value 2
effect give @s minecraft:instant_damage 1 30 true
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tag @s remove sanguine.tag
execute if entity @s[team=sanguine.flesh_tuner] run tag @s add sanguine.tag

execute unless entity @s[tag=sanguine.tag] unless entity @s[team=] run function sanguine:block/flesh_tuner/player/error
execute unless entity @s[tag=sanguine.tag] if entity @s[team=] run function sanguine:block/flesh_tuner/player/join
execute if entity @s[tag=sanguine.tag] run function sanguine:block/flesh_tuner/player/leave
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
execute unless block ~ ~ ~ dispenser run function sanguine:block/flesh_tuner/break/main
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tag @s remove sanguine.scheduled.engorge
scoreboard players set @s sanguine.hide_sanity 45
title @s actionbar {"translate":"record.nowPlaying","with":[{"translate":"record.sanguine.engorge"}],"color":"#880f0f"}
data modify storage smithed.actionbar:input message set value {freeze:45,priority:'notification',json:'{"translate":"record.nowPlaying","with":[{"translate":"record.sanguine.engorge"}],"color":"#880f0f"}'}
function #smithed.actionbar:message
Loading

0 comments on commit 3ea46ba

Please sign in to comment.