-
-
Notifications
You must be signed in to change notification settings - Fork 3
Adding matter values
As mentioned previously, you will be using json files to add custom values. Be sure to have a program like Notepad++ or VSCode installed for syntax highlighting, and you can use external validation tools (like this one) to check for correct syntax (and set json files to auto-open in whatever program you use).
Before starting, ensure that file extensions are enabled in File Explorer. To do so, open File Explorer, click the "view" tab, then check the box next to "File name extensions"
Important note: Due to the way the mod works, you will have to copy your locked
folder and rename the copy to value
before it can be used as both folders are required for matter calculations. This only applies when you zip up the pack to use it in-game. For now, just edit values in the locked
directory.
Navigate to the general
folder and create a new text file named after whatever item you're adding matter to. It's not required to prefix it with item_
, but you might want to do so just in case.
For this example, we'll add matter to Sawdust from the Thermal Series.
It's also good to do some quick arithmatic to see how matter values will divide, as the mod's core them reflects the real-life law of Conservation of Mass.
Example: Iron Ingots have 36 Metallic matter, and each Nugget has 4 Metalllic matter. 4*9 = 36, which ensures that players can't exploit the game to get Infinite ingots by processing Nuggets or what have you
After creating your json file, open it in a text editor with syntax highlighting (like one of the two listed at the top of this page).
Afterwards, open it & copy/paste the following into it:
{
"compounds": [
{
"type": "replication:earth",
"amount": 1
},
{
"type": "replication:organic",
"amount": 1
}
],
"mode": "ADDITIVE",
"targets": {
"type": "aequivaleo:item",
"data": {
"item": "thermal:sawdust",
"count": 1
}
}
}
This is a full example for how to add matter to any item in the game.
Now we will break down what each field means:
The top compounds
field is an array (denoted by []
), which holds multiple values (in this case, the matter types the item will have).
Each type
is followed by the matter and its amount. If we did this instead:
{
"type": "replication:nether",
"amount": 6
}
we would give the item 6 Nether matter instead of 1 Earth matter.
While you can have all eight matter types on a single item, it's best to avoid doing so as it can break the balance of the mod (but it is your modpack, so you may do as you see fit).
Each matter type uses their registry name, which will be a lowercase version of their localized name (the one you see in-game). You can also refer to this file to see the full list.
Since 8 Sawdust can be made by Pulverizing any Log, it contains 1 Earth and 1 Organic matter (as Logs have 8 of each)
The mode
field tells Replication what to do with these values:
* ADDITIVE: Adds a value to an item/tag
* DISABLED: Removes a value from an item/tag
* REPLACING: Replaces a value for an item/tag
Note that the value for this field must be in ALL-CAPS, but the mode
text should be lowercase (as seen in the above example)
Below that is the target
parameter, which holds the type
and data
fields.
type
denotes whether or not this file is an item or a tag. It won't require changing unless you copy an item file and change it to a tag, or change an existing item file to use a tag.
data
denotes the item (by registry name) and item count. The item count should generally stay at 1, but you might want to use 2 or more for items that are crafted fractionally.
In summary, our example file will do the following:
- Find and item called
sawdust
from the modthermal
- Add 1 Earth and 1 Organic to its value - but it will keep any existing values intact.
Note that modded items will not work if the mod is not loaded or if an item's registry name was changed. Before asking for help, check both of those to ensure the mod is installed and the registry name matches the in-game registry name.
There are several times when you'd want to add matter by tag instead of a single item (Replication itself does this for Cobblestone, Logs, Music Discs, and more)
The file structure for tags is slightly different, but uses the same fields (read the above section to see what each field does).
Here is an example of adding matter to tags:
{
"compounds": [
{
"type": "replication:precious",
"amount": 6
}
],
"mode": "ADDITIVE",
"targets": {
"type": "aequivaleo:tag",
"data": {
"count": 1,
"tagName": "ae2:all_certus_quartz",
"tagType": "minecraft:item"
}
}
}
This file will add 6 Precious matter to any item with the ae2:all_certus_quartz
tag - but first, we must whitelist the tag in the mod's config file.
You may have also noticed that the type
field is now aequivaleo:tag
instead of aequivaleo:item
, item
has been replaced by tagName
, and count
has been replaced by tagType
.
tagName
defines the tag that Replication will add matter to.
tagType
should generally stay with the default minecraft:item
, but can be changed if needed.
Before Replication actually adds matter though, we need to whitelist the tag we want to add matter to (for the above example, ae2:all_certus_quartz
).
Navigate to your modpack's config
folder, then open vanilla-aequivaleo.toml
. We suggest opening all toml
files in one of the text editors recommended at the start of the guide as it makes them more readable (do note that they won't support syntax highlighting without being customized though).
Near the top of the file is a section labeled [recipes.tags.recipes.tags]
with an array of tags within. Add whatever tag you're trying to customize into it (we recommend grouping them all at the end so it's easier to tell what's what)
Ensure that the tag is contained within the array (denoted by the []), then save the file.
You may now zip up the datapack and place it into your Open Loader config or world folder.
This concludes the guide for adding matter to items & tags.
If you aren't sure how to import a datapack, go here to find a guide for it:
Part 3: Adding your datapack to your world
If you would like to re-read the intro, you may go here:
If you would like to know how to view item tags and registry names, go to one of these pages: