aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/TC_ResearchPage_Wrapper.java
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-03-04 18:10:39 +0000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-03-04 18:10:39 +0000
commit8ead0095f30769b0c12d558953323d45a2790d6e (patch)
tree36fb314ace8d36603230560c390a1049b1484099 /src/Java/gtPlusPlus/xmod/thaumcraft/aspect/TC_ResearchPage_Wrapper.java
parent91371c9020ec10827653414d58dc7311b73ea686 (diff)
downloadGT5-Unofficial-8ead0095f30769b0c12d558953323d45a2790d6e.tar.gz
GT5-Unofficial-8ead0095f30769b0c12d558953323d45a2790d6e.tar.bz2
GT5-Unofficial-8ead0095f30769b0c12d558953323d45a2790d6e.zip
+ Added more Wrappers for TC.
- Removed some obsolete classes. $ Rewrote more TC code to be reflective.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/thaumcraft/aspect/TC_ResearchPage_Wrapper.java')
-rw-r--r--src/Java/gtPlusPlus/xmod/thaumcraft/aspect/TC_ResearchPage_Wrapper.java222
1 files changed, 222 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/TC_ResearchPage_Wrapper.java b/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/TC_ResearchPage_Wrapper.java
new file mode 100644
index 0000000000..256e9c19ed
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/thaumcraft/aspect/TC_ResearchPage_Wrapper.java
@@ -0,0 +1,222 @@
+package gtPlusPlus.xmod.thaumcraft.aspect;
+
+import java.util.List;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.crafting.FurnaceRecipes;
+import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.StatCollector;
+
+public class TC_ResearchPage_Wrapper {
+ public TC_PageType_Wrapper type;
+ public String text;
+ public String research;
+ public ResourceLocation image;
+ public TC_AspectList_Wrapper aspects;
+ public Object recipe;
+ public ItemStack recipeOutput;
+
+ public TC_ResearchPage_Wrapper(String text) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = text;
+ }
+
+ public TC_ResearchPage_Wrapper(String research, String text) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.TEXT_CONCEALED;
+ this.research = research;
+ this.text = text;
+ }
+
+ public TC_ResearchPage_Wrapper(IRecipe recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.NORMAL_CRAFTING;
+ this.recipe = recipe;
+ this.recipeOutput = recipe.getRecipeOutput();
+ }
+
+ public TC_ResearchPage_Wrapper(IRecipe[] recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.NORMAL_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(IArcaneRecipe[] recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.ARCANE_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(CrucibleRecipe[] recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(InfusionRecipe[] recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.INFUSION_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(List recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.COMPOUND_CRAFTING;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(IArcaneRecipe recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.ARCANE_CRAFTING;
+ this.recipe = recipe;
+ this.recipeOutput = recipe.getRecipeOutput();
+ }
+
+ public TC_ResearchPage_Wrapper(CrucibleRecipe recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.CRUCIBLE_CRAFTING;
+ this.recipe = recipe;
+ this.recipeOutput = recipe.getRecipeOutput();
+ }
+
+ public TC_ResearchPage_Wrapper(ItemStack input) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.SMELTING;
+ this.recipe = input;
+ this.recipeOutput = FurnaceRecipes.smelting().getSmeltingResult(input);
+ }
+
+ public TC_ResearchPage_Wrapper(InfusionRecipe recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.INFUSION_CRAFTING;
+ this.recipe = recipe;
+ if (recipe.getRecipeOutput() instanceof ItemStack) {
+ this.recipeOutput = (ItemStack) recipe.getRecipeOutput();
+ } else {
+ this.recipeOutput = recipe.getRecipeInput();
+ }
+
+ }
+
+ public TC_ResearchPage_Wrapper(InfusionEnchantmentRecipe recipe) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.INFUSION_ENCHANTMENT;
+ this.recipe = recipe;
+ }
+
+ public TC_ResearchPage_Wrapper(ResourceLocation image, String caption) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.IMAGE;
+ this.image = image;
+ this.text = caption;
+ }
+
+ public TC_ResearchPage_Wrapper(TC_AspectList_Wrapper as) {
+ this.type = TC_PageType_Wrapper.TEXT;
+ this.text = null;
+ this.research = null;
+ this.image = null;
+ this.aspects = null;
+ this.recipe = null;
+ this.recipeOutput = null;
+ this.type = TC_PageType_Wrapper.ASPECTS;
+ this.aspects = as;
+ }
+
+ public String getTranslatedText() {
+ String ret = "";
+ if (this.text != null) {
+ ret = StatCollector.translateToLocal(this.text);
+ if (ret.isEmpty()) {
+ ret = this.text;
+ }
+ }
+
+ return ret;
+ }
+} \ No newline at end of file