Skip to content

Commit

Permalink
V1.1.1
Browse files Browse the repository at this point in the history
Fixed bug involving middle column being empty & some vanilla recipes
  • Loading branch information
CloudWolfYT committed Nov 13, 2021
1 parent 51f8a76 commit 07a0b16
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
say result
#say result
data modify storage itemdb out.Slot set value 0b
data modify storage itemdb out.tag.crafted_item set value 1b
data modify storage itemdb out.tag.id_null set value 1b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ data modify storage itemdb in set value [[],[],[]]
data modify storage itemdb in1 set value [[],[],[]]
scoreboard players set #temp itemdb 0
execute if score #c itemdb matches 0 if score #f itemdb matches 0 if score #i itemdb matches 0 run scoreboard players set #temp itemdb 1
execute if score #b itemdb matches 0 if score #e itemdb matches 0 if score #h itemdb matches 0 run scoreboard players set #temp itemdb 2
execute if score #temp itemdb matches 1 if score #b itemdb matches 0 if score #e itemdb matches 0 if score #h itemdb matches 0 run scoreboard players set #temp itemdb 2
execute if score out1 itemdb matches 0 run function itemdb:crafter/result/load_shaped
execute if score out1 itemdb matches 1 run function itemdb:crafter/result/load_shaped
execute if score out1 itemdb matches 2 run function itemdb:crafter/result/load_shapeless
Expand All @@ -15,10 +15,10 @@ execute if score out1 itemdb matches 5 run function itemdb:crafter/result/load_s
#tellraw @a {"nbt":"hold","storage":"itemdb"}
#tellraw @a {"nbt":"in","storage":"itemdb"}
# get results #
#tellraw @a {"score":{"objective":"itemdb","name":"out2"}}
scoreboard players operation in itemdb = out itemdb
execute if score out2 itemdb matches 0 run function itemdb:crafter/db/get
execute if score out2 itemdb matches 1 run function itemdb:crafter/db/vanilla/get
#tellraw @a {"score":{"objective":"itemdb","name":"out1"}}
#scoreboard players operation in itemdb = out itemdb
#execute if score out2 itemdb matches 0 run function itemdb:crafter/db/get
#execute if score out2 itemdb matches 1 run function itemdb:crafter/db/vanilla/get
#tellraw @a {"nbt":"out","storage":"itemdb"}

execute store result score in itemdb run data get storage itemdb out[2][0]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
say matched0

execute store result score #temp itemdb run data get storage itemdb temp[-1][0][1]
execute store result score #temp1 itemdb run data get storage itemdb temp[-1][0][2]
execute store result score #temp2 itemdb run data get storage itemdb temp[-1][0][3]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@

execute store result score #shapeless itemdb run data get storage itemdb temp[-1][3][0]
execute store result score #tags itemdb run data get storage itemdb temp[-1][0][0][0]
execute store result score #tags_old itemdb run data get storage itemdb temp[-1][0][0][0]
scoreboard players operation #tags itemdb = #tags_old itemdb
data modify storage itemdb tags set from storage itemdb temp[-1][0][0][0]
scoreboard players operation in itemdb = #a itemdb
scoreboard players set #btag itemdb 0
execute if score #shapeless itemdb matches 0 run function itemdb:crafter/search/vanilla/is_tag
execute if score #btag itemdb matches 1 if score #shapeless itemdb matches 0 run function itemdb:crafter/search/vanilla/shaped/matched0

data modify storage itemdb tags set from storage itemdb temp[-1][0][0][0]
scoreboard players operation #tags itemdb = #tags_old itemdb
scoreboard players operation in itemdb = #ma itemdb
scoreboard players set #btag itemdb 0
execute if score #shapeless itemdb matches 0 run function itemdb:crafter/search/vanilla/is_tag
execute if score out itemdb matches -1 if score #btag itemdb matches 1 if score #shapeless itemdb matches 0 run function itemdb:crafter/search/vanilla/mirrored/matched0

data modify storage itemdb tags set from storage itemdb temp[-1][0][0]
scoreboard players operation #tags itemdb = #tags_old itemdb
scoreboard players operation in itemdb = #ia itemdb
scoreboard players set #btag itemdb 0
execute if score #shapeless itemdb matches 1 run function itemdb:crafter/search/vanilla/is_tag
execute if score #btag itemdb matches 1 run say match
execute if score out itemdb matches -1 if score #btag itemdb matches 1 if score #shapeless itemdb matches 1 run function itemdb:crafter/search/vanilla/shapeless/matched0

data remove storage itemdb temp[-1]
Expand Down

0 comments on commit 07a0b16

Please sign in to comment.