アイテムが入っているチェストをコピーできない

{a}はアイテムが入っているチェストです /random2で{a}のチェストをコピーしようとしてますが、ブロックのみが置かれて、アイテムの中身が入っていません アイテムが入った状態のチェストをそのままコピーする方法を教えてください
on chat:
set {a} to target block
send {a}

command /random2:
trigger:
set {_loc} to player's location
set block at {_loc} to {a}
set {_block} to block at {_loc}
set {_block}'s inventory to {a}'s inventory
on chat:
set {a} to target block
send {a}

command /random2:
trigger:
set {_loc} to player's location
set block at {_loc} to {a}
set {_block} to block at {_loc}
set {_block}'s inventory to {a}'s inventory
Solution:
ブロックのnbtを取ればこれが使える https://skripthub.net/docs/?id=4053...
Skript Hub - Documentation
NBT - Set Block with NBT (Effect) - SkBee
Set a block at a location to a block with NBT. BlockData is also supported when using MC 1.13+ and Skript 2.5+
Jump to solution
4 Replies
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
nbtごとコピーしよう
Solution
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
ブロックのnbtを取ればこれが使える https://skripthub.net/docs/?id=4053
Skript Hub - Documentation
NBT - Set Block with NBT (Effect) - SkBee
Set a block at a location to a block with NBT. BlockData is also supported when using MC 1.13+ and Skript 2.5+
sisoaz
sisoazOP12mo ago
機能したー ありがとう!!
sisoaz
sisoazOP12mo ago
コード置いとくの忘れてた
on chat:
set {a} to target block
send {a}

command /random2:
trigger:
set {_loc} to player's location
set {_nbt} to nbt of {a}
set nbt-block at {_loc} to {a} with nbt {_nbt}
on chat:
set {a} to target block
send {a}

command /random2:
trigger:
set {_loc} to player's location
set {_nbt} to nbt of {a}
set nbt-block at {_loc} to {a} with nbt {_nbt}
Want results from more Discord servers?
Add your server