This function returns block names from ids and metavals.
There is a explanatory README in the zip.
There is a explanatory README in the zip.
[Dev Tool] NamedBlocks
|
This function returns block names from ids and metavals.
There is a explanatory README in the zip.
Why would you need a plugin, when there's a set of API functions doing exactly the same? ItemToString(), ItemTypeToString() also accept cItem objects that represent blocks:
Code: local TypeDesc = ItemTypeToString(BlockType); -- returns e.g. "wood" or "torch"; no meta processing Sorry for the multiple edits, I had to look the functions up in the end, couldn't make it from the top of my head. Also of note: these API calls actually use the items.ini file, so they are kept up-to-date easily with the rest of MCServer.
01-10-2013, 12:12 AM
I didn't know about those functions, and I want formatted names with caps - I'm going to be giving these things to users.
01-10-2013, 07:48 PM
You can format the names in the ini file, then. Only I think it doesn't handle spaces, so you must not use a space in the block name.
01-10-2013, 11:47 PM
Doesn't matter, this works fine for me
I want spaces and caps, and for the users not to have to edit the items.ini file.
01-11-2013, 04:53 AM
You should provide a reverse lookup too, then, so that the names that you give out can be traced back into blocktypes and blockmetas.
01-11-2013, 05:36 AM
Yeah I guess so. That would require loads more work. But it would work
Just to check - there are no functions for it already are there?
01-11-2013, 05:38 AM
There are functions that translate strings returned by ItemToString() et al into blocktypes / cItem: BlockStringToType() and StringToItem()
01-11-2013, 05:50 AM
ok i guess i could do it for users... synonyms for blocks etc.]
But are people going to use it. I would but it would be inly a minor feature for BlockLogger and i doubt masses of people will use that feature.
01-11-2013, 06:30 AM
Quote:But are people going to use it. I would but it would be inly a minor feature for BlockLogger and i doubt masses of people will use that feature.I tend to believe similar function exist inside Handy... Doubt if it exist in released version though... Anyway, I'll add them to handy if they are missing and if you don't mind. Let's make a better dev plugin together! |
« Next Oldest | Next Newest »
|