#Custom Tree Command

5 messages · Page 1 of 1 (latest)

rustic moat
#

Not modding necessarily, but I didn't see a better channel. How do I create a custom sapling? I just want a simple birch base with green leaves for a tree, but the commands I've pulled from the internet don't work. I've tried this:
/spawnitem sapling'{"stemName":"Birch","stemHueShift":0.0,"foliageName":"snowleafy","foliageHueShift":0.0}'
And it gives me a perfectly generic item. I went more basic and used a command directly from the guide:
/spawnitem sapling 1 '{"stemName":"pine","stemHueShift":0.0,"foliageName":"pine foliage","foliageHueShift":0.0}'
Same deal. More pgis. I checked the log and it states this:
[12:30:44.034] [Error] Could not instantiate item '[sapling, 1, {"foliageName":"pine foliage","stemHueShift":0,"stemName":"pine","foliageHueShift":0}]'. (LuaException) Error code 2, [string "/scripts/util.lua"]:549: attempt to concatenate a nil value (local 'directory')
stack traceback:
[C]: in metamethod '__concat'
[string "/scripts/util.lua"]:549: in field 'absolutePath'
[string "/items/buildscripts/buildsapling.lua"]:18: in function <[string "/items/buildscripts/buildsapling.lua"]:3>
Any idea on how to make this work? I'm not familiar with lua, or I'd check that script myself.

coarse anvil
#

I think birch is suppose to be all lowercase

rustic moat
#

Finally I'm back, just checked it, the game didn't like that either.

#

Okay, off to consult the log and Stackoverflow

rustic moat
#

Alright, I built the command from the base up, and
/spawnitem sapling 1 '{"stemName":"birch","foliageName":"greenleaves"}'
worked just fine. So I guess the coloring thing messes it up somehow. That's fine though, since I just wanted the base colors.