Skip to content

Commit

Permalink
#212 欠片合成時にインベントリに空きがないとなくなってしまうバグを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
NePonpon committed Mar 3, 2024
1 parent ff4c185 commit f489c5b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data/item/functions/lapidary/lapidary/success.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ execute store result entity @s Items[{Slot:10b}].Count byte 0.99999 run data get
execute store result entity @s Items[{Slot:11b}].Count byte 0.99999 run data get storage item: Items[{Slot:11b}].Count
execute store result entity @s Items[{Slot:15b}].Count byte 0.99999 run data get storage item: Items[{Slot:15b}].Count
execute store result entity @s Items[{Slot:16b}].Count byte 0.99999 run data get storage item: Items[{Slot:16b}].Count
#アイテムをプレイヤーにloot
#アイテムをプレイヤーに与える
#インベントリ満タンに備えてitemにデータを付与する
#Slot削除でItems[-1]がSlot:0bに移動する
execute in area:control_area run data remove block 2 2 2 Items[].Slot
execute as @a[scores={_=1..},sort=nearest,limit=1] in area:control_area run loot give @s mine 2 2 2 debug_stick
execute at @a[scores={_=1..},sort=nearest,limit=1] run summon item ~ ~ ~ {Item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:1}},Tags:[LapidaryItem],PickupDelay:0s}
execute at @a[scores={_=1..},sort=nearest,limit=1] as @e[tag=LapidaryItem,distance=..0] in area:control_area run data modify entity @s Item merge from block 2 2 2 Items[0]
#演出
function makeup:item/lapidary/success

0 comments on commit f489c5b

Please sign in to comment.