Cuberite Forum
crafting items with names - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Discussion (https://forum.cuberite.org/forum-5.html)
+--- Thread: crafting items with names (/thread-2331.html)



crafting items with names - red9o8 - 01-23-2016

I know that you can change or add crafting recipes, but i was wondering if you can make it so you can craft items with names? For example, if i were to put two sticks on a crafting table, it would make a wooden sword with the name "basic wooden sword" where as if i put three sticks in the crafting table, it would make a wooden sword with the name "advanced wooden sword". Is this even possible?


RE: crafting items with names - Seadragon91 - 01-23-2016

Yes you can change the name of a item. Here is a link to the class cItem. Look at the member variables.

Example
local item = cItem(E_ITEM_BLAZE_ROD, 1)
item.m_CustomName = "A special blaze"



RE: crafting items with names - red9o8 - 01-24-2016

thanks =)