aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java
diff options
context:
space:
mode:
authorJohann Bernhardt <johann.bernhardt@tum.de>2021-12-12 19:38:06 +0100
committerJohann Bernhardt <johann.bernhardt@tum.de>2021-12-12 19:38:06 +0100
commit311ab89f93558233a40079f7cb16605b141b5346 (patch)
treec5f44ef47f441a57c5f57aa801f639c7879ed760 /src/main/java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java
parent896143b96132f5ac54aa8d8f7386f27487e5e530 (diff)
downloadGT5-Unofficial-311ab89f93558233a40079f7cb16605b141b5346.tar.gz
GT5-Unofficial-311ab89f93558233a40079f7cb16605b141b5346.tar.bz2
GT5-Unofficial-311ab89f93558233a40079f7cb16605b141b5346.zip
Move sources and resources
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java')
-rw-r--r--src/main/java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java160
1 files changed, 160 insertions, 0 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java b/src/main/java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java
new file mode 100644
index 0000000000..d1fb67a7d3
--- /dev/null
+++ b/src/main/java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java
@@ -0,0 +1,160 @@
+package gtPlusPlus.xmod.reliquary.item;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+
+public class ReliquaryItems {
+
+ private static Class<?> CLASS_MAIN = ReflectionUtils.getClass("xreliquary.Reliquary");
+ private static Field FIELD_CONTENT = ReflectionUtils.getField(CLASS_MAIN, "CONTENT");
+ private static Object OBJECT_CONTENT = ReflectionUtils.getFieldValue(FIELD_CONTENT);
+ private static Method METHOD_GETITEM = ReflectionUtils.getMethod(OBJECT_CONTENT, "getItem", new Class[] {String.class});
+
+ public static Item getItem(String name) {
+ try {
+ return (Item) METHOD_GETITEM.invoke(OBJECT_CONTENT, name);
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ }
+ return null;
+ }
+
+ public static ItemStack emptyVoidTear() {
+ return new ItemStack(getItem("void_tear_empty"), 1, 0);
+ }
+
+ public static ItemStack glowingWater() {
+ return new ItemStack(getItem("glowing_water"));
+ }
+
+ public static ItemStack emptyVial() {
+ return new ItemStack(getItem("potion"), 1, 0);
+ }
+
+ public static ItemStack emperorChalice() {
+ return new ItemStack(getItem("emperor_chalice"));
+ }
+
+ public static ItemStack infernalChalice() {
+ return new ItemStack(getItem("infernal_chalice"));
+ }
+
+ public static ItemStack witherSkull() {
+ return new ItemStack(Items.skull, 1, 1);
+ }
+
+ public static ItemStack roseBush() {
+ return new ItemStack(Blocks.double_plant, 1, 4);
+ }
+
+ public static ItemStack blackWool() {
+ return new ItemStack(Blocks.wool, 1, 15);
+ }
+
+ public static ItemStack lapis() {
+ return new ItemStack(Items.dye, 1, 4);
+ }
+
+ public static ItemStack gunPart(int i, int m) {
+ return new ItemStack(getItem("gun_part"), i, m);
+ }
+
+ public static ItemStack magazine(int m) {
+ return magazine(1, m);
+ }
+
+ public static ItemStack magazine(int i, int m) {
+ return new ItemStack(getItem("magazine"), i, m);
+ }
+
+ public static ItemStack bullet(int m) {
+ return bullet(1, m);
+ }
+
+ public static ItemStack bullet(int i, int m) {
+ return new ItemStack(getItem("bullet"), i, m);
+ }
+
+ public static ItemStack ingredient(int m) {
+ return new ItemStack(getItem("mob_ingredient"), 1, m);
+ }
+
+ public static ItemStack enderHeart() {
+ return ingredient(11);
+ }
+
+ public static ItemStack creeperGland() {
+ return ingredient(3);
+ }
+
+ public static ItemStack slimePearl() {
+ return ingredient(4);
+ }
+
+ public static ItemStack batWing() {
+ return ingredient(5);
+ }
+
+ public static ItemStack ribBone() {
+ return ingredient(0);
+ }
+
+ public static ItemStack witherRib() {
+ return ingredient(1);
+ }
+
+ public static ItemStack stormEye() {
+ return ingredient(8);
+ }
+
+ public static ItemStack fertileEssence() {
+ return ingredient(9);
+ }
+
+ public static ItemStack frozenCore() {
+ return ingredient(10);
+ }
+
+ public static ItemStack moltenCore() {
+ return ingredient(7);
+ }
+
+ public static ItemStack zombieHeart() {
+ return ingredient(6);
+ }
+
+ public static ItemStack infernalClaw() {
+ return ingredient(13);
+ }
+
+ public static ItemStack shellFragment() {
+ return ingredient(14);
+ }
+
+ public static ItemStack squidBeak() {
+ return ingredient(12);
+ }
+
+ public static ItemStack spiderFangs() {
+ return ingredient(2);
+ }
+
+ public static ItemStack heartPearl(int m) {
+ return new ItemStack(getItem("heart_pearl"), 1, m);
+ }
+
+ public static ItemStack nianZhu(int m) {
+ return new ItemStack(getItem("heart_zhu"), 1, m);
+ }
+
+ public static ItemStack emptyVoidSatchel() {
+ return new ItemStack(getItem("void_tear_empty"), 1, 0);
+ }
+
+}