NBT-API

NBT-API

98.9k Downloads

Question: How to add CanPlaceOn multiple items.

BingYanchi opened this issue ยท 1 comments

commented

/give @s minecraft:stone{CanPlaceOn: ["minecraft:grass_block", "minecraft:glass"]}

I don't see an example in the documentation and I don't know how to do it.

Can you tell me how to do the items in the above command?

commented

(Haven't tested it, just going from the example you sent)

List<String> canPlaceOn = nbti.getStringList("CanPlaceOn");
canPlaceOn.add("minecraft:grass_block");
canPlaceOn.add("minecraft:glass");