diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-12-30 01:48:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-30 01:48:09 +0000 |
commit | 5af823e80a611090216375fecd3794d345446830 (patch) | |
tree | c54a19977b4a25cb86f54394eb9711aaf268efe3 /src/Java/gtPlusPlus/xmod/reliquary/item | |
parent | a731e939c6b9a70ac9fd444dbf06243f63f29c06 (diff) | |
parent | cc825179dce70a5f2c4a13730639e3300243e21a (diff) | |
download | GT5-Unofficial-5af823e80a611090216375fecd3794d345446830.tar.gz GT5-Unofficial-5af823e80a611090216375fecd3794d345446830.tar.bz2 GT5-Unofficial-5af823e80a611090216375fecd3794d345446830.zip |
Merge pull request #525 from alkcorp/DevTop
+ 6 Months of work, let's get the ball rolling.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/reliquary/item')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java b/src/Java/gtPlusPlus/xmod/reliquary/item/ReliquaryItems.java new file mode 100644 index 0000000000..d1fb67a7d3 --- /dev/null +++ b/src/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); + } + +} |