MCreator 2023.4: Workspace element usages system

Published by Klemen on

MCreator 2023.4 will be introducing a new system to look for usages/references between different workspace elements. This system will also make sure that the element you are deleting is no longer being used by some other workspace elements. More in the article!

Mod element usage detection

The most important part of this feature is its ability to detect where a particular mod element is being used. For example, you have a recipe ABC that as a result gives a block DEF. If you check the usages of block DEF, it will show you recipe ABC, because this recipe uses/references block DEF. If you deleted DEF, recipe ABC would break because it still references the now-deleted block DEF. This system detects such cases and warns you, which helps with making sure to not break the workspace when deleting workspace mod elements.

In the video below, you can see this system in action. We try to delete a block mod element, and we are presented with a warning that shows this block is still being used by some recipes, another block, and within a tag.

The new MCreator mod element search usages system demo

Another use example of this is checking workspace structure. In the video below, you can see us selecting some mod elements and then pressing Ctrl+Shift+F. As a result, we are shown with a list of all mod elements referencing the selected mod elements, which helps us understand the structure and relations between mod elements in the workspace.

The new MCreator mod element search usages system demo

Workspace resources usage detection

The system is not limited to mod elements. You can use this system to check where a certain texture is being used. In the video below, you can see us checking where a group of textures is being used. As a result, a dialog showing all mod element references to selected textures is shown. Similarly, you are warned if the texture you are deleting is still in use, which can help prevent broken texture references in your mod from happening.

The new MCreator mod element search usages system demo

In the video below, you can see another example of this feature, where we check where a selected Minecraft JSON model is being used. We can see the selected 3D model is being used by two blocks. With a click, we can also open said mod element and modify the reference, if needed.

The new MCreator mod element search usages system demo

Other usage detections

This system also works with other resources such as sounds and structures. It also works on non-resource types, meaning you can also check references of variables and localization keys. We have made sure the system is plugin-compatible, so plugins can also declare places where references can appear in plugin mod element, or even declare their own reference types.

Short news format

This is our first article of such type. We call it short news format. If you like this format of feature announcements with usage explanation, let us know in the comments, and we will consider posting more of such articles in the future :)

Share this on:

Comments

Hello there,
This is just a question or some kind of request :

Is it possible to make a .deb(Debian packages) version for mcreator ?

This really changes MCreator as a whole and makes things 10x easier! Great features are coming again c:

Also I love the idea of quickreads to explain features in more detail lol



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.