mojira.dev
MC-121394

Functions Will Run If .mcfunction Is in the File Name Before the Extension

The bug:

Function files without the .mcfunction file extension can still be run as long as ".mcfunction" is in the name of the file. The actual extension of the file cannot be .txt, but anything else seems to work. The location of ".mcfunction" in the file name does not appear to matter.

How to reproduce:

  1. Go to a world that was saved in any of the affected versions of this bug and navigate to the "datapacks" folder.

  2. Download and install the supplied data pack. If you examine the function file provided, you'll notice that the function file's name is ".mcfunction.test".

  3. Load the world you installed the data pack on in an affected version and run the following command:

    /function bug:.mcfu

If the function succeeds in running, a red tellraw message should be said in the chat stating "This text shouldn't be said in chat, but it will anyways due to a bug". This function should not be able to run because it doesn't have the correct file extension, yet it still will.

Related issues

Attachments

Comments

migrated
[media]

ClassyElm123

(Unassigned)

Unconfirmed

Minecraft 17w43b

Retrieved