name of ITEM が挙動不審

on swap hand items:
if player is not sneaking:
set {_gun} to player's tool
send "%{_gun}%"
send "%name of {_gun}%"
on swap hand items:
if player is not sneaking:
set {_gun} to player's tool
send "%{_gun}%"
send "%name of {_gun}%"
こちら、結果がこう(画像2)になります いみわからんどす errorないです、コンソールにもありません どなたか原因分かりませんか
No description
No description
No description
32 Replies
月猫ch
月猫chOP2mo ago
ようするに name of ITEMが動いたり動かなかったりします
mirageeeeeeeeeeeeeeeeeeeeeeeeeee
これ動いてるか? 動かなかったり動かなかったりしているように見える オフハンドか手持ちのアイテムが空気だったりしてる?
yukkina
yukkina2mo ago
1.16で2.9か
月猫ch
月猫chOP2mo ago
完全に動かないときと 動く時がある 今回は完全に動いていない
set {_i} to diamond named "test"
name of {_i}
set {_i} to diamond named "test"
name of {_i}
とかは動く 空気 でもオフハンドとか関係なしに、ほかの場所でも動かないことが多々
Melonium
Melonium2mo ago
csとなんか連携が取れてないとかかもしれん 普通のアイテムでも確かめてみては
月猫ch
月猫chOP2mo ago
いや、CS入ってない 銃は全部自作 元々銃作り終わってて 構文を全部訂正するために作り直してる んだけど、システム云々以前に前々から name of ITEM 取れない問題が出てて……
Melonium
Melonium2mo ago
set {_gun} to "%player's tool%" parsed as itemstack
send "%name of {_gun}%"
set {_gun} to "%player's tool%" parsed as itemstack
send "%name of {_gun}%"
一回これ試してみては
月猫ch
月猫chOP2mo ago
あ~ loreが消し飛ぶ…
Melonium
Melonium2mo ago
parsed as itemなのかな
月猫ch
月猫chOP2mo ago
ああいや、"%player's tool%"の時点でloreとか色々消えちゃうから… 事前に変数に保存して~とかいろいろやると たぶん最終的に手間が同じくらいになっちゃう… まあ要するに player's tool とか、純粋なitem stack じゃないとnameが取れなくなる現象なんだろうけど…
Kurumi1011
Kurumi10112mo ago
なにかと競合してる可能性がある item name of とかつかえない?
月猫ch
月猫chOP2mo ago
これ実は全く同じことやったんだけど それでもだめだったんだよね… 書いてなかった、すまn
のしぇあ
のしぇあ2mo ago
displayname of %itemstack% を使って上手くいったことがある記憶がうっすらありますが関係ないかも
Kurumi1011
Kurumi10112mo ago
これだ‼️‼️‼️
月猫ch
月猫chOP2mo ago
だめだった cunt understundされた;;
Kurumi1011
Kurumi10112mo ago
ではname of を変数に入れてから表示
月猫ch
月猫chOP2mo ago
none 😭
DarkestCat
DarkestCat2mo ago
NBTから直接取れませんか
月猫ch
月猫chOP2mo ago
skBee? skBee なんかNBT関連全部あかんのです… ugokannsu 公式構文使ってもエラー吐くんすよネ
DarkestCat
DarkestCat2mo ago
えぇ
月猫ch
月猫chOP2mo ago
entity item 関係なしに nbt構文がエラー吐く
DarkestCat
DarkestCat2mo ago
????? まじで意味わかんねえ
月猫ch
月猫chOP2mo ago
ちなみに今は set {_name} to 2nd element of ("%{_item}%" split at "named ") これで無理やり取得してる
DarkestCat
DarkestCat2mo ago
プラグインかなんかが干渉してる説を推したい
あお🦀
あお🦀2mo ago
function getItemName(item: item) :: string:
set {_itemMeta} to {_item}.getItemMeta()
if {_itemMeta} is not set:
return {_}
if {_itemMeta}.hasDisplayName():
return {_itemMeta}.getDisplayName()
return {_}
function getItemName(item: item) :: string:
set {_itemMeta} to {_item}.getItemMeta()
if {_itemMeta} is not set:
return {_}
if {_itemMeta}.hasDisplayName():
return {_itemMeta}.getDisplayName()
return {_}
これで試してみてください
tanoKun
tanoKun2mo ago
もうskript使う意味ないじゃん
月猫ch
月猫chOP2mo ago
wwww
Kurumi1011
Kurumi10112mo ago
sksjriptのconfigに競合した時の優先度とかいう項目なかったっけ
tanoKun
tanoKun2mo ago
sksjript
あお🦀
あお🦀2mo ago
addon作成時のdebugに便利すぎる神
月猫ch
月猫chOP2mo ago
神plugin出てて草

Did you find this page helpful?