-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6cad8c
commit 052fd4e
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/main/java/gregtech/api/items/crafttweaker/CTItemUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package gregtech.api.items.crafttweaker; | ||
|
||
import crafttweaker.annotations.ZenRegister; | ||
import gregtech.api.items.metaitem.MetaOreDictItem; | ||
import gregtech.api.unification.material.info.MaterialIconSet; | ||
import gregtech.api.unification.ore.OrePrefix; | ||
import stanhebben.zenscript.annotations.ZenClass; | ||
import stanhebben.zenscript.annotations.ZenMethod; | ||
|
||
@ZenClass("mods.gregtech.item.ItemRegistry") | ||
@ZenRegister | ||
public class CTItemUtils { | ||
|
||
@ZenMethod("registerItem") | ||
public static void registerItem(String name, short id, int rgb, String materialIconSet, String orePrefix) { | ||
new MetaOreDictItem.OreDictValueItem( | ||
id, name, rgb, MaterialIconSet.valueOf(materialIconSet), OrePrefix.getPrefix(orePrefix)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters