-
Notifications
You must be signed in to change notification settings - Fork 71
/
RotaryNames.java
196 lines (161 loc) · 6.94 KB
/
RotaryNames.java
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/*******************************************************************************
* @author Reika Kalseki
*
* Copyright 2017
*
* All rights reserved.
* Distribution of the software in any form is only allowed with
* explicit, prior permission from the owner.
******************************************************************************/
package Reika.RotaryCraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import Reika.DragonAPI.DragonOptions;
import Reika.DragonAPI.ModRegistry.ModOreList;
import Reika.RotaryCraft.Registry.GearboxTypes;
import Reika.RotaryCraft.Registry.GearboxTypes.GearPart;
import Reika.RotaryCraft.Registry.ItemRegistry;
public class RotaryNames {
private static final String[] engineNames = {
"engine.dc", "engine.wind", "engine.steam", "engine.gas", "engine.ac", "engine.sport",
"engine.hydro", "engine.micro", "engine.jet"
};
private static final String[] advGearItemNames = {
"advgear.worm", "advgear.cvt", "advgear.coil", "advgear.hi"
};
private static final String[] hydraulicItemNames = {
"hydraulic.pump", "hydraulic.turbine"
};
private static final String[] liquidNames = {
"fluid.rc lubricant", "fluid.rc jet fuel", "fluid.rc ethanol", "fluid.rc liquid nitrogen", "fluid.molten hsla"
};
private static final String[] canolaNames = {
"canola.seed", "canola.dense", "canola.husk"
};
public static final String[] enginePartNames = {
"crafting.impeller", "crafting.compressor", "crafting.turbine", "crafting.diffuser", "crafting.combustor", "crafting.cylinder",
"crafting.radiator", "crafting.condenser", "crafting.goldcoil", "", "", "",
"", "crafting.paddle", "", "crafting.ignition", "", "crafting.compoundcompress",
"crafting.alucylinder", "crafting.highcombustor"
};
public static final String[] shaftPartNames = {
"crafting.panel", "crafting.ingot", "", "crafting.mount", "", "",
"", "", "", "crafting.scrap", "crafting.ironscrap",
"", "", "", "", "crafting.worm"
};
public static final String[] miscPartNames = {
"crafting.barrel", "crafting.lens", "crafting.power", "crafting.heatcore", "crafting.lim", "crafting.prop", "crafting.hub",
"crafting.mirror", "crafting.generator", "crafting.accel", "crafting.turretbase", "crafting.aiming", "crafting.compound",
"crafting.bedcoil", "crafting.chain", "crafting.beddrill"
};
public static final String[] borerPartNames = {
"crafting.drill", "crafting.pressure", "crafting.radar", "crafting.sonar", "crafting.pcb", "crafting.screen", "crafting.mixer",
"crafting.saw", "",
"crafting.belt", "crafting.ballbearing", "crafting.brake", "crafting.coil",
};
public static final String[] blockNames = {
"block.steel", "block.anthra", "block.lonsda", "block.shield", "block.bedrockingot", "block.coke"
};
public static final String[] powderNames = {
"misc.netherdust", "misc.tar", "misc.sludge", "misc.sawdust", "misc.beddust", "misc.salt", "misc.nh4" , "misc.agi",
"misc.alum", "misc.flour", "misc.coaldust", "misc.dryice", "misc.redgolddust", "misc.compost", "misc.silicondust",
"misc.mulch", "misc.cleansludge"
};
public static final String[] interfaceNames = {
"interface.slipperycomb", "interface.slipperypropolis", "interface.gearcast", "interface.panelcast", "interface.shaftcast",
"interface.propcast", "interface.drillcast",
};
public static final String[] extractNames = {
"extract.coaldust", "extract.irondust", "extract.golddust", "extract.reddust",
"extract.bluedust", "extract.diadust", "extract.greendust", "extract.quartzdust",
"extract.coalslurry", "extract.ironslurry", "extract.goldslurry", "extract.redslurry",
"extract.blueslurry", "extract.diaslurry", "extract.greenslurry", "extract.quartzslurry",
"extract.coalsolu", "extract.ironsolu", "extract.goldsolu", "extract.redsolu",
"extract.bluesolu", "extract.diasolu", "extract.greensolu", "extract.quartzsolu",
"extract.coalflakes", "extract.ironflakes", "extract.goldflakes", "extract.redflakes",
"extract.blueflakes", "extract.diaflakes", "extract.greenflakes", "extract.quartzflakes",
"extract.silverflakes", "extract.tungstenflakes"
};
public static final String[] compactNames = {
"misc.anthra", "misc.prisma", "misc.lonsda", "misc.bedingot", "misc.alingot", "misc.wingot", "misc.redgoldingot", "misc.agingot",
"misc.coke", "misc.springingot", "misc.silicon", "misc.alualloy", "misc.tungalloy"
};
public static final String[] pipeNames = {
"machine.hose", "machine.pipe", "machine.fuelline", "machine.spiller", "machine.valve", "machine.bypass", "machine.separation",
"machine.bedpipe"
};
private static String getName(String[] names, int i) {
return StatCollector.translateToLocal(names[i]);
}
/*
@Deprecated
public static String getGearboxName(int i) {
String mat = MaterialRegistry.matList[i%MaterialRegistry.matList.length].getName();
String ratio = gearboxRatios[i/5];
String name = MachineRegistry.GEARBOX.getName();
return mat+" "+ratio+" "+name;
}
@Deprecated
public static String getGearUnitName(int i) {
MaterialRegistry[] mats = {MaterialRegistry.WOOD, MaterialRegistry.STONE, MaterialRegistry.DIAMOND, MaterialRegistry.BEDROCK};
String mat = mats[i%4].getName();
String ratio = gearUnitRatios[i/5];
return mat+" "+ratio+" "+StatCollector.translateToLocal("crafting.gearunit");
}
*/
public static String getName(String tag, boolean tech) {
String sg = StatCollector.translateToLocal(tag);
if (tech && DragonOptions.DEBUGMODE.getState())
sg += " (Technical Block)";
return sg;
}
public static String getBucketName(int i) {
String liq = StatCollector.translateToLocal(liquidNames[i]);
String item = StatCollector.translateToLocal("item.rcbucket");
return liq+" "+item;
}
public static String getEngineName(int i) {
return getName(engineNames, i);
}
public static String getAdvGearName(int i) {
return getName(advGearItemNames, i);
}
public static String getHydraulicName(int i) {
return getName(hydraulicItemNames, i);
}
public static int getNumberAdvGearTypes() {
return advGearItemNames.length;
}
public static int getNumberEngineTypes() {
return engineNames.length;
}
public static int getNumberHydraulicTypes() {
return hydraulicItemNames.length;
}
public static String getModExtractName(int dmg) {
String base = ModOreList.oreList[dmg/4].displayName;
switch(dmg%4) {
case 0:
return base+" Dust";
case 1:
return base+" Slurry";
case 2:
return base+" Solution";
case 3:
return base+" Flakes";
default:
return base;
}
}
public static String getModIngotName(int dmg) {
return ModOreList.oreList[dmg].displayName+" "+ModOreList.oreList[dmg].getTypeName();
}
public static String getCanolaName(int dmg) {
return getName(canolaNames, dmg);
}
public static String getGearPartName(int dmg) {
ItemStack is = ItemRegistry.GEARCRAFT.getStackOfMetadata(dmg);
GearboxTypes material = GearboxTypes.getMaterialFromCraftingItem(is);
return GearPart.list[is.getItemDamage()%16].getLocalizedName(material);
}
}