2020.2 - Locked code causes broken textures

Published by hawkster97 on Thu, 05/07/2020 - 18:18
Issue description



I am currently experiencing a bug with the 1.12.2 generator in 2020.2 that makes it almost unusable with locked code. When checking out a remote workspace, I do "Regenerate code and build", and then run the mod, and in Minecraft, I see purple/black textures in the GUI for all of my elements with locked code.


I have done some digging locally, and it seems this is a result of the proper files not being moved to src/main/resources/assets/[MODNAME]/models/item if the element has locked code.


It is worth noting that this bug only seems to affect the item texture in the inventory GUI of Minecraft. If you place the block, the texture and model are perfectly normal and work as intended.


I have tested this on MCreator for macOS and MCreator for Windows, both with fresh installs of MCreator 2020.2 and a fresh remote workspace checkout of the mod.


Issue comments

This bug will be fixed in 2020.3.

To "fix" this in 2020.2, you will need to edit .gitignore file to not ignore texture folders.

Since 2020.3 won't support the 1.12.2 generator, I'll need to go the .gitignore path. 


Is removing src/main/resources/assets/*/models/item good enough, or do you suggest any others?



If you don't mind having many files in repo, remove all src/ related ignores.

This is 2020.3 gitignore:

# Gradle build system ignores

# Other IDE related folders

# MCreator workspace

# Minecraft client/server files

Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.