MCreator Meta Automation

Started by DaMastaCoda on

Topic category: Feature requests and ideas for MCreator

Last seen on 00:29, 25. Mar 2022
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
MCreator Meta Automation

Add a system that allows creating general automations for different MCreator things. The automations would be able to take in different parameters (string, number, logic, Mod Resource) and any Mod Resource parameters could be limited by type. These automations could then be run to automatically perform certain actions. Adding hidden Mod Resources generated by automations would be even better, and should be regenerated when the automation parameters are changed.

 

Example uses:
Generate compressed variants (Takes 1 Mod Resource input limited to BLOCK and creates 8 levels of compressed blocks and their recipes to/from); This would replace creating 8 similar blocks and 16 recipes (to/from) for a total of 1 click instead of 24 manually created objects. A very complex version could also generate compressed textures by applying a viginette layer to the original textures.

Adding many tiers of a similar thing: I'm currently working on a mod with 18 similar types of blocks, but each one needs its own procedure to do an almost identical thing, as well as a secondary "generator" block. An automation would allow me to define an input of a string and then automatically generate the two blocks, the compressed variants of the base block, and the procedures for the secondary blocks, all at once. With 8 compressed layers, this would mean 18 automations instead of 18 * (2 blocks + 3 recipes + 1 procedure + 8 compressed blocks + 16 compressed recipes) = 540 Mod Resources.

Last seen on 00:29, 25. Mar 2022
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here is an example of what…
Sat, 08/07/2021 - 01:29

Here is an example of what the automation would look like (if it was in a scripting language like TS rather than Java or the blocks)

function createCompressedVariants(blockType: MCreator.ModResources.Block) {
	let current = blockType;

	for (let i = 0; i < 8; i++) {
		const newBlock = blockType.createHiddenSubresource(
			MCreator.ModResources.Block,
			{
				id: 'compressed_' + i + '_' + blockType.id,
				textures: { mapping: 'default', bottom: current.textures.bottom },
			}
		);
		blockType.createHiddenSubresource(MCreator.ModResources.Recipe, {
			style: 'shaped',
			recipe: [
				[current, current, current],
				[current, current, current],
				[current, current, current],
			],
			result: newBlock,
		});
		blockType.createHiddenSubresource(MCreator.ModResources.Recipe, {
			style: 'unshaped',
			recipe: [newBlock],
			result: current,
			count: 9,
		});
		current = newBlock;
	}
}
Last seen on 00:29, 25. Mar 2022
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For non-hidden things, you'd…
Sat, 08/07/2021 - 02:46

For non-hidden things, you'd use MCreator.createResource instead of

resource.createHiddenSubresource
Last seen on 00:29, 25. Mar 2022
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
All the "packs" should be…
Sat, 08/07/2021 - 23:29

All the "packs" should be able to be reimplemented in this system, with support for using previously created block or items as a base. (i,e the wood one would have the current options, as well as the option to manually link manually created recipes and stair blocks.

Last seen on 00:29, 25. Mar 2022
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The tool pack is a perfect…
Sat, 08/07/2021 - 23:31

The tool pack is a perfect example of what I believe a modder should be able to easily add to their workspace with their own changes.