opsdyu
如题。。。。想把带有nbt属性的生物/物品转为指令
ps:1122版本的

xmdhs
用 NBTExplorer 查看区块文件(r.x.x.mca),看nbt是啥样的,然后按照格式写出指令就行了吧。
https://www.mcbbs.net/forum.php?mod=viewthread&tid=306895

(1.14 就直接 data get

opsdyu
xmdhs 发表于 2019-8-25 19:51
用 NBTExplorer 查看区块文件(r.x.x.mca),看nbt是啥样的,然后按照格式写出指令就行了吧。
https://www. ...

有那种 比如mcedit 滤器直接把生物变成命令方块。。。可是1122没有mcedit了

爱心魔王FHC
在启动器那边勾选使用日志,然后再游戏路输入/entitydata @e[选择你要的生物] {}
然后就能在日志文件里获取所有的NBT
然后直接/summon XXX x y z {所有NBT}

opsdyu
FHC红石 发表于 2019-8-26 09:45
在启动器那边勾选使用日志,然后再游戏路输入/entitydata @e[选择你要的生物] {}
然后就能在日志文件里获取 ...

选择我要的生物 是对着生物 还是写他的id

爱心魔王FHC
opsdyu 发表于 2019-8-26 19:33
选择我要的生物 是对着生物 还是写他的id

最好是写type+c=1,然后靠近你要的生物获取nbt
(应该懂选择器吧?)

opsdyu
FHC红石 发表于 2019-8-26 19:36
最好是写type+c=1,然后靠近你要的生物获取nbt
(应该懂选择器吧?)

...1710刚转1122的小白

opsdyu
FHC红石 发表于 2019-8-26 09:45
在启动器那边勾选使用日志,然后再游戏路输入/entitydata @e[选择你要的生物] {}
然后就能在日志文件里获取 ...

查看了wiki基本会用了。。。如果我要用于自定义npc type得怎么办呢

opsdyu
FHC红石 发表于 2019-8-26 19:36
最好是写type+c=1,然后靠近你要的生物获取nbt
(应该懂选择器吧?)

奇怪。。。 加了nbt生成不了
  1. /summon minecraft:cow ~ ~ ~ {HurtByTimestamp:0,ForgeData:{cnpcmarkdata:{marks:[]},"Potion Core - Health Fix":50.0f,"Potion Core - Jump Boost Updated":1b},Attributes:[{Base:1.0d,Name:"potioncore.projectileDamage"},{Base:1.0d,Name:"potioncore.magicDamage"},{Base:1.0d,Name:"potioncore.jumpHeight"},{Base:1.0d,Name:"potioncore.damageResistance"},{Base:0.0d,Name:"potioncore.magicShielding"},{Base:50.0d,Name:"generic.maxHealth"},{Base:0.0d,Name:"generic.knockbackResistance"},{Base:0.20000000298023224d,Name:"generic.movementSpeed"},{Base:0.0d,Name:"generic.armor"},{Base:0.0d,Name:"generic.armorToughness"},{Base:1.0d,Name:"forge.swimSpeed"},{Base:16.0d,Modifiers:[{UUIDMost:175677254907609761L,UUIDLeast:-8419554510857391237L,Amount:-0.004779124107136101d,Operation:1,Name:"Random spawn bonus"}],Name:"generic.followRange"}],Invulnerable:0b,FallFlying:0b,ForcedAge:0,PortalCooldown:0,AbsorptionAmount:0.0f,FallDistance:0.0f,InLove:0,DeathTime:0s,ForgeCaps:{"bettercombatmod:ioffhandattack":0,"llibrary:extendedentitydatacapability":{"mm:living":{frozenYaw:0.0f,freezeProgress:0.0f,frozenPitch:0.0f,prevHasAI:0b,frozenYawHead:0.0f,frozenEntityID:-1,frozenLimbSwingAmount:0.0f,frozenRenderYawOffset:0.0f,frozenSwingProgress:0.0f},"Fossils - Mammal Tracker":{EmbryoProgress:0,Pregnant:0b,Embryo:0}},"bettercombatmod:isecondhurttimer":0,"twilightforest:cap_shield":{permshields:0,tempshields:0}},HandDropChances:[0.085f,0.085f],PersistenceRequired:0b,Age:0,Motion:[0.0d,-0.0784000015258789d,0.0d],Leashed:0b,UUIDLeast:-7814069729001956520L,Health:50.0f,LeftHanded:0b,Air:300s,OnGround:1b,Dimension:0,Rotation:[103.32631f,0.0f],UpdateBlocked:0b,HandItems:[{},{}],ArmorDropChances:[0.085f,0.085f,0.085f,0.085f],UUIDMost:-3044416159573064468L,CustomName:"cow",Pos:[-4944.182666389005d,69.0d,3638.576453659208d],Fire:**,ArmorItems:[{},{},{},{}],CanPickUpLoot:0b,HurtTime:0s}
复制代码

爱心魔王FHC
opsdyu 发表于 2019-8-26 20:51
查看了wiki基本会用了。。。如果我要用于自定义npc type得怎么办呢

type是:customnpcs.CustomNpc
我用NBTExplore打开region文件夹中的.mca文件中获取的

爱心魔王FHC
opsdyu 发表于 2019-8-26 21:36
奇怪。。。 加了nbt生成不了

我没问题啊,(顺便论坛吧Fire:1。s的1。s给吞了XD)


opsdyu
FHC红石 发表于 2019-8-26 21:49
我没问题啊,(顺便论坛吧Fire:1。s的1。s给吞了XD)

我用纯净版也能生成了XDD 看来是mod的锅

opsdyu
FHC红石 发表于 2019-8-26 21:49
我没问题啊,(顺便论坛吧Fire:1。s的1。s给吞了XD)

我还能问一个问题吗
关于setblock的 就是刷挂笼 附带nbt属性 和summon 一个方法吗
  1. /setblock ~ ~1 ~ mob_spawner {HurtByTimestamp:0,ForgeData:{cnpcmarkdata:{marks:[]},"Potion Core - Health Fix":50.0f,"Potion Core - Jump Boost Updated":1b},Attributes:[{Base:1.0d,Name:"potioncore.projectileDamage"},{Base:1.0d,Name:"potioncore.magicDamage"},{Base:1.0d,Name:"potioncore.jumpHeight"},{Base:1.0d,Name:"potioncore.damageResistance"},{Base:0.0d,Name:"potioncore.magicShielding"},{Base:50.0d,Name:"generic.maxHealth"},{Base:0.0d,Name:"generic.knockbackResistance"},{Base:0.20000000298023224d,Name:"generic.movementSpeed"},{Base:0.0d,Name:"generic.armor"},{Base:0.0d,Name:"generic.armorToughness"},{Base:1.0d,Name:"forge.swimSpeed"},{Base:16.0d,Modifiers:[{UUIDMost:-4137106053873055513L,UUIDLeast:-7545825815882252912L,Amount:-0.019558155174564554d,Operation:1,Name:"Random spawn bonus"},{UUIDMost:175677254907609761L,UUIDLeast:-8419554510857391237L,Amount:-0.004779124107136101d,Operation:1,Name:"Random spawn bonus"}],Name:"generic.followRange"}],Invulnerable:0b,FallFlying:0b,ForcedAge:0,PortalCooldown:0,AbsorptionAmount:0.0f,FallDistance:0.0f,InLove:0,DeathTime:0s,ForgeCaps:{"bettercombatmod:ioffhandattack":0,"llibrary:extendedentitydatacapability":{"mm:living":{frozenYaw:0.0f,freezeProgress:0.0f,frozenPitch:0.0f,prevHasAI:0b,frozenYawHead:0.0f,frozenEntityID:-1,frozenLimbSwingAmount:0.0f,frozenRenderYawOffset:0.0f,frozenSwingProgress:0.0f},"Fossils - Mammal Tracker":{EmbryoProgress:0,Pregnant:0b,Embryo:0}},"bettercombatmod:isecondhurttimer":0,"twilightforest:cap_shield":{permshields:0,tempshields:0}},HandDropChances:[0.085f,0.085f],PersistenceRequired:0b,Age:0,Motion:[0.0d,-0.0784000015258789d,0.0d],Leashed:0b,UUIDLeast:-8754414952582782957L,Health:50.0f,LeftHanded:0b,Air:300s,OnGround:1b,Dimension:0,Rotation:[-12.824829f,0.0f],UpdateBlocked:0b,HandItems:[{},{}],ArmorDropChances:[0.085f,0.085f,0.085f,0.085f],UUIDMost:954215535086161071L,CustomName:"cow",Pos:[134.5d,8.0d,311.5d],Fire:**,ArmorItems:[{},{},{},{}],CanPickUpLoot:0b,HurtTime:0s}
复制代码


可是命令方块显示[22:34:50] '{HurtByTimestamp:0,ForgeData:{cnpcmarkdata:{marks:[]},"Potion'不是minecraft:mob_spawner的方块状态之一

爱心魔王FHC
opsdyu 发表于 2019-8-26 22:35
我还能问一个问题吗
关于setblock的 就是刷挂笼 附带nbt属性 和summon 一个方法吗

/setblock ~ ~1 ~ mob_spawner replace {NBT}

opsdyu
FHC红石 发表于 2019-8-26 22:40
/setblock ~ ~1 ~ mob_spawner replace {NBT}

replace 前面要加个0。。。。
  1. /setblock ~ ~1 ~ mob_spawner 0 replace {HurtByTimestamp:0,ForgeData:{cnpcmarkdata:{marks:[]},"Potion Core - Health Fix":50.0f,"Potion Core - Jump Boost Updated":1b},Attributes:[{Base:1.0d,Name:"potioncore.projectileDamage"},{Base:1.0d,Name:"potioncore.magicDamage"},{Base:1.0d,Name:"potioncore.jumpHeight"},{Base:1.0d,Name:"potioncore.damageResistance"},{Base:0.0d,Name:"potioncore.magicShielding"},{Base:50.0d,Name:"generic.maxHealth"},{Base:0.0d,Name:"generic.knockbackResistance"},{Base:0.20000000298023224d,Name:"generic.movementSpeed"},{Base:0.0d,Name:"generic.armor"},{Base:0.0d,Name:"generic.armorToughness"},{Base:1.0d,Name:"forge.swimSpeed"},{Base:16.0d,Modifiers:[{UUIDMost:-4137106053873055513L,UUIDLeast:-7545825815882252912L,Amount:-0.019558155174564554d,Operation:1,Name:"Random spawn bonus"},{UUIDMost:175677254907609761L,UUIDLeast:-8419554510857391237L,Amount:-0.004779124107136101d,Operation:1,Name:"Random spawn bonus"}],Name:"generic.followRange"}],Invulnerable:0b,FallFlying:0b,ForcedAge:0,PortalCooldown:0,AbsorptionAmount:0.0f,FallDistance:0.0f,InLove:0,DeathTime:0s,ForgeCaps:{"bettercombatmod:ioffhandattack":0,"llibrary:extendedentitydatacapability":{"mm:living":{frozenYaw:0.0f,freezeProgress:0.0f,frozenPitch:0.0f,prevHasAI:0b,frozenYawHead:0.0f,frozenEntityID:-1,frozenLimbSwingAmount:0.0f,frozenRenderYawOffset:0.0f,frozenSwingProgress:0.0f},"Fossils - Mammal Tracker":{EmbryoProgress:0,Pregnant:0b,Embryo:0}},"bettercombatmod:isecondhurttimer":0,"twilightforest:cap_shield":{permshields:0,tempshields:0}},HandDropChances:[0.085f,0.085f],PersistenceRequired:0b,Age:0,Motion:[0.0d,-0.0784000015258789d,0.0d],Leashed:0b,UUIDLeast:-8754414952582782957L,Health:50.0f,LeftHanded:0b,Air:300s,OnGround:1b,Dimension:0,Rotation:[105.822174f,0.0f],UpdateBlocked:0b,HandItems:[{},{}],ArmorDropChances:[0.085f,0.085f,0.085f,0.085f],UUIDMost:954215535086161071L,CustomName:"cow",Pos:[133.80610574864804d,8.0d,310.58994108738034d],Fire:**,ArmorItems:[{},{},{},{}],CanPickUpLoot:0b,HurtTime:0s}
复制代码
t
可生成出来还是无nbt的猪刷挂笼

下一页 最后一页