Skip to content

Customization Guide

Emily Rose Ploszaj edited this page Jul 9, 2023 · 5 revisions

Customization Guide

As a modpack or resource pack creator, you might want to integrate with mods in your modpack more tightly, or change their integration to better suit your progression. This sidebar subsection for modpack and resource pack creators has adequate information for how to achieve some of these goals. Here are some basic concepts.

Stacks

In several locations, you will be asked to specify a "stack" for EMI. This can be something like an item or fluid. The easiest way to specify these is as a string, in the format [type]:[namespace]:[path], for example, item:minecraft:diamond is the minecraft:diamond item. You can also add nbt at the end, for example, item:minecraft:stone{SomeNbt:"Some String"}. You can also specify tags with with a # prefix, such as #item:minecraft:logs.

However, if you need more than a type, id, and nbt, you'll want to use a full json object with the desired fields below. Only type and id are required fields. Not every stack type will understand every field.

Key Value
type Required. The type of stack, in vanilla, one of item or fluid. Other mods may add different types of stacks
id Required. The ID of the given stack. minecraft:stone for stone, for example
nbt The nbt of a stack, as a string
amount The amount of a stack, number of items, volume of a fluid, etc
chance A value from 0 to 1 representing the "chance" that a resource will get consumed or produced
remainder Another stack string or object that represents this stack's remainder

Tags also have a unique registry key, determining the registry the tag belongs to, such a item or fluid.

An example of a long form stack

{
  "type": "item",
  "id": "minecraft:dirt",
  "amount": 4,
  "nbt": "{Foo:2}",
  "chance": 0.5,
  "remainder": "item:minecraft:stone"
}