-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
226 additions
and
38 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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: 2 additions & 2 deletions
4
build/datapack/data/simplenergy/function/_give_all.mcfunction
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
...apack/data/simplenergy/function/custom_blocks/pulverizer/get_pulverizer_recipe.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 @@ | ||
|
||
#> simplenergy:custom_blocks/pulverizer/get_pulverizer_recipe | ||
# | ||
# @within simplenergy:custom_blocks/pulverizer/gui_active_slot | ||
# | ||
|
||
# Get the recipe | ||
function #simplenergy:calls/pulverizer_recipes | ||
|
||
# Place in storage the given output (if any) | ||
execute if score #found simplenergy.data matches 1 run data modify storage simplenergy:main pulverizer.output set from entity @s item | ||
|
||
# Kill temporary entity | ||
kill @s | ||
|
49 changes: 49 additions & 0 deletions
49
build/datapack/data/simplenergy/function/custom_blocks/pulverizer/gui_active_slot.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,49 @@ | ||
|
||
#> simplenergy:custom_blocks/pulverizer/gui_active_slot | ||
# | ||
# @within simplenergy:custom_blocks/pulverizer/work {"index":0,"slot":9,"result":18} | ||
# simplenergy:custom_blocks/pulverizer/work {"index":1,"slot":10,"result":19} | ||
# simplenergy:custom_blocks/pulverizer/work {"index":2,"slot":11,"result":20} | ||
# simplenergy:custom_blocks/pulverizer/work {"index":3,"slot":12,"result":21} | ||
# simplenergy:custom_blocks/pulverizer/work {"index":4,"slot":13,"result":22} | ||
# simplenergy:custom_blocks/pulverizer/work {"index":5,"slot":14,"result":23} | ||
# simplenergy:custom_blocks/pulverizer/work {"index":6,"slot":15,"result":24} | ||
# simplenergy:custom_blocks/pulverizer/work {"index":7,"slot":16,"result":25} | ||
# | ||
|
||
# Get progression | ||
scoreboard players set #progression simplenergy.data 0 | ||
$execute store result score #progression simplenergy.data run data get storage simplenergy:temp slots[$(index)].progression | ||
|
||
# Isolate ingredient and try to get result | ||
scoreboard players set #found simplenergy.data 0 | ||
data modify storage simplenergy:main pulverizer.input set value {} | ||
data modify storage simplenergy:main pulverizer.output set value {} | ||
$data modify storage simplenergy:main pulverizer.input set from storage simplenergy:temp Items[{Slot:$(index)b}] | ||
$execute unless data storage simplenergy:main pulverizer.input run return run function simplenergy:custom_blocks/pulverizer/reset_progress {"index":$(index),"slot":$(slot)} | ||
execute summon item_display run function simplenergy:custom_blocks/pulverizer/get_pulverizer_recipe | ||
|
||
# If no recipe found, stop | ||
$execute if score #found simplenergy.data matches 0 run return run function simplenergy:custom_blocks/pulverizer/reset_progress {"index":$(index),"slot":$(slot)} | ||
|
||
# Else, if output do not match current output slot, stop | ||
scoreboard players set #output_occupied simplenergy.data 0 | ||
$execute if data storage simplenergy:temp slots[$(result)] run scoreboard players set #output_occupied simplenergy.data 1 | ||
execute if score #output_occupied simplenergy.data matches 1 run scoreboard players set #is_not_same_output simplenergy.data 0 | ||
$execute if score #output_occupied simplenergy.data matches 1 run data modify storage simplenergy:temp copy set from storage simplenergy:temp slots[$(result)] | ||
execute if score #output_occupied simplenergy.data matches 1 store success score #is_not_same_output simplenergy.data run data modify storage simplenergy:temp copy.id set from storage simplenergy:main pulverizer.output.id | ||
execute if score #output_occupied simplenergy.data matches 1 if score #is_not_same_output simplenergy.data matches 0 store success score #is_not_same_output simplenergy.data run data modify storage simplenergy:temp copy.components set from storage simplenergy:main pulverizer.output.components | ||
execute if score #output_occupied simplenergy.data matches 1 if score #is_not_same_output simplenergy.data matches 1 run return fail | ||
|
||
# Progress the slot | ||
scoreboard players add #progression simplenergy.data 1 | ||
$execute if score #progression simplenergy.data matches ..199 store result storage simplenergy:temp slots[$(index)].progression int 1 run scoreboard players get #progression simplenergy.data | ||
|
||
# Add the item to the result slot | ||
execute if score #output_occupied simplenergy.data matches 1 store result score #count simplenergy.data run data get storage simplenergy:temp copy.count | ||
execute if score #output_occupied simplenergy.data matches 1 store result score #to_add simplenergy.data run data get storage simplenergy:main pulverizer.output.count | ||
execute if score #output_occupied simplenergy.data matches 1 run scoreboard players operation #count simplenergy.data += #to_add simplenergy.data | ||
$execute if score #output_occupied simplenergy.data matches 1 store result block ~ ~ ~ Items[{Slot:$(result)b}].count int 1 run scoreboard players get #count simplenergy.data | ||
$execute if score #output_occupied simplenergy.data matches 0 run data modify storage simplenergy:main pulverizer.output.Slot set value $(result)b | ||
$execute if score #output_occupied simplenergy.data matches 0 run data modify block ~ ~ ~ Items[{Slot:$(result)b}] set from storage simplenergy:main pulverizer.output | ||
|
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
build/datapack/data/simplenergy/function/custom_blocks/pulverizer/reset_progress.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 @@ | ||
|
||
#> simplenergy:custom_blocks/pulverizer/reset_progress | ||
# | ||
# @within simplenergy:custom_blocks/pulverizer/gui_active_slot {"index":$(index),"slot":$(slot)} | ||
# | ||
|
||
scoreboard players set #progression simplenergy.data 0 | ||
$data modify storage simplenergy:temp slots[$(index)].progression set value 0 | ||
$function simplenergy:custom_blocks/pulverizer/gui_progression {"index":$(index),"slot":$(slot)} | ||
return fail | ||
|
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
19 changes: 19 additions & 0 deletions
19
build/datapack/data/simplenergy/function/custom_blocks/pulverizer/work.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,19 @@ | ||
|
||
#> simplenergy:custom_blocks/pulverizer/work | ||
# | ||
# @within simplenergy:custom_blocks/pulverizer/tick | ||
# | ||
|
||
# Monitor if any slot is working | ||
execute unless data storage simplenergy:temp slots[0].blocked run function simplenergy:custom_blocks/pulverizer/gui_active_slot {"index":0,"slot":9,"result":18} | ||
execute unless data storage simplenergy:temp slots[1].blocked run function simplenergy:custom_blocks/pulverizer/gui_active_slot {"index":1,"slot":10,"result":19} | ||
execute unless data storage simplenergy:temp slots[2].blocked run function simplenergy:custom_blocks/pulverizer/gui_active_slot {"index":2,"slot":11,"result":20} | ||
execute unless data storage simplenergy:temp slots[3].blocked run function simplenergy:custom_blocks/pulverizer/gui_active_slot {"index":3,"slot":12,"result":21} | ||
execute unless data storage simplenergy:temp slots[4].blocked run function simplenergy:custom_blocks/pulverizer/gui_active_slot {"index":4,"slot":13,"result":22} | ||
execute unless data storage simplenergy:temp slots[5].blocked run function simplenergy:custom_blocks/pulverizer/gui_active_slot {"index":5,"slot":14,"result":23} | ||
execute unless data storage simplenergy:temp slots[6].blocked run function simplenergy:custom_blocks/pulverizer/gui_active_slot {"index":6,"slot":15,"result":24} | ||
execute unless data storage simplenergy:temp slots[7].blocked run function simplenergy:custom_blocks/pulverizer/gui_active_slot {"index":7,"slot":16,"result":25} | ||
|
||
# Consume energy if any slot is working | ||
execute if score #working simplenergy.data matches 1.. run scoreboard players remove @s energy.storage 6 | ||
|
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
2 changes: 1 addition & 1 deletion
2
build/datapack/data/simplenergy/function/utils/wrench/rotate/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
4 changes: 2 additions & 2 deletions
4
build/datapack/data/simplenergy/function/v2.0.0/load/confirm_load.mcfunction
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
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
6 changes: 6 additions & 0 deletions
6
build/datapack/data/simplenergy/tags/function/calls/pulverizer_recipes.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,6 @@ | ||
{ | ||
"values": [ | ||
"simplenergy:calls/pulverizer_recipes" | ||
] | ||
} | ||
|
File renamed without changes.
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
build/resource_pack/assets/minecraft/models/item/leather_boots.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
2 changes: 1 addition & 1 deletion
2
build/resource_pack/assets/minecraft/models/item/leather_chestplate.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
2 changes: 1 addition & 1 deletion
2
build/resource_pack/assets/minecraft/models/item/leather_helmet.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
2 changes: 1 addition & 1 deletion
2
build/resource_pack/assets/minecraft/models/item/leather_leggings.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
2 changes: 1 addition & 1 deletion
2
build/resource_pack/assets/minecraft/models/item/warped_fungus_on_a_stick.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
Binary file modified
BIN
+3.9 KB
(440%)
build/resource_pack/assets/simplenergy/textures/block/pulverizer_front_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+293 Bytes
(120%)
build/resource_pack/assets/simplenergy/textures/font/high_res/simplunium_dust.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Oops, something went wrong.