-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generalized block tracking emerald tagging inventory clearing wood pile spawning
- Loading branch information
1 parent
b30301d
commit 0352475
Showing
42 changed files
with
869 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"criteria": { | ||
"requirement": { | ||
"trigger": "inventory_changed", | ||
"conditions": { | ||
"items": [{ | ||
"items": ["emerald"] | ||
}] | ||
} | ||
} | ||
}, | ||
"rewards": { | ||
"function": "chaotic_crafting:util/replace_emerald" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"criteria": { | ||
"example": { | ||
"trigger": "minecraft:placed_block", | ||
"conditions": { | ||
"location": [ | ||
{ | ||
"condition": "location_check", | ||
"predicate": { | ||
"block": { | ||
"blocks": "barrel" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"rewards": { | ||
"function": "chaotic_crafting:block_tracker/barrel/place_barrel" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"criteria": { | ||
"example": { | ||
"trigger": "minecraft:placed_block", | ||
"conditions": { | ||
"location": [ | ||
{ | ||
"condition": "location_check", | ||
"predicate": { | ||
"block": { | ||
"blocks": "chest" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"rewards": { | ||
"function": "chaotic_crafting:block_tracker/chest/place_chest" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
data/chaotic_crafting/function/block_tracker/barrel/place_barrel.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#tellraw @s {"text": "Placed Barrel."} | ||
advancement revoke @s only chaotic_crafting:place_barrel | ||
|
||
function chaotic_crafting:util/block_ray/start_block_ray | ||
|
||
execute as @e[type=marker,tag=new_barrel] run function chaotic_crafting:util/center_entity | ||
execute as @e[type=marker,tag=new_barrel] run tag @s remove new_barrel | ||
|
4 changes: 4 additions & 0 deletions
4
data/chaotic_crafting/function/block_tracker/barrel/remove_barrel.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#tellraw @s {"text": "Barrel Broken."} | ||
scoreboard players set @s cc_barrel_broken 0 | ||
|
||
execute as @e[type=marker,tag=cc_barrel_marker] run execute at @s run execute unless block ~ ~ ~ barrel run kill @s |
7 changes: 7 additions & 0 deletions
7
data/chaotic_crafting/function/block_tracker/chest/place_chest.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#tellraw @s {"text": "Placed Chest."} | ||
advancement revoke @s only chaotic_crafting:place_chest | ||
|
||
function chaotic_crafting:util/block_ray/start_block_ray | ||
|
||
execute as @e[type=marker,tag=new_chest] run function chaotic_crafting:util/center_entity | ||
execute as @e[type=marker,tag=new_chest] run tag @s remove new_chest |
4 changes: 4 additions & 0 deletions
4
data/chaotic_crafting/function/block_tracker/chest/remove_chest.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#tellraw @s {"text": "Chest Broken."} | ||
scoreboard players set @s cc_chest_broken 0 | ||
|
||
execute as @e[type=marker,tag=cc_chest_marker] run execute at @s run execute unless block ~ ~ ~ chest run kill @s |
5 changes: 4 additions & 1 deletion
5
data/chaotic_crafting/function/day_manager/start_day.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
data/chaotic_crafting/function/functional_blocks/activate_crafter.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
data/chaotic_crafting/function/functional_blocks/place_crafter.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
execute if score $day_active cc_settings matches 1 run execute if score $iron_ore_spread cc_settings matches 1 run execute as @e[type=marker,tag=iron_ore_spreader] run function chaotic_crafting:ore_spread/iron_spread | ||
schedule function chaotic_crafting:loop/iron_spread 5s | ||
schedule function chaotic_crafting:loop/iron_spread 10s |
3 changes: 0 additions & 3 deletions
3
data/chaotic_crafting/function/loop/oak_pile_spawn.mcfunction
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
execute if score $day_active cc_settings matches 1 run execute if score $oak_wood_pile_spawn cc_settings matches 1 run execute as @e[type=marker,tag=cc_oak_log_pile] at @s run place template chaotic_crafting:oak_log_pile_alt ~ ~ ~ | ||
|
||
execute if score $day_active cc_settings matches 1 run execute if score $all_wood_spawn cc_settings matches 1 run execute as @e[type=marker,tag=cc_birch_log_pile] at @s run place template chaotic_crafting:birch_log_pile ~ ~ ~ | ||
execute if score $day_active cc_settings matches 1 run execute if score $all_wood_spawn cc_settings matches 1 run execute as @e[type=marker,tag=cc_acacia_log_pile] at @s run place template chaotic_crafting:acacia_log_pile ~ ~ ~ | ||
execute if score $day_active cc_settings matches 1 run execute if score $all_wood_spawn cc_settings matches 1 run execute as @e[type=marker,tag=cc_cherry_log_pile] at @s run place template chaotic_crafting:cherry_log_pile ~ ~ ~ | ||
execute if score $day_active cc_settings matches 1 run execute if score $all_wood_spawn cc_settings matches 1 run execute as @e[type=marker,tag=cc_mangrove_log_pile] at @s run place template chaotic_crafting:mangrove_log_pile ~ ~ ~ | ||
|
||
execute if score $day_active cc_settings matches 1 run tellraw @a {"text": "A log delivery has arrived.", "color": "white"} | ||
execute if score $day_active cc_settings matches 1 run execute if score $oak_wood_pile_spawn cc_settings matches 1 run schedule function chaotic_crafting:loop/wood_spawn 120s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
data/chaotic_crafting/function/planning_phase/planning_phase.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
scoreboard players set $planning_phase_active cc_planning_phase 1 | ||
|
||
execute if score $gui_open cc_gui matches 0 run function chaotic_crafting:util/gui/open_day_gui | ||
schedule function chaotic_crafting:planning_phase/merchant/spawn_merchant 2s |
2 changes: 2 additions & 0 deletions
2
data/chaotic_crafting/function/planning_phase/planning_phase_manager.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
scoreboard players set $diamond_menu cc_upgrades 1 | ||
scoreboard players add $cc_menus_unlocked cc_settings 1 | ||
scoreboard players set $diamond_ore_spread cc_settings 1 | ||
scoreboard players set $coal_deposit_spawn cc_settings 1 | ||
|
||
data modify entity @e[type=marker,tag=cc_trade_data,limit=1] data.custom_data.menus append value {menu:"chaotic_crafting:menu_diamond_items"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
scoreboard players set $gold_menu cc_upgrades 1 | ||
scoreboard players add $cc_menus_unlocked cc_settings 1 | ||
scoreboard players set $gold_ore_spread cc_settings 1 | ||
scoreboard players set $coal_deposit_spawn cc_settings 1 | ||
|
||
data modify entity @e[type=marker,tag=cc_trade_data,limit=1] data.custom_data.menus append value {menu:"chaotic_crafting:menu_gold_items"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
scoreboard players set $wood_menu cc_upgrades 1 | ||
scoreboard players add $cc_menus_unlocked cc_settings 1 | ||
scoreboard players set $all_wood_spawn cc_settings 1 | ||
|
||
data modify entity @e[type=marker,tag=cc_trade_data,limit=1] data.custom_data.menus append value {menu:"chaotic_crafting:menu_wood_items"} |
7 changes: 7 additions & 0 deletions
7
data/chaotic_crafting/function/util/block_ray/block_ray.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
execute if block ~ ~ ~ #chaotic_crafting:crafter run function chaotic_crafting:util/find_crafter/hit_crafter | ||
execute if block ~ ~ ~ #chaotic_crafting:barrel run function chaotic_crafting:util/block_ray/find_blocks/hit_barrel | ||
execute if block ~ ~ ~ #chaotic_crafting:chest run function chaotic_crafting:util/block_ray/find_blocks/hit_chest | ||
|
||
scoreboard players add #distance cc_block_ray 1 | ||
|
||
execute if score #hit cc_block_ray matches 0 if score #distance cc_block_ray matches ..50 positioned ^ ^ ^0.1 run function chaotic_crafting:util/block_ray/block_ray |
4 changes: 4 additions & 0 deletions
4
data/chaotic_crafting/function/util/block_ray/find_blocks/hit_barrel.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#tellraw @s {"text": "Hit Barrel."} | ||
scoreboard players set #hit cc_block_ray 1 | ||
|
||
summon marker ~ ~ ~ {Tags:[cc_barrel_marker,new_barrel],data:{name:"Barrel"}} |
3 changes: 3 additions & 0 deletions
3
data/chaotic_crafting/function/util/block_ray/find_blocks/hit_chest.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
scoreboard players set #hit cc_block_ray 1 | ||
|
||
summon marker ~ ~ ~ {Tags:[cc_chest_marker,new_chest],data:{name:"Chest"}} |
7 changes: 7 additions & 0 deletions
7
data/chaotic_crafting/function/util/block_ray/start_block_ray.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
tag @s add find_block | ||
scoreboard players set #hit cc_block_ray 0 | ||
scoreboard players set #distance cc_block_ray 0 | ||
|
||
execute as @s at @s anchored eyes positioned ^ ^ ^ anchored feet run function chaotic_crafting:util/block_ray/block_ray | ||
|
||
tag @s remove find_crafter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
execute as @a[scores={cc_crafter_broken=1}] run function chaotic_crafting:functional_blocks/break_crafter | ||
execute as @a[scores={cc_iron_ore_mined=1}] run function chaotic_crafting:ore_spread/mined_iron_ore | ||
execute as @a[scores={cc_gold_ore_mined=1}] run function chaotic_crafting:ore_spread/mined_gold_ore | ||
execute as @a[scores={cc_diamond_ore_mined=1}] run function chaotic_crafting:ore_spread/mined_diamond_ore | ||
execute as @a[scores={cc_diamond_ore_mined=1}] run function chaotic_crafting:ore_spread/mined_diamond_ore | ||
|
||
execute as @a[scores={cc_crafter_broken=1}] run function chaotic_crafting:functional_blocks/break_crafter | ||
execute as @a[scores={cc_barrel_broken=1}] run function chaotic_crafting:block_tracker/barrel/remove_barrel | ||
execute as @a[scores={cc_chest_broken=1}] run function chaotic_crafting:block_tracker/chest/remove_chest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
data/chaotic_crafting/function/util/clear_inventories.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
clear @a[tag=cc_player] *[!minecraft:custom_data={keep:true}] | ||
execute as @e[type=marker,tag=cc_barrel_marker] at @s run data modify block ~ ~ ~ Items set value [] | ||
execute as @e[type=marker,tag=cc_chest_marker] at @s run data modify block ~ ~ ~ Items set value [] |
2 changes: 1 addition & 1 deletion
2
data/chaotic_crafting/function/util/debug/debug_tick.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#execute if score $show_seats cc_settings matches 1 run particle dust{color:[1.000,0.000,0.000],scale:1} 0 62 10 0 1 0 1 10 normal | ||
#execute if score $timer cc_timer matches 100 run execute as @e[type=marker,tag=crafter_lvl1] at @s run function chaotic_crafting:functional_blocks/crafter_lvl_1 | ||
|
||
execute at @e[type=marker,tag=debug_marker] run particle dust{color:[1.000,0.000,0.000],scale:1} ~ ~ ~ 0 1 0 1 10 normal | ||
#execute at @e[type=marker,tag=debug_marker] run particle dust{color:[1.000,0.000,0.000],scale:1} ~ ~ ~ 0 1 0 1 10 normal | ||
|
||
#execute at @e[type=marker,tag=iron_ore_spreader] run particle dust{color:[0.000,1.000,0.000],scale:1} ~ ~ ~ 0 1 0 1 10 normal |
2 changes: 1 addition & 1 deletion
2
data/chaotic_crafting/function/util/find_crafter/hit_crafter.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
scoreboard players set #hit cc_crafter_ray 1 | ||
|
||
tellraw @a {"text": "Crafter Found"} | ||
#tellraw @a {"text": "Crafter Found"} | ||
summon armor_stand ~ ~ ~ {Tags:[crafter_marker,new_crafter],attributes:[{id:"generic.scale",base:0.8}],Invisible:1b,Invulnerable:1b,NoGravity:1b,Small:1b} | ||
#execute as @e[type=armor_stand,limit=1,sort=nearest] at @s facing entity @p eyes run tp @s ~ ~ ~ ~ ~ | ||
summon marker ~ ~ ~ {Tags:[debug_marker,crafter_marker,new_crafter]} |
2 changes: 1 addition & 1 deletion
2
data/chaotic_crafting/function/util/find_crafter/start_crafter_ray.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
data/chaotic_crafting/function/util/progress_bars/give_progress_bar.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
data/chaotic_crafting/function/util/replace_emerald.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#give @s minecraft:emerald[custom_data={keep:true}] | ||
summon item ~ ~ ~ {Item:{id:"emerald",components:{"minecraft:custom_data":{keep:true}}},Tags:[keep_emerald]} | ||
|
||
execute store result score @s cc_temp run clear @s emerald[!minecraft:custom_data={keep:true}] | ||
execute store result entity @e[distance=..1,type=item,tag=keep_emerald,limit=1] Item.count byte 1 run scoreboard players get @s cc_temp | ||
|
||
tag @e[distance=..1,type=item,tag=keep_emerald,limit=1] remove keep_emerald | ||
scoreboard players reset @s cc_temp | ||
|
||
execute as @s run schedule function chaotic_crafting:util/revoke_has_emerald 5t |
1 change: 1 addition & 0 deletions
1
data/chaotic_crafting/function/util/revoke_has_emerald.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
advancement revoke @a only chaotic_crafting:has_emerald |
Oops, something went wrong.