D
Deleted member 5254
Skript Version: dev37c
SkStuff: 1.6.4.1-fork-1.12
Okay, so I have figured out how to add NBT to an item. Basically what I am trying to figure out how to do is,
Create a spawner (check)
Give it to the player (check)
Change the spawner that was placed on the ground (help)
So THIS works:
YAY for that... but now I am trying to my damndest to figure out how to add NBT to a block
I placed a spawner, pulled the NBT and tried to add the same NBT back just for testing, and no go.
Here is my test
The error I get is:
The syntax in the docs is stated as:
I feel like I have tried everything. Does anyone have any clue how the heck to do this?
SkStuff: 1.6.4.1-fork-1.12
Okay, so I have figured out how to add NBT to an item. Basically what I am trying to figure out how to do is,
Create a spawner (check)
Give it to the player (check)
Change the spawner that was placed on the ground (help)
So THIS works:
code_language.skript:
command /test:
trigger:
give player spawner with nbt "{BlockEntityTag:{SpawnData:{id:""chicken""},SpawnCount:5,MinSpawnDelay:1,MaxSpawnDelay:2,Delay:1,MaxNearbyEntities:100,SpawnPotentials:[{Entity:{id:""chicken""},Weight:1}]},display:{Name:""chicken""}}"
YAY for that... but now I am trying to my damndest to figure out how to add NBT to a block
I placed a spawner, pulled the NBT and tried to add the same NBT back just for testing, and no go.
Here is my test
code_language.skript:
on right click on spawner:
set nbt of event-block to "{MaxNearbyEntities:6s,RequiredPlayerRange:16s,SpawnCount:4s,SpawnData:{id:""minecraft:cow""},MaxSpawnDelay:800s,Delay:150s,x:287,y:64,z:199,id:""minecraft:mob_spawner"",SpawnRange:4s,MinSpawnDelay:200s,SpawnPotentials:[{Entity:{id:""minecraft:cow""},Weight:1}]}"
code_language.skript:
[22:53:05 ERROR]: a types.compound can't be set to anything (test.sk, line 47: set nbt of event-block to "{MaxNearbyEntities:6s,RequiredPlayerRange:16s,SpawnCount:4s,SpawnData:{id:""minecraft:cow""},MaxSpawnDelay:800s,Delay:150s,x:287,y:64,z:199,id:""minecraft:mob_spawner"",SpawnRange:4s,MinSpawnDelay:200s,SpawnPotentials:[{Entity:{id:""minecraft:cow""},Weight:1}]}"')
code_language.skript:
nbt[[ ]tag[s]] of %entity/block/item%