Spawn a chest filled with items (like /spawnfullstockpile)?

Lara

Coal
Mod Dev
Messages
46
Likes
29
#1
Hello,
I wonder if it is possible to spawn a filled storage chest or stockpile with items predefined in a .cs file.
As a bridge technology till there is a real creative mode or creative mod. :)

Because /spawnfullstockpile does it, I guess this is possible.
There is EckoTheDolphinItem.cs that shows how to spawn items into the players inventory.
And there is the chat command manual https://github.com/StrangeLoopGames/EcoModKit/wiki/Custom-Chat-Commands

But I’m not even able to set up a new chat command .cs to spawn something in my inventory. xD
 

Kronox

Coal
Trusted Dev
Mod Dev
Messages
43
Likes
26
#2
@Lara You should be able to add the item to the chest during the placement/initialization:
C#:
someStorageChest.GetComponent<StorageComponent>().Inventory.AddItem(someItem);
 
OP
OP
Lara

Lara

Coal
Mod Dev
Messages
46
Likes
29
#3
Thank you, Kronox. :)

I just don’t get the chat stuff right at the moment. xD
But I came up with a lot better idea, I will create a new crafting station with new recipes, thats something I already can do. :)
 
Top Bottom