-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Plant Wax update (v1e)
- Loading branch information
Showing
76 changed files
with
847 additions
and
149 deletions.
There are no files selected for viewing
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,47 @@ | ||
# Daenvil's Vegancraft v1e (Full Datapack) for Minecraft 1.19+ | ||
|
||
This datapack is a merged version of the following datapacks: | ||
|
||
- [Plant-based Foods v1.0.1](https://daenvil.github.io/MCDatapacks/plant-based_foods.html) | ||
- [Omnivorous Pets v1](https://daenvil.github.io/MCDatapacks/omnivorous_pets.html) | ||
- [Acacia Gum v1](https://daenvil.github.io/MCDatapacks/acacia_gum.html) | ||
- [Ethical Textiles v1](https://daenvil.github.io/MCDatapacks/ethical_Textiles.html) | ||
- [Plant Wax v1](https://daenvil.github.io/MCDatapacks/plant_wax.html) | ||
|
||
- This datapack was made by Daenvil, its official pages are: | ||
|
||
- On my website: https://daenvil.github.io/MCDatapacks/vegancraft.html | ||
- On GitHub: https://www.github.com/daenvil/vegancraft | ||
|
||
- If you like my datapacks, please consider leaving a tip at my ko-fi: https://ko-fi.com/daenvilmc | ||
|
||
- This version was published on the 15th of December 2022. Check the webpages above for possible updates. | ||
|
||
## Installation | ||
|
||
- Drop the datapack zip file inside the "datapacks" folder of your world folder (<your minecraft folder>/saves/<your world>/datapacks/). | ||
|
||
## Features | ||
|
||
You can find the full info on this page: https://daenvil.github.io/MCDatapacks/vegancraft.html | ||
|
||
## Legal terms | ||
|
||
You are allowed to: | ||
|
||
- Download, use, and edit this datapack* for personal use. | ||
- Use this datapack or variations of it in a Minecraft server. | ||
- Publish audiovisual content that uses this datapack or variations of it (e.g. gameplay videos on online platforms), as long as you acknowledge me (Daenvil) as the author of this datapack and provide a link to its GitHub repository (https://www.github.com/daenvil/vegancraft) or to its webpage (https://daenvil.github.io/MCDatapacks/vegancraft.html). | ||
- Share this datapack or variations of it privately (e.g. transferring the files to friends), as long as there is no financial profit involved, the files are not publicly available, and this text file is included with the files you share. | ||
|
||
You are not allowed to: | ||
|
||
- Publish this datapack or variations of it without explicit permission from me. | ||
|
||
*For all legal purposes, "this datapack" refers to all the files (source code, images, and any other) that you downloaded along with this text file, and that are downloadable from its official pages listed above. | ||
|
||
-- | ||
|
||
-Daenvil | ||
|
||
https://daenvil.github.io/MCDatapacks/contact.html |
17 changes: 17 additions & 0 deletions
17
datapack/data/dnv.core/advancements/triggers/interacted_with_crafting_table.json
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,17 @@ | ||
{ | ||
"rewards": { | ||
"function": "dnv.core:triggers/interacted_with_crafting_table" | ||
}, | ||
"criteria": { | ||
"crafting_table_interaction": { | ||
"trigger": "minecraft:item_used_on_block", | ||
"conditions": { | ||
"location": { | ||
"block": { | ||
"blocks": ["minecraft:crafting_table"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
datapack/data/dnv.core/advancements/triggers/interacted_with_furnace.json
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,17 @@ | ||
{ | ||
"rewards": { | ||
"function": "dnv.core:triggers/interacted_with_furnace" | ||
}, | ||
"criteria": { | ||
"crafting_table_interaction": { | ||
"trigger": "minecraft:item_used_on_block", | ||
"conditions": { | ||
"location": { | ||
"block": { | ||
"blocks": ["minecraft:furnace"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
datapack/data/dnv.core/advancements/triggers/placed_furnace.json
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,13 @@ | ||
{ | ||
"criteria": { | ||
"placed_composter": { | ||
"trigger": "minecraft:placed_block", | ||
"conditions": { | ||
"block": "minecraft:furnace" | ||
} | ||
} | ||
}, | ||
"rewards": { | ||
"function": "dnv.core:triggers/placed_furnace" | ||
} | ||
} |
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 @@ | ||
# Called by dnv.core:furnace/load or scheduled by itself | ||
|
||
scoreboard players set @s[type=marker,tag=dnv.furnace] dnv.cook_time -1 | ||
#Update working furnaces: | ||
execute as @e[type=marker,tag=dnv.furnace] at @s if block ~ ~ ~ minecraft:furnace[lit=true] run function dnv.core:furnace/update | ||
|
||
schedule function dnv.core:furnace/1second 1s replace |
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 @@ | ||
scoreboard objectives add dnv.found_furnace dummy | ||
scoreboard objectives add dnv.cook_time dummy | ||
|
||
function dnv.core:furnace/1second |
12 changes: 12 additions & 0 deletions
12
datapack/data/dnv.core/functions/furnace/marker_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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Called by function dnv.core:furnace/tick | ||
# @s = Furnace marker | ||
# position = Furnace marker | ||
|
||
# If there is not a furnace here, delete the marker: | ||
execute unless block ~ ~ ~ furnace run kill @s | ||
|
||
# Handle burn timer: | ||
execute if score @s dnv.cook_time matches 0.. run scoreboard players add @s dnv.cook_time 1 | ||
|
||
# Check if item completed smelting: | ||
execute if score @s dnv.cook_time matches 200 run function #dnv.core:furnace/cook_timer_complete |
9 changes: 9 additions & 0 deletions
9
datapack/data/dnv.core/functions/furnace/raycast/find_furnace.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,9 @@ | ||
# Called through #dnv.core:triggers/interacted_with_furnace by function dnv.core:triggers/interacted_with_furnace | ||
# Called through #dnv.core:triggers/placed_furnace by function dnv.core:triggers/placed_furnace | ||
# Raycast function to find block furnace. Needs to be triggered by something. | ||
# Objective dnv.found_furnace functions as both a tracker of how many steps were done (in negative numbers) and as confirmation of success (1) | ||
|
||
scoreboard players set @s dnv.found_furnace 0 | ||
execute anchored eyes positioned ^ ^ ^ run function dnv.core:furnace/raycast/find_furnace_line | ||
execute if score @s dnv.found_furnace matches ..-61 anchored eyes positioned ^ ^ ^1 run function dnv.core:furnace/raycast/find_furnace_wide | ||
#execute if score @s dnv.found_furnace matches ..-121 run function dnv.core:furnace/raycast/find_furnace_fail |
6 changes: 6 additions & 0 deletions
6
datapack/data/dnv.core/functions/furnace/raycast/find_furnace_line.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,6 @@ | ||
# Called by function dnv.core:furnace/raycast/find_furnace or by itself | ||
|
||
execute if block ~ ~ ~ furnace run function dnv.core:furnace/raycast/find_furnace_success | ||
# If not found, repeat function in the next forward step towards where the player is facing: | ||
execute if score @s dnv.found_furnace matches -60..0 run scoreboard players remove @s dnv.found_furnace 1 | ||
execute if score @s dnv.found_furnace matches -60..0 positioned ^ ^ ^.1 run function dnv.core:furnace/raycast/find_furnace_line |
6 changes: 6 additions & 0 deletions
6
datapack/data/dnv.core/functions/furnace/raycast/find_furnace_success.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,6 @@ | ||
# Called by function dnv.core:furnace/raycast/find_furnace(_line/_wide) | ||
# ~ ~ ~ = position of the targeted block | ||
|
||
scoreboard players set @s dnv.found_furnace 1 | ||
|
||
execute align xyz unless entity @e[dx=0,dy=0,dz=0,type=marker,tag=dnv.furnace,limit=1] run summon marker ~0.5 ~0.5 ~0.5 {Tags:["dnv.furnace"]} |
14 changes: 14 additions & 0 deletions
14
datapack/data/dnv.core/functions/furnace/raycast/find_furnace_wide.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,14 @@ | ||
# Called by function dnv.core:furnace/raycast/find_furnace or by itself | ||
|
||
execute if block ^1 ^ ^ furnace positioned ^1 ^ ^ run function dnv.core:furnace/raycast/find_furnace_success | ||
execute if score @s dnv.found_furnace matches -120..-61 positioned ^1 ^ ^ if block ~ ~ ~ furnace run function dnv.core:furnace/raycast/find_furnace_success | ||
execute if score @s dnv.found_furnace matches -120..-61 positioned ^-1 ^ ^ if block ~ ~ ~ furnace run function dnv.core:furnace/raycast/find_furnace_success | ||
execute if score @s dnv.found_furnace matches -120..-61 positioned ^ ^1 ^ if block ~ ~ ~ furnace run function dnv.core:furnace/raycast/find_furnace_success | ||
execute if score @s dnv.found_furnace matches -120..-61 positioned ^1 ^-1 ^ if block ~ ~ ~ furnace run function dnv.core:furnace/raycast/find_furnace_success | ||
execute if score @s dnv.found_furnace matches -120..-61 positioned ^1 ^1 ^ if block ~ ~ ~ furnace run function dnv.core:furnace/raycast/find_furnace_success | ||
execute if score @s dnv.found_furnace matches -120..-61 positioned ^1 ^-1 ^ if block ~ ~ ~ furnace run function dnv.core:furnace/raycast/find_furnace_success | ||
execute if score @s dnv.found_furnace matches -120..-61 positioned ^-1 ^1 ^ if block ~ ~ ~ furnace run function dnv.core:furnace/raycast/find_furnace_success | ||
execute if score @s dnv.found_furnace matches -120..-61 positioned ^-1 ^-1 ^ if block ~ ~ ~ furnace run function dnv.core:furnace/raycast/find_furnace_success | ||
# If not found, repeat function in the next forward step towards where the player is facing: | ||
execute if score @s dnv.found_furnace matches -120..-61 run scoreboard players remove @s dnv.found_furnace 1 | ||
execute if score @s dnv.found_furnace matches -120..-61 positioned ^ ^ ^.1 run function dnv.core:furnace/raycast/find_furnace_wide |
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 @@ | ||
execute as @e[type=marker,tag=dnv.furnace] at @s run function dnv.core:furnace/marker_tick |
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 @@ | ||
# Called by function dnv.core:furnace/1second | ||
# @s = Furnace marker | ||
# position = Furnace marker | ||
# Updates the burn timer score every second, this reduces the amount of times the NBT data of the furnace needs to be accessed. | ||
|
||
execute store result score @s dnv.cook_time run data get block ~ ~ ~ CookTime |
2 changes: 2 additions & 0 deletions
2
datapack/data/dnv.core/functions/triggers/interacted_with_crafting_table.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,2 @@ | ||
advancement revoke @s only dnv.core:triggers/interacted_with_crafting_table | ||
function #dnv.core:triggers/interacted_with_crafting_table |
2 changes: 2 additions & 0 deletions
2
datapack/data/dnv.core/functions/triggers/interacted_with_furnace.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,2 @@ | ||
advancement revoke @s only dnv.core:triggers/interacted_with_furnace | ||
function #dnv.core:triggers/interacted_with_furnace |
2 changes: 2 additions & 0 deletions
2
datapack/data/dnv.core/functions/triggers/placed_furnace.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,2 @@ | ||
advancement revoke @s only dnv.core:triggers/placed_furnace | ||
function #dnv.core:triggers/placed_furnace |
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 @@ | ||
[ | ||
{ | ||
"function": "minecraft:set_count", | ||
"count": 1, | ||
"add": true | ||
} | ||
] |
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 @@ | ||
[ | ||
{ | ||
"function": "minecraft:set_count", | ||
"count": -1, | ||
"add": true | ||
} | ||
] |
5 changes: 5 additions & 0 deletions
5
datapack/data/dnv.core/tags/functions/furnace/cook_timer_complete.json
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 @@ | ||
{ | ||
"values": [ | ||
"dnv.plant_wax:furnace/cook_timer_complete" | ||
] | ||
} |
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
12 changes: 12 additions & 0 deletions
12
datapack/data/dnv.core/tags/functions/triggers/interacted_with_crafting_table.json
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,12 @@ | ||
{ | ||
"values": [ | ||
{ | ||
"id": "dnv.vegancraft:utility/grant_crafting_advancement", | ||
"required": false | ||
}, | ||
{ | ||
"id": "dnv.vegancraft:plant_wax/utility/update_vcount", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
datapack/data/dnv.core/tags/functions/triggers/interacted_with_furnace.json
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 @@ | ||
{ | ||
"values": [ | ||
{ | ||
"id": "dnv.vegancraft:utility/grant_crafting_advancement", | ||
"required": false | ||
}, | ||
"dnv.core:furnace/raycast/find_furnace" | ||
] | ||
} |
5 changes: 5 additions & 0 deletions
5
datapack/data/dnv.core/tags/functions/triggers/placed_furnace.json
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 @@ | ||
{ | ||
"values": [ | ||
"dnv.core:furnace/raycast/find_furnace" | ||
] | ||
} |
43 changes: 43 additions & 0 deletions
43
datapack/data/dnv.plant_wax/advancements/recipes/bush_wax.json
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,43 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"rewards": { | ||
"recipes": [ | ||
"dnv.plant_wax:bush_wax" | ||
] | ||
}, | ||
"criteria": { | ||
"has_the_ingredient": { | ||
"trigger": "minecraft:inventory_changed", | ||
"conditions": { | ||
"items": [{ | ||
"items": [ | ||
"minecraft:dead_bush" | ||
] | ||
}] | ||
} | ||
}, | ||
"has_the_recipe": { | ||
"trigger": "minecraft:recipe_unlocked", | ||
"conditions": { | ||
"recipe": "dnv.plant_wax:bush_wax" | ||
} | ||
}, | ||
"has_the_item": { | ||
"trigger": "minecraft:inventory_changed", | ||
"conditions": { | ||
"items": [{ | ||
"items": [ | ||
"minecraft:honeycomb" | ||
] | ||
}] | ||
} | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_ingredient", | ||
"has_the_recipe", | ||
"has_the_item" | ||
] | ||
] | ||
} |
43 changes: 43 additions & 0 deletions
43
datapack/data/dnv.plant_wax/advancements/recipes/jungle_wax.json
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,43 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"rewards": { | ||
"recipes": [ | ||
"dnv.plant_wax:jungle_wax" | ||
] | ||
}, | ||
"criteria": { | ||
"has_the_ingredient": { | ||
"trigger": "minecraft:inventory_changed", | ||
"conditions": { | ||
"items": [{ | ||
"items": [ | ||
"minecraft:jungle_leaves" | ||
] | ||
}] | ||
} | ||
}, | ||
"has_the_recipe": { | ||
"trigger": "minecraft:recipe_unlocked", | ||
"conditions": { | ||
"recipe": "dnv.plant_wax:jungle_wax" | ||
} | ||
}, | ||
"has_the_item": { | ||
"trigger": "minecraft:inventory_changed", | ||
"conditions": { | ||
"items": [{ | ||
"items": [ | ||
"minecraft:honeycomb" | ||
] | ||
}] | ||
} | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_the_ingredient", | ||
"has_the_recipe", | ||
"has_the_item" | ||
] | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
datapack/data/dnv.plant_wax/functions/furnace/cook_timer_complete.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,15 @@ | ||
# Called through function tag #dnv.core:furnace/cook_timer_complete by function dnv.core:furnace/marker_tick | ||
# @s = Furnace marker | ||
# position = Furnace marker | ||
# Checks if custom recipes were completed: | ||
|
||
# Dead bush | ||
execute if data block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:dead_bush"}]} run tag @s add dnv.plant_wax.recipe_completed | ||
|
||
# Jungle leaves | ||
execute unless entity @s[tag=dnv.plant_wax.recipe_completed] if data block ~ ~ ~ {Items:[{Slot:0b,id:"minecraft:jungle_leaves"}]} run tag @s add dnv.plant_wax.recipe_completed | ||
|
||
execute if entity @s[tag=dnv.plant_wax.recipe_completed] run function dnv.plant_wax:furnace/recipe_completed | ||
|
||
# Reset cook timer: | ||
scoreboard players set @s dnv.cook_time -1 |
Oops, something went wrong.