You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TagPrefixes are GTCEu Modern's way of streamlining applying item and block tags to Materials, along with some other
11
8
functions. The `TagPrefix` class, available for use in startup and server scripts, contains a number of predefined
12
-
TagPrefixes that associate potentially everything from drill heads to flawless gemstones with a material.
9
+
prefixes that associate potentially everything from drill heads to flawless gemstones with a material.
13
10
14
11
A common and easy-to-understand example is `TagPrefix.ingot`, which associates with all Materials that have an
15
-
IngotProperty and thus an associated ingot item, including custom ones defined via KubeJS.
16
-
TagPrefixes provide localization, item and block tagging, and influence many crafting recipes, and are integral to the
17
-
functioning of GTCEu's material definition system.
12
+
IngotProperty and thus an associated ingot item, including custom ones defined by addons or KubeJS.
13
+
14
+
TagPrefixes provide localization, item and block tagging, influence many crafting recipes, and are integral to the
15
+
functioning of GregTech's material definition system.
18
16
19
-
!!! tip "What TagPrefixes are there?"
20
-
A list of all available TagPrefixes can be found in GTCEu Modern's GitHub, in the class `TagPrefix`. You can also quickly navigate to GTM's classes by in your External Libraries
17
+
!!! tip "What TagPrefixes exist by default?"
18
+
A list of all available TagPrefixes can be found in GTCEu Modern's GitHub, in the class [TagPrefix](https://github.com/GregTechCEu/GregTech-Modern/blob/1.20.1/src/main/java/com/gregtechceu/gtceu/api/data/tag/TagPrefix.java). You can also quickly navigate to GTM's classes in your External Libraries
21
19
22
20
23
21
## What is `.setIgnored()`?
24
22
25
-
While trawling through GTCEu Modern's codebase, or simply by playing Minecraft, you may have noticed that GTCEu Modern
26
-
treats some vanilla materials differently. For example, iron ingots are a vanilla item, yet GTCEu Modern does not create
27
-
a duplicate iron ingot, as its Material definition would suggest it is meant to do.
23
+
While trawling through GTM's codebase, or simply by playing Minecraft, you may have noticed that some vanilla materials are treated differently. For example, iron ingots are added by vanilla, and GTM does not create a duplicate iron ingot, as its Material definition would suggest.
24
+
25
+
Instead, the Material entry for iron treats the vanilla iron ingot as the material's ingot, and thus produces no duplicates.
28
26
29
-
Instead, the GTCEu Modern Material entry for iron treats the vanilla iron ingot as the material's ingot, and thus
30
-
produces no duplicates.
31
27
This functionality is governed by TagPrefixes, and can also be harnessed by addon developers for their own custom items, or
32
-
when writing compatibility between GTCEu Modern and another mod.
28
+
when writing compatibility between GregTech and other mods.
33
29
34
30
35
-
## Okay, but how do I use this?
31
+
###Okay, but how do I use this?
36
32
37
-
The material modification event occurs in Minecraft's boot sequence after Material registration is finalized, but before
33
+
`MaterialModificationEvent` occurs in Minecraft's boot sequence after Material registration is finalized, but before
38
34
the Material registry is closed; you won't be able to define any new Materials using it.
39
35
40
36
The following calls are available for each TagPrefix:
All TagPrefixes added by GTM and their definitions can be viewed in the [TagPrefix class](https://github.com/GregTechCEu/GregTech-Modern/blob/1.20.1/src/main/java/com/gregtechceu/gtceu/api/data/tag/TagPrefix.java)
0 commit comments