Infusion thaum created

This commit is contained in:
EnderProyects committed 2023-04-06 05:13:10 +02:00
1 parent 74d78094a6
commit 4922d9738c
10 files changed
+186 -15

No files matched your search

+3 -2
View File
@@ -13,12 +13,13 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
modid = AdvancedBotany.modid,
name = "Advanced Botany",
version = AdvancedBotany.version,
dependencies = "required-after:Botania",
dependencies = AdvancedBotany.DEPENDENCIES,
guiFactory = "ab.client.core.handler.GuiABFactory")
public class AdvancedBotany {
public static final String modid = "AdvancedBotany";
public static final String version = "1.3.1.5";
public static final String version = "GRADLETOKEN_VERSION";
public static final String DEPENDENCIES = "required-after:Botania";
@Mod.Instance("AdvancedBotany")
public static AdvancedBotany instance;
@@ -6,7 +6,7 @@ import net.minecraftforge.common.AchievementPage;
import ab.api.AchievementAB;
import ab.api.AdvancedBotanyAPI;
import ab.utils.*;
// import ab.utils.*;
public class AchievementRegister {
@@ -30,7 +30,6 @@ import ab.common.block.tile.TileNidavellirForge;
import ab.common.core.handler.ConfigABHandler;
import ab.common.item.block.ItemBlockBase;
import ab.common.item.block.ItemBlockBoard;
import ab.utils.*;
import cpw.mods.fml.common.registry.GameRegistry;
public class BlockListAB {
@@ -7,7 +7,6 @@ import ab.common.entity.EntityManaVine;
import ab.common.entity.EntityNebulaBlaze;
import ab.common.entity.EntitySeed;
import ab.common.entity.EntitySword;
import ab.utils.*;
import cpw.mods.fml.common.registry.EntityRegistry;
public class EntityListAB {
@@ -9,7 +9,7 @@ import ab.common.block.subtile.SubTileArdentAzarcissus;
import ab.common.block.subtile.SubTileAspecolus;
import ab.common.block.subtile.SubTileDictarius;
import ab.common.block.subtile.SubTilePureGladiolus;
import ab.utils.*;
// import ab.utils.*;
public class FlowerRegister {
@@ -16,7 +16,6 @@ import ab.common.item.relic.ItemHornPlenty;
import ab.common.item.relic.ItemPocketWardrobe;
import ab.common.item.relic.ItemSphereNavigation;
import ab.common.item.relic.ItemTalismanHiddenRiches;
import ab.utils.*;
import cpw.mods.fml.common.registry.GameRegistry;
public class ItemListAB {
@@ -55,7 +55,6 @@ import ab.common.item.ItemCraftingPattern;
import ab.utils.*;
import ab.utils.LocalizationManager;
import ab.utils.OreDict;
import ab.utils.VersionInfo;
import cpw.mods.fml.common.registry.GameRegistry;
public class RecipeListAB implements IModHelper {
@@ -919,8 +918,8 @@ public class RecipeListAB implements IModHelper {
String category = "AB_botania";
ResearchCategories.registerCategory(
category,
new ResourceLocation(VersionInfo.ModID, "textures/gui/categories/forgotten.png"),
new ResourceLocation(VersionInfo.ModID, "textures/gui/categories/ABstars.png"));
new ResourceLocation("botania", "textures/gui/categories/forgotten.png"),
new ResourceLocation("botania", "textures/gui/categories/ABstars.png"));
ResearchItem TerraHoePage;
ResearchPage TerraHoePages;
@@ -1019,12 +1018,12 @@ public class RecipeListAB implements IModHelper {
ForgePage.setPages(ForgePages);
DestroyerPage.setPages(DestroyerPages);
TerraHoePage.setParents("TERRASTEEL");
AquaSwordPage.setParents("TERRASTEEL");
ManaChargerPage.setParents("TERRASTEEL");
// TerraHoePage.setParents("TERRASTEEL");
// AquaSwordPage.setParents("TERRASTEEL");
// ManaChargerPage.setParents("TERRASTEEL");
MithrillSwordPage.setParents("AquaSword");
ForgePage.setParents("TERRASTEEL");
DestroyerPage.setParents("TERRASTEEL", "Forge");
// ForgePage.setParents("TERRASTEEL");
DestroyerPage.setParents("Forge");
ResearchCategories.addResearch(TerraHoePage);
ResearchCategories.addResearch(AquaSwordPage);
+161
View File
@@ -0,0 +1,161 @@
package ab.utils;
import java.util.LinkedList;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.crafting.CrucibleRecipe;
import thaumcraft.api.crafting.ShapedArcaneRecipe;
import thaumcraft.api.crafting.ShapelessArcaneRecipe;
import thaumcraft.api.research.ResearchCategories;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchPage;
import ab.AdvancedBotany;
public class ResearchBuilder {
public static final String category = AdvancedBotany.modid;
public static final String prefix = "AB";
public final String key;
public int row = 0;
public int col = 0;
public int researchDifficulty = 1;
public int warp = 0;
public boolean mainline = false;
public String[] dependencies = new String[0];
public String[] hiddenDependencies = new String[0];
public AspectList researchAspects;
public LinkedList<ResearchPage> content = new LinkedList<>();
public ResourceLocation researchIcon = new ResourceLocation("botania", "textures/gui/categories/forgotten.png");
public ItemStack researchItemIcon = null;
public ResearchBuilder(String key) {
this.key = prefix + key;
}
public ResearchBuilder setResearchAspects(Aspect... aspects) {
AspectList list = new AspectList();
for (Aspect aspect : aspects) {
list.add(aspect, 1);
}
this.researchAspects = list;
return this;
}
// goes in units of whole tiles - have >= 2 difference to see lines
public ResearchBuilder setBookLocation(int x, int y) {
this.row = y;
this.col = x;
return this;
}
public ResearchBuilder setDifficulty(int difficulty) {
this.researchDifficulty = difficulty;
return this;
}
public ResearchBuilder setResearchIconItem(String mod, String filename) {
this.researchIcon = new ResourceLocation(mod, "textures/items/" + filename);
return this;
}
public ResearchBuilder setResearchIconBlock(String mod, String filename) {
this.researchIcon = new ResourceLocation(mod, "textures/blocks/" + filename);
return this;
}
public ResearchBuilder setResearchIconItemStack(ItemStack render) {
this.researchItemIcon = render;
return this;
}
public ResearchBuilder addSingleTextPage() {
content.add(new ResearchPage(this.key, category + "." + key + ".body"));
return this;
}
public ResearchBuilder addTextPages(int i18n_start, int count) {
for (int i = i18n_start; i < i18n_start + count; i++) {
content.add(new ResearchPage(this.key, category + "." + key + ".body_" + i));
}
return this;
}
public ResearchBuilder addCraftingRecipe(ItemStack out, AspectList aspects, Object... craftingRecipe) {
ShapedArcaneRecipe recipe = ThaumcraftApi.addArcaneCraftingRecipe(key, out, aspects, craftingRecipe);
content.add(new ResearchPage(recipe));
return this;
}
public ResearchBuilder addShapelessCraftingRecipe(ItemStack out, AspectList aspects, Object... craftingRecipe) {
ShapelessArcaneRecipe recipe = ThaumcraftApi
.addShapelessArcaneCraftingRecipe(key, out, aspects, craftingRecipe);
content.add(new ResearchPage(recipe));
return this;
}
public ResearchBuilder addCrucibleRecipe(AspectList aspects, ItemStack out, ItemStack in) {
CrucibleRecipe recipe = ThaumcraftApi.addCrucibleRecipe(key, out, in, aspects);
content.add(new ResearchPage(recipe));
return this;
}
public ResearchBuilder setWarp(int warp) {
this.warp = warp;
return this;
}
public ResearchBuilder setMainlineResearch() {
this.mainline = true;
return this;
}
public ResearchBuilder setDependencies(String... dependencies) {
this.dependencies = dependencies;
for (int i = 0; i < this.dependencies.length; i++) {
this.dependencies[i] = prefix + this.dependencies[i];
}
return this;
}
public ResearchBuilder setExternalDependencies(String... dependencies) {
this.hiddenDependencies = dependencies;
return this;
}
public ResearchBuilder apply(WithResearchBuilder lambda) {
lambda.apply(this);
return this;
}
public void commit() {
ResearchItem research;
if (researchItemIcon != null) {
research = new ResearchItem(key, category, researchAspects, col, row, researchDifficulty, researchItemIcon);
} else {
research = new ResearchItem(key, category, researchAspects, col, row, researchDifficulty, researchIcon);
}
research.setPages(content.toArray(new ResearchPage[0]));
research.parents = dependencies;
research.parentsHidden = hiddenDependencies;
research.setConcealed();
if (mainline) {
research.setSpecial();
}
ResearchCategories.addResearch(research);
if (warp > 0) {
ThaumcraftApi.addWarpToResearch(key, warp);
}
}
public interface WithResearchBuilder {
void apply(ResearchBuilder builder);
}
}
@@ -120,6 +120,19 @@ ab.sphereNavigation.founded=Found
abmisc.fateBoard.info0=The opportunity to play on this board, he dreamed of
abmisc.fateBoard.info1=every Elf, hoping to get a valuable prize...
//THAUMCRAFT
tc.research_category.AdvancedBotany=Advanced Botany
tc.research_category.AB_botania=Advanced Botany
tc.research_name.TerraHoe=Terra Hoe
tc.research_name.AquaSword=Blade of sea
tc.research_name.ManaCharger=Mana Charger
tc.research_name.MithrillSword=Blade of Space
tc.research_name.Forge=Forge of Nidavellir
tc.research_name.Destroyer=Material Destroyer
//ACHIEVEMENT
achievement.ab:fateBoard=Playing with fate
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB