1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
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);
}
}
|