CC: Tweaked

CC: Tweaked

42M Downloads

Custom APIs not loading via DataPack

BartAlcorn opened this issue ยท 7 comments

commented
  • Minecraft version 1.14.4
  • Forge version 1.14.4-28.1.96
  • CC: Tweaked version cc-tweaked-1.14.4-1.85.1
  • Detailed reproduction steps: sometimes I can spot a bug pretty easily, but often it's much more obscure. The more information I have to help reproduce it, the quicker it'll get fixed.

APIs in the APIs folder (saves//datapacks//data/computercraft/rom/apis) do not load, nor are even visible when the dir is listed.

Files in the programs folder are available and other than not having access to the custom APIS, work as intended.

Autorun works (saves//datapacks//data/computercraft/rom/autorun/autorun.lua)

Only APIs seems to be negatively affected. These same APIs worked worked in a resource pack under MC 1.12.2 & ComputerCraft1.80pr1

commented

I'm afraid I'm unable to reproduce this. Would you be able to attach your data pack, and your latest.log file?

commented

API's are deprecated, use modules instead.

That said though, I would expect it to still work.

commented

Moving to use the Modules approach worked, but I discovered that filenames MUST be all lower case.

Is that documented somewhere? Could CamelCase not be allowed (for readability sake)?

commented

Ahhh. As we're using data packs, files must obey the same restrictions as any other Minecraft resource. I don't think this is the end of the world, as Lua generally uses snake_case rather than PascalCase.

That said, the behaviour is definitely a little confusing. It should print something to the log, but I realise most people won't check that. I'm not quite sure how the best way to handle this would be - we could roll our own resource loading code which piggy backs on top of Minecraft's, but that's going to involve an awful lot of reflection :/.

commented

I really should have reviewed the DataPack documentation. I took a self written resource pack that worked under MC 1.12 and CC 1.80 and a hammer...

commented

@SquidDev could you have the mod put a message into the chat when it loads a malformed datapack with lua files in?

commented

Sadly not - the error is caught within Minecraft code, so I don't even knew about it.

@BartAlcorn Yeah, sorry - there's a lot of changes from 1.12 to 1.13+, and not all of them are well documented.