Talk:Function (Java Edition)

Redirect and deletion
So I see this redirect page has been marked for deletion. I agree that this page should not redirect to the "commands" page but why must it be deleted? Can't we just edit the redirect away? --Pepijn (talk) 21:07, 11 May 2017 (UTC)
 * Certainly, if you're prepared to write the article, but we can't leave a completely blank page. If you ARE ready to write the article, it would be very welcome and you can feel free to delete the delete template. It doesn't have to be complete or perfect, but it does need to follow the basic rules for editing the wiki. If you need some direction, start by reading Minecraft Wiki:Welcome. And thank you for being interested in helping out here! – Auldrick (talk &middot; contribs) 21:17, 11 May 2017 (UTC)
 * Alright, done (for now). I hope it's enough for now to justify this page's existence. A simple text based tutorial could probably be added and maybe even some notes on the more complex possibilities of this new system. --Pepijn (talk) 22:34, 11 May 2017 (UTC)

Singular vs plural
, at a discussion last year about singular versus plural page titles, the prevailing idea was to follow Wikipedia's convention to prefer singular titles, unless the page is in large part a list (Commands or Achievements for instance). I think according to that, it would be better to name the page Function. – Sealbudsman talk/contr 01:18, 13 May 2017 (UTC)


 * Alright, was not aware of that sorry. Moved everything to 'Function' now. --Pepijn (talk) 13:41, 13 May 2017 (UTC)

Commands run inside a function will obey maxCommandChainLength
I don't really understand what's "run inside a function" means. Is the total amount of commands run by functions inside of a tick set by this gamerule or may a function file contain up to maxCommandChainLength commands? Or does this mean, maximum recursion depth is maxCommandChainLength? | violine1101(Talk) 15:31, 18 May 2017 (UTC)


 * [I think] it basically means that Minecraft will start reading a function file and execute each command it sees until it reaches the limit set by the maxCommandChainLength gamerule, at which point it will stop reading that function and ignore the rest. I believe this includes functions called from within other functions. CreepaShadowz (talk) 08:17, 19 May 2017 (UTC)

Namespace defaulting to minecraft: in /gamerule gameLoopFunction ?
Does anyone know if the namespace will default to  if omitted from the   command? ~ CreepaShadowz (talk) 06:47, 30 May 2017 (UTC)
 * It does. The page already mentions that trying to call a function (using commands or advancements) without a namespace will make the namespace default to . --Pepijn (talk) 10:17, 1 June 2017 (UTC)

Server functions versus client functions
The article is written as if functions are not supported on the server. Client-side functions are saved in .../minecraft/saves/data/functions/; server-side functions are saved in .../world/data/functions/ This should be clarified in the article. Atypicaluser (talk) 16:25, 9 August 2017 (UTC)
 * I re-read the article 3 times now (seriously) and I'm not sure I agree. See: all it says is that the files need to be placed inside a specific directory and it points out this directory by showcasing the client runtime folder (.minecraft). I think this makes it obvious enough that the same thing would also apply for servers, also because it's safe to assume (in my opinion obviously!) that we would have explicitly mentioned it if it wouldn't work on servers. Another thing to note is that data/functions gets automatically created on servers as well (though this obviously won't help for existing worlds). I'll still give this some more thought, but as said: not sure it's really needed - ShelLuser (talk) 03:02, 21 August 2017 (UTC)


 * Client-side functions are not saved in .../minecraft/saves/data/functions/, they're saved in .../minecraft/saves/ /data/functions/. Basically the same as with servers ( /data/functions/). So it's not needed in my opinion --Pepijn (talk) 19:24, 21 August 2017 (UTC)

Add mention of color codes?
Functions also allow you to use color codes in order to add colors to custom names and lore on items. Because this code is the same as those used in books (§) I'm wondering if we should mention this option here as well? Note that this only works if you 'escape' the character with another high ascii character (Â which is made using alt-0194 on Windows) or if you save the function in UTF-8 (as already suggested on the page itself). - ShelLuser (talk) 03:02, 21 August 2017 (UTC)


 * Maybe, but it's not like functions were specifically designed to allow this, it's just a consequence of them being text files. We could already use the section sign basically anywhere in the game using external tools. You could even call a function an "external tool" (bit of a stretch of course). It might be a good thing to add under ```Trivia```, but it would look weird in the main article IMO. --Pepijn (talk) 19:27, 21 August 2017 (UTC)