Skip to content

Commit e44f9f9

Browse files
committed
fix: print function is no longer psychotically wrong
1 parent 31a8325 commit e44f9f9

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
data modify storage bot:interpreter temp.item set from storage bot:interpreter helpers.search_inventory.output
12
execute unless block ~ ~ ~ #minecraft:replaceable run return -1
23

34
data modify storage moxlib:api/helpers/block/place target set value {Name:""}
45
data modify storage moxlib:api/helpers/block/place target.Name set from storage bot:interpreter helpers.search_inventory.output.id
56
function moxlib:api/helpers/block/place
67

7-
data modify storage bot:interpreter temp.item set from storage bot:interpreter helpers.search_inventory.output
8-
execute store result score $count bot.interpreter run data get storage bot:interpreter temp.item.count
9-
execute store result storage bot:interpreter temp.item.count byte 1 run scoreboard players add $count bot.interpreter 1
8+
execute store result score $count bot.interpreter run data get storage bot:interpreter temp.item.Count
9+
execute store result storage bot:interpreter temp.item.Count byte 1 run scoreboard players remove $count bot.interpreter 1

Diff for: data/bot/functions/interpreter/evaluate/function/builtin/place/init.mcfunction

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
data remove storage bot:interpreter temp.item
12
data modify storage bot:interpreter helpers.search_inventory.key set from storage bot:interpreter evaluate.stack[-1].args[0]
23
data modify storage bot:interpreter helpers.search_inventory.inventory set from entity @s Items
34
function bot:interpreter/evaluate/function/helpers/search_inventory/init
45

56
execute if data storage bot:interpreter helpers.search_inventory.output{slot:-1b} run return -1
67

78
# UUID: 3efca315-0b20-4026-8024-2450ff25b92f
8-
execute at @s run summon text_display ~ ~ ~ {text:'{"nbt":"temp.resource","storage": "bot:interpreter"}',UUID:[I; 1056744213, 186662950, -2145115056, -14304977],Tags:["bot.temp"]}
9+
execute at @s run summon text_display ~ ~ ~ {text:'{"nbt":"temp.resource","storage": "bot:interpreter"}',UUID:[I; 1056744213, 186662950, -2145115056, -14304977],Tags:["bot.temp"],text_opacity:0,background:0}
910

1011
execute store result score $x bot.interpreter run data get entity 3efca315-0b20-4026-8024-2450ff25b92f Pos[0]
1112
execute store result score $dx bot.interpreter run data get storage bot:interpreter evaluate.stack[-1].args[1].evaluated_value[0].value

Diff for: data/bot/functions/interpreter/evaluate/function/builtin/place/tool.mcfunction

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ kill 704a8f67-58d9-429d-8535-8eb0957136ca
2525

2626
execute store result score $tile_drops bot.interpreter run gamerule doTileDrops
2727
execute if score $tile_drops bot.interpreter matches 1 run scoreboard players set $tile_drop_guard bot.interpreter 1
28-
gamerule doTileDrops false
29-
setblock ~ ~ ~ air destroy
28+
29+
scoreboard players set $gamerule_success bot.interpreter 0
30+
execute store success score $gamerule_success bot.interpreter run gamerule doTileDrops false
31+
execute if score $gamerule_success bot.interpreter matches 1 run setblock ~ ~ ~ air destroy
3032
execute if score $tile_drops bot.interpreter matches 1 run gamerule doTileDrops true
33+
3134
scoreboard players set $tile_drop_guard bot.interpreter 0

0 commit comments

Comments
 (0)