mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +00:00
Cleanup and some changes...
This commit is contained in:
1 parent
a39ac3bd74
commit
7b6ec78cd7
125 files changed
+971
-955
No files matched your search
@@ -0,0 +1,68 @@
|
||||
package emt.util;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.api.research.ResearchPage.PageType;
|
||||
|
||||
public class EMTResearchItem extends ResearchItem {
|
||||
|
||||
public EMTResearchItem(String par1, String par2) {
|
||||
super(par1, "EMT");
|
||||
}
|
||||
|
||||
public EMTResearchItem(String rsName, AspectList tags, int x, int y, int z, ItemStack icon) {
|
||||
super(rsName, "EMT", tags, x, y, z, icon);
|
||||
}
|
||||
|
||||
public EMTResearchItem(String rsName, int x, int y, int z, ItemStack icon) {
|
||||
super(rsName, "EMT", new AspectList(), x, y, z, icon);
|
||||
}
|
||||
|
||||
public EMTResearchItem(String rsName, AspectList tags, int x, int y, int z, ResourceLocation icon) {
|
||||
super(rsName, "EMT", tags, x, y, z, icon);
|
||||
}
|
||||
|
||||
public EMTResearchItem(String rsName, int x, int y, int z, ResourceLocation icon) {
|
||||
super(rsName, "EMT", new AspectList(), x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getName() {
|
||||
return EMTTextHelper.localize("emt.rsname." + key);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getText() {
|
||||
return "[EMT] " + EMTTextHelper.localize("emt.tag." + key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResearchItem setPages(ResearchPage... pages) {
|
||||
for (ResearchPage page : pages) {
|
||||
|
||||
if (page.type == PageType.TEXT)
|
||||
page.text = "emt.text." + key + "." + page.text;
|
||||
|
||||
if (page.type == PageType.INFUSION_CRAFTING) {
|
||||
if (parentsHidden == null || parentsHidden.length == 0)
|
||||
parentsHidden = new String[] { "INFUSION" };
|
||||
else {
|
||||
String[] newParents = new String[parentsHidden.length + 1];
|
||||
newParents[0] = "INFUSION";
|
||||
for (int i2 = 0; i2 < parentsHidden.length; i2++)
|
||||
newParents[i2 + 1] = parentsHidden[i2];
|
||||
parentsHidden = newParents;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.setPages(pages);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user