Merge pull request #5 from EnderProyects/feature/advanced_botany_infu

Feature/advanced botany
This commit is contained in:
Martin Robertz authored and GitHub committed 2023-04-08 23:32:35 +02:00
commit 5d2e8220e3
13 files changed
+775 -99

No files matched your search

+2 -1
View File
@@ -1,7 +1,8 @@
dependencies {
api('com.github.GTNewHorizons:Botania:1.9.2-GTNH:dev')
api('com.github.GTNewHorizons:Botanic-horizons:1.0.14-GTNH:dev')
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.41.254:dev')
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.42.36:dev')
api('com.github.GTNewHorizons:Baubles:1.0.1.14:dev')
compileOnly("com.github.GTNewHorizons:CodeChickenLib:1.1.5.3:dev")
compileOnly("com.github.GTNewHorizons:CodeChickenCore:1.1.5:dev")
+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;
@@ -9,20 +9,23 @@ import ab.common.lib.register.BlockListAB;
import ab.common.lib.register.EntityListAB;
import ab.common.lib.register.FlowerRegister;
import ab.common.lib.register.ItemListAB;
import ab.common.lib.register.RecipeListAB;
import ab.common.minetweaker.MineTweakerConfig;
import ab.utils.CraftingManager;
import ab.utils.ModHelperManager;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
@SuppressWarnings("unused")
public class CommonProxy {
public void preInit(FMLPreInitializationEvent event) {
BlockListAB.init();
ItemListAB.init();
AchievementRegister.init();
ModHelperManager.preInit();
EntityListAB.init();
FlowerRegister.init();
ConfigABHandler.loadConfig(event.getSuggestedConfigurationFile());
@@ -30,11 +33,13 @@ public class CommonProxy {
public void init(FMLInitializationEvent event) {
NetworkRegistry.INSTANCE.registerGuiHandler(AdvancedBotany.instance, new GuiHandler());
RecipeListAB.init();
NetworkHandler.registerPackets();
ModHelperManager.init();
}
public void postInit(FMLPostInitializationEvent event) {
ModHelperManager.postInit();
CraftingManager.setupCrafting();
ConfigABHandler.loadPostInit();
if (Loader.isModLoaded("MineTweaker3")) MineTweakerConfig.registerMT();
}
@@ -5,15 +5,28 @@ import java.util.List;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import thaumcraft.*;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.crafting.InfusionRecipe;
import thaumcraft.api.research.*;
import thaumcraft.api.research.ResearchCategories;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchPage;
import thaumcraft.common.config.ConfigBlocks;
import thaumcraft.common.config.ConfigItems;
import vazkii.*;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.KnowledgeType;
import vazkii.botania.api.lexicon.LexiconCategory;
@@ -30,6 +43,7 @@ import vazkii.botania.common.lexicon.BLexiconEntry;
import vazkii.botania.common.lexicon.RLexiconEntry;
import vazkii.botania.common.lexicon.page.PageImage;
import vazkii.botania.common.lexicon.page.PageText;
import vazkii.botania.common.lib.LibOreDict;
import ab.api.AdvancedBotanyAPI;
import ab.api.recipe.RecipeAdvancedPlate;
import ab.api.recipe.RecipeAncientAlphirine;
@@ -38,9 +52,14 @@ import ab.api.recipe.lexicon.AlphirineCraftPage;
import ab.common.block.tile.TileLebethronCore;
import ab.common.core.handler.ConfigABHandler;
import ab.common.item.ItemCraftingPattern;
import ab.utils.*;
import ab.utils.LocalizationManager;
import ab.utils.OreDict;
import cpw.mods.fml.common.registry.GameRegistry;
public class RecipeListAB {
public class RecipeListAB implements IModHelper {
@SuppressWarnings("unused")
public static LexiconCategory categoryForgotten;
@@ -53,8 +72,13 @@ public class RecipeListAB {
public static RecipeAdvancedPlate manaStarRecipe;
public static RecipeAdvancedPlate terrasteelRecipe;
public static RecipeAdvancedPlate terrasteelBlockRecipe;
public static RecipeAdvancedPlate mithrillRecipe;
public static RecipeAdvancedPlate nebulaRecipe;
public static RecipeAdvancedPlate FlawlessManaDiamondRecipe;
public static RecipeAdvancedPlate ExquisiteManaDiamondRecipe;
public static RecipeAdvancedPlate FlawlessDragonstoneRecipe;
public static RecipeAdvancedPlate ExquisiteDragonstoneRecipe;
public static RecipePetals alphirineRecipe;
public static RecipePetals dictariusRecipe;
@@ -96,14 +120,44 @@ public class RecipeListAB {
public static LexiconEntry azartFlower;
public static LexiconEntry aquaSword;
public static ResearchPage TerraHoePages;
public static ResearchPage DestroyerPages;
public static ResearchPage MithrillSwordPages;
public static ResearchPage AquaSwordPages;
public static ResearchPage ForgePages;
public static ResearchPage ManaChargerPages;
public static KnowledgeType forgotten;
public static void init() {
public static final String Name = "Thaumcraft";
public void preInit() {}
public void init() {}
public void postInit() {
setupItemAspects();
setupCrafting();
setupResearch();
}
public static InfusionRecipe TerraHoe;
public static InfusionRecipe AquaSword;
public static InfusionRecipe ManaCharger;
public static InfusionRecipe MithrillSword;
public static InfusionRecipe Forge;
public static InfusionRecipe Destroyer;
public static void setupCrafting() {
relicInit();
BotaniaAPI.addCategory(categoryForgotten = new BLexiconCategory("forgotten", 5));
forgotten = BotaniaAPI.registerKnowledgeType("ab_forgotten", EnumChatFormatting.BLUE, false);
///////////////////////////////////////////////////////////////////////////////////////// Ancient Alphirine
///////////////////////////////////////////////////////////////////////////////////////// Recipes
lebethroneRecipe = AdvancedBotanyAPI.registerAlphirineRecipe(
new ItemStack(BlockListAB.blockLebethron),
new ItemStack(ModBlocks.dreamwood, 1, 0),
@@ -129,11 +183,14 @@ public class RecipeListAB {
new ItemStack(BlockListAB.blockBoardFate),
60);
///////////////////////////////////////////////////////////////////////////////////////// Forge of Nidavellir
///////////////////////////////////////////////////////////////////////////////////////// Recipes
mithrillRecipe = AdvancedBotanyAPI.registerAdvancedPlateRecipe(
new ItemStack(ItemListAB.itemABResource, 1, 0),
new ItemStack(ModItems.manaResource, 1, 5),
new ItemStack(ModItems.manaResource, 1, 14),
new ItemStack(ModBlocks.storage, 1, 0),
new ItemStack(ModItems.manaResource, 1, 18),
new ItemStack(ModBlocks.storage, 1, 1),
2500000,
0x25d6b7);
terrasteelRecipe = AdvancedBotanyAPI.registerAdvancedPlateRecipe(
@@ -152,12 +209,49 @@ public class RecipeListAB {
0x6bc9ec);
nebulaRecipe = AdvancedBotanyAPI.registerAdvancedPlateRecipe(
new ItemStack(ItemListAB.itemABResource, 1, 5),
new ItemStack(ModItems.manaResource, 1, 8),
new ItemStack(ModItems.rainbowRod),
new ItemStack(ModBlocks.storage, 1, 4),
new ItemStack(ItemListAB.itemABResource, 1, 1),
new ItemStack(BlockListAB.blockABStorage, 1, 0),
25000000,
0x8d16e0);
terrasteelBlockRecipe = AdvancedBotanyAPI.registerAdvancedPlateRecipe(
new ItemStack(ModBlocks.storage, 1, 1),
new ItemStack(ModItems.rune, 1, 8),
new ItemStack(ModBlocks.storage, 1, 0),
new ItemStack(ModBlocks.storage, 1, 3),
4500000,
0x29de21);
FlawlessManaDiamondRecipe = AdvancedBotanyAPI.registerAdvancedPlateRecipe(
OreDictionary.getOres("gemFlawlessManaDiamond").get(0),
new ItemStack(ModItems.manaResource, 1, 2),
new ItemStack(ModItems.manaResource, 1, 2),
new ItemStack(ModItems.manaResource, 1, 2),
250000,
0x1dab92);
ExquisiteManaDiamondRecipe = AdvancedBotanyAPI.registerAdvancedPlateRecipe(
OreDictionary.getOres("gemExquisiteManaDiamond").get(0),
OreDictionary.getOres("gemFlawlessManaDiamond").get(0),
OreDictionary.getOres("gemFlawlessManaDiamond").get(0),
new ItemStack(ModItems.manaResource, 1, 2),
250000,
0x1dab92);
FlawlessDragonstoneRecipe = AdvancedBotanyAPI.registerAdvancedPlateRecipe(
OreDictionary.getOres("gemFlawlessBotaniaDragonstone").get(0),
new ItemStack(ModItems.manaResource, 1, 9),
new ItemStack(ModItems.manaResource, 1, 9),
new ItemStack(ModItems.manaResource, 1, 9),
300000,
0xd6259d);
ExquisiteDragonstoneRecipe = AdvancedBotanyAPI.registerAdvancedPlateRecipe(
OreDictionary.getOres("gemExquisiteBotaniaDragonstone").get(0),
OreDictionary.getOres("gemFlawlessBotaniaDragonstone").get(0),
OreDictionary.getOres("gemFlawlessBotaniaDragonstone").get(0),
new ItemStack(ModItems.manaResource, 1, 9),
300000,
0xd6259d);
///////////////////////////////////////////////////////////////////////////////////////// Shaped Recipes
// Ancient alphirine recipe
ancientAlphirine = new BLexiconEntry("ancientAlphirine", categoryForgotten);
alphirineRecipe = BotaniaAPI.registerPetalRecipe(
ItemBlockSpecialFlower.ofType("ancientAlphirine"),
@@ -179,28 +273,41 @@ public class RecipeListAB {
new AlphirineCraftPage(ancientAlphirine, forgottenLandRecipe.getOutput(), ".alphirineCraft") })
.setIcon(ItemBlockSpecialFlower.ofType("ancientAlphirine"));
GameRegistry.addShapedRecipe(
new ItemStack(BlockListAB.blockABPlate),
new Object[] { "MPM", " F ", "BRB", Character.valueOf('F'), new ItemStack(Blocks.anvil),
Character.valueOf('M'), new ItemStack(ModBlocks.storage), Character.valueOf('P'),
new ItemStack(ModBlocks.terraPlate), Character.valueOf('B'),
new ItemStack(ItemListAB.itemABResource, 1, 3), Character.valueOf('R'),
new ItemStack(ModItems.rune, 1, 3) });
// Forge of Nidavellir recipe
advandedAgglomerationPlate = new BLexiconEntry("advancedPlate", categoryForgotten);
advandedAgglomerationPlate.setPriority().setKnowledgeType(forgotten)
.setLexiconPages(
new LexiconPage[] { new PageText("0"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()),
new AdvancedPlateCraftPage(
advandedAgglomerationPlate,
terrasteelRecipe.getOutput(),
".abCraft0"),
new AdvancedPlateCraftPage(
advandedAgglomerationPlate,
manaStarRecipe.getOutput(),
".abCraft1") })
advandedAgglomerationPlate.setPriority().setKnowledgeType(forgotten).setLexiconPages(
new LexiconPage[] { new PageText("0"),
new AdvancedPlateCraftPage(
advandedAgglomerationPlate,
terrasteelRecipe.getOutput(),
".abCraft0"),
new AdvancedPlateCraftPage(advandedAgglomerationPlate, manaStarRecipe.getOutput(), ".abCraft0"),
new AdvancedPlateCraftPage(
advandedAgglomerationPlate,
terrasteelBlockRecipe.getOutput(),
".abCraft1"),
new AdvancedPlateCraftPage(advandedAgglomerationPlate, mithrillRecipe.getOutput(), ".abCraft0"),
new AdvancedPlateCraftPage(advandedAgglomerationPlate, nebulaRecipe.getOutput(), ".abCraft0"),
new AdvancedPlateCraftPage(
advandedAgglomerationPlate,
FlawlessManaDiamondRecipe.getOutput(),
".abCraft0"),
new AdvancedPlateCraftPage(
advandedAgglomerationPlate,
FlawlessDragonstoneRecipe.getOutput(),
".abCraft0"),
new AdvancedPlateCraftPage(
advandedAgglomerationPlate,
ExquisiteManaDiamondRecipe.getOutput(),
".abCraft0"),
new AdvancedPlateCraftPage(
advandedAgglomerationPlate,
ExquisiteDragonstoneRecipe.getOutput(),
".abCraft0") })
.setIcon(new ItemStack(BlockListAB.blockABPlate));
// Natural mana spreader recipe
GameRegistry.addShapedRecipe(
new ItemStack(BlockListAB.blockABSpreader),
new Object[] { "WMW", "PSP", "WMW", Character.valueOf('M'),
@@ -214,6 +321,7 @@ public class RecipeListAB {
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) })
.setIcon(new ItemStack(BlockListAB.blockABSpreader));
// Lebethorn block variants recipes
addShapelessOreDictRecipe(
new ItemStack(BlockListAB.blockLebethron, 4, 1),
new Object[] { new ItemStack(BlockListAB.blockLebethron) });
@@ -222,14 +330,18 @@ public class RecipeListAB {
new ItemStack(BlockListAB.blockLebethron, 1, 2),
new Object[] { new ItemStack(BlockListAB.blockLebethron, 1, 1), new ItemStack(Items.wheat_seeds) });
IRecipe leb2 = getLastRecipe();
addShapelessOreDictRecipe(
new ItemStack(BlockListAB.blockLebethron, 1, 3),
new Object[] { new ItemStack(BlockListAB.blockLebethron), new ItemStack(Items.glowstone_dust) });
GameRegistry.addShapedRecipe(
new ItemStack(BlockListAB.blockLebethron, 4, 3),
new Object[] { "SLS", "LEL", "SLS", Character.valueOf('S'),
OreDictionary.getOres("ingotSteeleaf").get(0), Character.valueOf('E'),
new ItemStack(ModBlocks.pylon), Character.valueOf('L'),
new ItemStack(BlockListAB.blockLebethron, 1, 0) });
IRecipe leb3 = getLastRecipe();
GameRegistry.addShapedRecipe(
new ItemStack(BlockListAB.blockLebethron, 1, 4),
// Natural core recipe
new Object[] { "4W5", "WPW", "6W7", Character.valueOf('P'), new ItemStack(ModBlocks.pylon, 1, 1),
Character.valueOf('W'), new ItemStack(BlockListAB.blockLebethron), Character.valueOf('4'),
Character.valueOf('W'), new ItemStack(BlockListAB.blockLebethron, 1, 3), Character.valueOf('4'),
new ItemStack(ModItems.rune, 1, 4), Character.valueOf('5'), new ItemStack(ModItems.rune, 1, 5),
Character.valueOf('6'), new ItemStack(ModItems.rune, 1, 6), Character.valueOf('7'),
new ItemStack(ModItems.rune, 1, 7) });
@@ -247,18 +359,17 @@ public class RecipeListAB {
.multiblockPage(".structure", TileLebethronCore.makeMultiblockSet()) })
.setIcon(new ItemStack(BlockListAB.blockLebethron));
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemMihrillMultiTool),
new Object[] { " MB", " FM", "F ", Character.valueOf('F'), new ItemStack(ModItems.manaResource, 1, 3),
Character.valueOf('B'), new ItemStack(ModBlocks.livingwood), Character.valueOf('M'),
new ItemStack(ItemListAB.itemABResource) });
// AB Mithrill recipe
mithrill = new BLexiconEntry("mithrill", categoryForgotten);
mithrill.setKnowledgeType(forgotten).setLexiconPages(
new LexiconPage[] { new PageText("0"),
new AdvancedPlateCraftPage(mithrill, mithrillRecipe.getOutput(), ".abCraft"), new PageText("1"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) })
mithrill.setKnowledgeType(forgotten)
.setLexiconPages(
new LexiconPage[] { new PageText("0"),
new AdvancedPlateCraftPage(mithrill, mithrillRecipe.getOutput(), ".abCraft"),
new PageText("1"), })
.setIcon(new ItemStack(ItemListAB.itemMihrillMultiTool));
// Advanced mana containers recipe
GameRegistry.addShapedRecipe(
new ItemStack(BlockListAB.blockManaContainer),
new Object[] { "MGM", "LPL", "M3M", Character.valueOf('M'), new ItemStack(ItemListAB.itemABResource),
@@ -289,6 +400,7 @@ public class RecipeListAB {
new AlphirineCraftPage(manaContainer, advancedSparkRecipe.getOutput(), ".alphirineCraft") })
.setIcon(new ItemStack(BlockListAB.blockManaContainer));
// Mana crystal cube recipe
GameRegistry.addShapedRecipe(
new ItemStack(BlockListAB.blockManaCrystalCube),
new Object[] { "TST", "GWG", "DMD", Character.valueOf('D'), new ItemStack(ModBlocks.dreamwood),
@@ -304,24 +416,21 @@ public class RecipeListAB {
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) })
.setIcon(new ItemStack(BlockListAB.blockManaCrystalCube));
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemTerraHoe),
new Object[] { "TTL", "RW ", " W ", Character.valueOf('T'), new ItemStack(ModItems.manaResource, 1, 4),
Character.valueOf('L'), new ItemStack(ModItems.manaResource, 1, 18), Character.valueOf('W'),
new ItemStack(ModItems.manaResource, 1, 3), Character.valueOf('R'),
new ItemStack(ModItems.rune, 1, 2) });
// Terrahoe recipe
terraHoe = new BLexiconEntry("terraHoe", BotaniaAPI.categoryTools);
terraHoe.setLexiconPages(
new LexiconPage[] { new PageText("0"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) })
terraHoe.setLexiconPages(new LexiconPage[] { new PageText("0"), })
.setIcon(new ItemStack(ItemListAB.itemTerraHoe));
// Mithrill recipe
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemMithrillRing),
new Object[] { "LML", "MRM", "LML", Character.valueOf('M'), new ItemStack(ItemListAB.itemABResource),
Character.valueOf('L'), new ItemStack(ItemListAB.itemABResource, 1, 1), Character.valueOf('R'),
new ItemStack(ModItems.manaRingGreater) });
IRecipe ring1 = getLastRecipe();
// Nebula ring recipe
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemNebulaRing),
new Object[] { "LML", "MRM", "LML", Character.valueOf('M'),
@@ -336,34 +445,14 @@ public class RecipeListAB {
.setIcon(new ItemStack(ItemListAB.itemMithrillRing));
AdvancedBotanyAPI.registerFarmlandSeed(Blocks.nether_wart, 3);
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemManaFlower),
new Object[] { " F ", " M ", " R ", Character.valueOf('F'),
new ItemStack(ItemListAB.itemABResource, 1, 4), Character.valueOf('M'),
new ItemStack(ModItems.manaBottle), Character.valueOf('R'),
new ItemStack(ModItems.rune, 1, 8) });
manaFlower = new BLexiconEntry("manaFlower", categoryForgotten);
manaFlower.setKnowledgeType(forgotten)
.setLexiconPages(
new LexiconPage[] { new PageText("0"),
new AlphirineCraftPage(manaFlower, manaFlowerRecipe.getOutput(), ".alphirineCraft"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) })
.setIcon(new ItemStack(ItemListAB.itemManaFlower));
// Blade of space recipe
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemMithrillSword),
new Object[] { " M", "SM ", "WS ", Character.valueOf('S'),
new ItemStack(ItemListAB.itemABResource, 1, 6), Character.valueOf('T'),
new ItemStack(ModItems.terraSword), Character.valueOf('M'),
new ItemStack(ItemListAB.itemABResource), Character.valueOf('W'),
new ItemStack(ModItems.manaResource, 1, 3) });
mithrillSword = new BLexiconEntry("mithrillSword", categoryForgotten);
mithrillSword.setKnowledgeType(forgotten)
.setLexiconPages(
new LexiconPage[] { new PageText("0"), new PageText("1"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) })
.setLexiconPages(new LexiconPage[] { new PageText("0"), new PageText("1"), })
.setIcon(new ItemStack(ItemListAB.itemMithrillSword));
// Dictarius recipe
dictariusRecipe = BotaniaAPI.registerPetalRecipe(
ItemBlockSpecialFlower.ofType("dictarius"),
new ItemStack(ItemListAB.itemABResource, 1, 4),
@@ -383,6 +472,7 @@ public class RecipeListAB {
new LexiconPage[] { new PageText("0"),
new AdvancedPlateCraftPage(nebula, nebulaRecipe.getOutput(), ".abCraft") });
// Black hole box recipe
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemBlackHalo),
new Object[] { " E ", "DHD", " E ", Character.valueOf('E'), new ItemStack(ModItems.manaResource, 1, 7),
@@ -393,6 +483,7 @@ public class RecipeListAB {
new LexiconPage[] { new PageText("0"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) });
// Sphere of Attraction recipe
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemAntigravityCharm),
new Object[] { " G ", "GDG", "ERE", Character.valueOf('E'), new ItemStack(ModItems.manaResource, 1, 7),
@@ -406,6 +497,7 @@ public class RecipeListAB {
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) })
.setIcon(new ItemStack(ItemListAB.itemAntigravityCharm));
// Nebula blaze recipe
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemNebulaBlaze),
new Object[] { " N ", "MMN", "AMN", Character.valueOf('N'),
@@ -417,26 +509,21 @@ public class RecipeListAB {
new LexiconPage[] { new PageText("0"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) });
// Mana charger recipe
if (ConfigABHandler.hasManaCharger) {
GameRegistry.addShapedRecipe(
new ItemStack(BlockListAB.blockManaCharger),
new Object[] { "NLN", "MPM", " R ", Character.valueOf('N'),
new ItemStack(ItemListAB.itemABResource, 1, 1), Character.valueOf('L'),
new ItemStack(ModBlocks.livingrock), Character.valueOf('M'),
new ItemStack(ModBlocks.bellows), Character.valueOf('P'), new ItemStack(ModBlocks.pylon),
Character.valueOf('R'), new ItemStack(ModItems.rune, 1, 8) });
manaCharger = new BLexiconEntry("manaCharger", categoryForgotten);
manaCharger.setKnowledgeType(forgotten).setLexiconPages(
new LexiconPage[] { new PageText("0"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) });
manaCharger.setKnowledgeType(forgotten).setLexiconPages(new LexiconPage[] { new PageText("0"), });
}
///////////////////////////////////////////////////////////////////////////////////////// Nebula set recipes
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemNebulaHelm),
new Object[] { "RNR", "NHN", " E ", Character.valueOf('N'),
new ItemStack(ItemListAB.itemABResource, 1, 5), Character.valueOf('R'),
new ItemStack(ModItems.manaResource, 1, 7), Character.valueOf('H'),
new ItemStack(ModItems.terrasteelHelm), Character.valueOf('E'),
new ItemStack(ModItems.elementiumHelm), Character.valueOf('E'),
new ItemStack(ModItems.manaResource, 1, 8) });
IRecipe nHelm = getLastRecipe();
GameRegistry.addShapedRecipe(
@@ -444,7 +531,7 @@ public class RecipeListAB {
new Object[] { "RTR", "NHN", "ENE", Character.valueOf('N'),
new ItemStack(ItemListAB.itemABResource, 1, 5), Character.valueOf('R'),
new ItemStack(ModItems.manaResource, 1, 7), Character.valueOf('H'),
new ItemStack(ModItems.terrasteelChest), Character.valueOf('E'),
new ItemStack(ModItems.elementiumChest), Character.valueOf('E'),
new ItemStack(ModItems.manaResource, 1, 8), Character.valueOf('T'),
new ItemStack(ModItems.flightTiara, 1, 32767) });
IRecipe nChest = getLastRecipe();
@@ -453,7 +540,7 @@ public class RecipeListAB {
new Object[] { "ENE", "RHR", "NAN", Character.valueOf('N'),
new ItemStack(ItemListAB.itemABResource, 1, 5), Character.valueOf('R'),
new ItemStack(ModItems.manaResource, 1, 7), Character.valueOf('H'),
new ItemStack(ModItems.terrasteelLegs), Character.valueOf('E'),
new ItemStack(ModItems.elementiumLegs), Character.valueOf('E'),
new ItemStack(ModItems.manaResource, 1, 8), Character.valueOf('A'),
new ItemStack(ItemListAB.itemABResource, 1, 3) });
IRecipe nLegs = getLastRecipe();
@@ -462,7 +549,7 @@ public class RecipeListAB {
new Object[] { "RBR", "NHN", " E ", Character.valueOf('N'),
new ItemStack(ItemListAB.itemABResource, 1, 5), Character.valueOf('R'),
new ItemStack(ModItems.manaResource, 1, 7), Character.valueOf('H'),
new ItemStack(ModItems.terrasteelBoots), Character.valueOf('E'),
new ItemStack(ModItems.elementiumBoots), Character.valueOf('E'),
new ItemStack(ModItems.manaResource, 1, 8), Character.valueOf('B'),
new ItemStack(ModItems.speedUpBelt) });
IRecipe nBoots = getLastRecipe();
@@ -474,12 +561,14 @@ public class RecipeListAB {
BotaniaAPI.internalHandler.craftingRecipePage(".craft2", nLegs),
BotaniaAPI.internalHandler.craftingRecipePage(".craft3", nBoots) });
// Enginerr hopper recipe
engineerHopper = new BLexiconEntry("engineerHopper", categoryForgotten);
engineerHopper.setKnowledgeType(forgotten).setLexiconPages(
new LexiconPage[] { new PageText("0"), new PageImage("1", "ab:textures/misc/engineerHopper.png"),
new PageText("2"), new PageText("3"), new PageText("4"),
new AlphirineCraftPage(engineerHopper, hopperRecipe.getOutput(), ".alphirineCraft") });
// Rod of nebula recipe
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemNebulaRod),
new Object[] { " WN", " RW", "W ", Character.valueOf('W'), new ItemStack(ModItems.manaResource, 1, 13),
@@ -490,6 +579,7 @@ public class RecipeListAB {
new LexiconPage[] { new PageText("0"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) });
// Playing board recipe
GameRegistry.addShapedRecipe(
new ItemStack(BlockListAB.blockBoardFate),
new Object[] { " ", "QDQ", "MPM", Character.valueOf('Q'), new ItemStack(ModFluffBlocks.manaQuartz),
@@ -530,6 +620,7 @@ public class RecipeListAB {
hornPlenty = new RLexiconEntry("hornPlenty", BotaniaAPI.categoryAlfhomancy, AchievementRegister.hornPlenty);
hornPlenty.setLexiconPages(new LexiconPage[] { new PageText("0") });
// Rod of sprawl recipe
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemSprawlRod),
new Object[] { " SC", " WS", "W ", Character.valueOf('S'),
@@ -541,6 +632,7 @@ public class RecipeListAB {
new LexiconPage[] { new PageText("0"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) });
// Ardent azarcissus recipe
azartFlowerRecipe = BotaniaAPI.registerPetalRecipe(
ItemBlockSpecialFlower.ofType("ardentAzarcissus"),
new ItemStack(ItemListAB.itemABResource, 1, 4),
@@ -555,16 +647,12 @@ public class RecipeListAB {
new LexiconPage[] { new PageText("0"),
BotaniaAPI.internalHandler.petalRecipePage(".petalCraft", azartFlowerRecipe) });
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemAquaSword),
new Object[] { " N", "RM ", "WR ", Character.valueOf('N'),
new ItemStack(ItemListAB.itemABResource, 1, 1), Character.valueOf('M'),
new ItemStack(ItemListAB.itemABResource), Character.valueOf('R'), new ItemStack(ModItems.rune),
Character.valueOf('W'), new ItemStack(ModItems.manaResource, 1, 13) });
// Aqua sword recipe
aquaSword = new BLexiconEntry("aquaSword", categoryForgotten);
aquaSword.setKnowledgeType(forgotten).setLexiconPages(
new LexiconPage[] { new PageText("0"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) });
aquaSword.setKnowledgeType(forgotten).setLexiconPages(new LexiconPage[] { new PageText("0"), });
///////////////////////////////////////////////////////////////////////////////////////// Thaumcraft recipes
if (Botania.thaumcraftLoaded) thaumcraft();
@@ -584,8 +672,128 @@ public class RecipeListAB {
new ItemStack(ItemListAB.itemABResource, 1, 5),
new Object[] { "III", "III", "III", Character.valueOf('I'),
new ItemStack(ItemListAB.itemABResource, 1, 6) });
TerraHoe = ThaumcraftApi.addInfusionCraftingRecipe(
"TerraHoe",
new ItemStack(ItemListAB.itemTerraHoe),
5,
new AspectList().add(Aspect.EARTH, 32).add(Aspect.MAGIC, 16).add(Aspect.HARVEST, 48)
.add(Aspect.CROP, 16),
new ItemStack((Item) Item.itemRegistry.getObject("Thaumcraft:ItemHoeElemental")),
new ItemStack[] { OreDictionary.getOres("gemFlawlessGreenSapphire").get(0),
new ItemStack(ModItems.manaResource, 1, 3),
OreDict.preference("plateTerrasteel", LibOreDict.TERRA_STEEL),
new ItemStack(ModItems.rune, 1, 2), new ItemStack(ModItems.fertilizer),
new ItemStack((Item) Item.itemRegistry.getObject("Thaumcraft:blockCrystal"), 1, 3),
OreDict.preference("plateTerrasteel", LibOreDict.TERRA_STEEL),
new ItemStack(ModItems.manaResource, 1, 3), OreDictionary.getOres("gemFlawlessOlivine").get(0),
new ItemStack(ModItems.manaResource, 1, 3),
OreDict.preference("plateTerrasteel", LibOreDict.TERRA_STEEL),
new ItemStack((Item) Item.itemRegistry.getObject("Thaumcraft:blockCrystal"), 1, 3),
new ItemStack(ModItems.fertilizer), new ItemStack(ModItems.rune, 1, 2),
OreDict.preference("plateTerrasteel", LibOreDict.TERRA_STEEL),
new ItemStack(ModItems.manaResource, 1, 3) });
AquaSword = ThaumcraftApi.addInfusionCraftingRecipe(
"AquaSword",
new ItemStack(ItemListAB.itemAquaSword),
8,
new AspectList().add(Aspect.WEAPON, 64).add(Aspect.EARTH, 64).add(Aspect.WATER, 64)
.add(Aspect.MAGIC, 32).add(Aspect.SLIME, 32).add(Aspect.BEAST, 16),
new ItemStack(ModItems.starSword),
new ItemStack[] { new ItemStack(ModItems.waterRod), new ItemStack(ItemListAB.itemABResource, 1, 0),
new ItemStack(ItemListAB.itemABResource, 1, 2), new ItemStack(ModItems.rune, 1, 0),
new ItemStack(ItemListAB.itemABResource, 1, 6), new ItemStack(ModItems.rune, 1, 3),
new ItemStack(ModBlocks.dreamwood, 1, 5), new ItemStack(ModItems.rune, 1, 3),
new ItemStack(ItemListAB.itemABResource, 1, 6), new ItemStack(ModItems.rune, 1, 0),
new ItemStack(ItemListAB.itemABResource, 1, 2),
new ItemStack(ItemListAB.itemABResource, 1, 0) });
ManaCharger = ThaumcraftApi.addInfusionCraftingRecipe(
"ManaCharger",
new ItemStack(BlockListAB.blockManaCharger),
6,
new AspectList().add(Aspect.AIR, 64).add(Aspect.EARTH, 64).add(Aspect.FLIGHT, 64).add(Aspect.WATER, 32)
.add(Aspect.EXCHANGE, 32).add(Aspect.SENSES, 16),
new ItemStack(ModBlocks.pylon, 1, 0),
new ItemStack[] { new ItemStack(ModFluffBlocks.livingrockSlab), new ItemStack(ModItems.manaTablet),
new ItemStack(ModItems.rune, 1, 4), new ItemStack(ModItems.rune, 1, 8),
new ItemStack(ModBlocks.bellows), new ItemStack(ModFluffBlocks.livingrockSlab),
new ItemStack(ModItems.manaTablet), new ItemStack(ModItems.rune, 1, 7),
new ItemStack(ModItems.rune, 1, 8), new ItemStack(ModBlocks.bellows),
new ItemStack(ModFluffBlocks.livingrockSlab), new ItemStack(ModItems.manaTablet),
new ItemStack(ModItems.rune, 1, 6), new ItemStack(ModItems.rune, 1, 8),
new ItemStack(ModBlocks.bellows), new ItemStack(ModFluffBlocks.livingrockSlab),
new ItemStack(ModItems.manaTablet), new ItemStack(ModItems.rune, 1, 5),
new ItemStack(ModItems.rune, 1, 8), new ItemStack(ModBlocks.bellows) });
MithrillSword = ThaumcraftApi.addInfusionCraftingRecipe(
"MithrillSword",
new ItemStack(ItemListAB.itemMithrillSword),
10,
new AspectList().add(Aspect.WEAPON, 64).add(Aspect.EARTH, 64).add(Aspect.MOTION, 64)
.add(Aspect.MAGIC, 32).add(Aspect.ELDRITCH, 32).add(Aspect.BEAST, 16).add(Aspect.HUNGER, 16),
new ItemStack(ItemListAB.itemAquaSword),
new ItemStack[] { new ItemStack(ModItems.rainbowRod), new ItemStack(ItemListAB.itemABResource, 1, 0),
new ItemStack(
(Item) Item.itemRegistry.getObject("dreamcraft:item.MysteriousCrystalGemFlawless")),
new ItemStack(ItemListAB.itemABResource, 1, 0), new ItemStack(ItemListAB.itemNebulaRod),
new ItemStack(ModBlocks.dreamwood, 1, 5), new ItemStack(ItemListAB.itemABResource, 1, 5),
new ItemStack(ModBlocks.livingwood, 1, 5),
new ItemStack((Item) Item.itemRegistry.getObject("Thaumcraft:HandMirror")),
new ItemStack(ModBlocks.livingwood, 1, 5), new ItemStack(ItemListAB.itemABResource, 1, 5),
new ItemStack(ModBlocks.dreamwood, 1, 5), new ItemStack(ItemListAB.itemNebulaRod),
new ItemStack(ItemListAB.itemABResource, 1, 0),
OreDictionary.getOres("gemFlawlessAmethyst").get(0),
new ItemStack(ItemListAB.itemABResource, 1, 0) });
Forge = ThaumcraftApi.addInfusionCraftingRecipe(
"Forge",
new ItemStack(BlockListAB.blockABPlate),
8,
new AspectList().add(Aspect.AIR, 80).add(Aspect.EARTH, 60).add(Aspect.ORDER, 40).add(Aspect.MAGIC, 32)
.add(Aspect.CRAFT, 32).add(Aspect.CRYSTAL, 20).add(Aspect.METAL, 20),
new ItemStack((Item) Item.itemRegistry.getObject("thaumicbases:voidAnvil")),
new ItemStack[] { new ItemStack(ModBlocks.terraPlate), new ItemStack(ModItems.rune, 1, 2),
new ItemStack(ModBlocks.storage, 1, 1),
new ItemStack((Item) Item.itemRegistry.getObject("dreamcraft:item.DiamondCoreChip")),
new ItemStack(ModBlocks.terraPlate), new ItemStack(ModItems.rune, 1, 3),
new ItemStack(ModBlocks.storage, 1, 0),
new ItemStack((Item) Item.itemRegistry.getObject("dreamcraft:item.EssentiaCircuit")),
new ItemStack(ModBlocks.terraPlate), new ItemStack(ModItems.rune, 1, 2),
new ItemStack(ModBlocks.storage, 1, 1),
new ItemStack((Item) Item.itemRegistry.getObject("dreamcraft:item.DiamondCoreChip")),
new ItemStack(ModBlocks.terraPlate), new ItemStack(ModItems.rune, 1, 3),
new ItemStack(ModBlocks.storage, 1, 0),
new ItemStack((Item) Item.itemRegistry.getObject("dreamcraft:item.EssentiaCircuit")), });
Destroyer = ThaumcraftApi.addInfusionCraftingRecipe(
"Destroyer",
new ItemStack(ItemListAB.itemMihrillMultiTool),
12,
new AspectList().add(Aspect.EARTH, 128).add(Aspect.MAGIC, 64).add(Aspect.TOOL, 64).add(Aspect.MINE, 64)
.add(Aspect.CROP, 32).add(Aspect.HARVEST, 32).add(Aspect.TREE, 32),
new ItemStack(ItemListAB.itemABResource, 1, 2),
new ItemStack[] { new ItemStack(ModItems.terraAxe), new ItemStack(BlockListAB.blockABStorage, 1, 0),
OreDictionary.getOres("gemExquisiteManaDiamond").get(0),
new ItemStack(BlockListAB.blockABStorage, 1, 0), new ItemStack(ModItems.terraPick, 1, 0), // nbt(2147483646),
new ItemStack(ModBlocks.livingwood, 1, 5), OreDictionary.getOres("gemFlawlessAmber").get(0),
new ItemStack(BlockListAB.blockLebethron, 1, 4), new ItemStack(ModItems.temperanceStone, 1, 0),
new ItemStack(BlockListAB.blockLebethron, 1, 4),
OreDictionary.getOres("gemFlawlessAmber").get(0), new ItemStack(ModBlocks.livingwood, 1, 5),
new ItemStack(ItemListAB.itemTerraHoe), new ItemStack(BlockListAB.blockABStorage, 1, 0),
OreDictionary.getOres("gemExquisiteManaDiamond").get(0),
new ItemStack(BlockListAB.blockABStorage, 1, 0) });
}
// Aspecolus recipe
public static void thaumcraft() {
aspecolus = new BLexiconEntry("aspecolus", BotaniaAPI.categoryFunctionalFlowers);
aspecolusRecipe = BotaniaAPI.registerPetalRecipe(
@@ -623,13 +831,18 @@ public class RecipeListAB {
new ItemStack(ConfigItems.itemNugget, 1, 6) });
recipes.add(getLastRecipe());
}
// Thaumic crafty crate recipe
IRecipe crate = GameRegistry.addShapedRecipe(
new ItemStack(BlockListAB.blockMagicCraftCrate),
new Object[] { "TST", "WCW", "W W", Character.valueOf('W'),
new ItemStack(ConfigBlocks.blockMagicalLog), Character.valueOf('S'),
new ItemStack(ConfigItems.itemResource, 1, 14), Character.valueOf('T'),
new ItemStack(ConfigItems.itemResource, 1, 7), Character.valueOf('C'),
new ItemStack(ModBlocks.openCrate, 1, 1) });
new ItemStack(ModBlocks.openCrate, 1, 1)
// ,Character.valueOf('G'), (ToolDictNames.craftingToolScrewdriver.name())
});
addShapelessOreDictRecipe(
new ItemStack(ItemListAB.itemCraftingPattern, 48),
new Object[] { new ItemStack(Blocks.crafting_table), new ItemStack(ModBlocks.livingrock),
@@ -641,8 +854,26 @@ public class RecipeListAB {
BotaniaAPI.internalHandler.craftingRecipePage(".craft0", getLastRecipe()),
BotaniaAPI.internalHandler.craftingRecipesPage(".craft1", recipes) });
// Mana flower recipe
GameRegistry.addShapedRecipe(
new ItemStack(ItemListAB.itemManaFlower),
new Object[] { "NFN", "PMP", "NRN", Character.valueOf('T'),
new ItemStack(BlockListAB.blockABStorage, 1, 6), Character.valueOf('F'),
new ItemStack(ItemListAB.itemABResource, 1, 4), Character.valueOf('P'),
new ItemStack(ConfigItems.itemEldritchObject, 1, 3), Character.valueOf('M'),
new ItemStack(ModItems.manaBottle), Character.valueOf('R'),
new ItemStack(ModItems.rune, 1, 8), Character.valueOf('N'),
new ItemStack(ItemListAB.itemABResource, 1, 1) });
manaFlower = new BLexiconEntry("manaFlower", categoryForgotten);
manaFlower.setKnowledgeType(forgotten)
.setLexiconPages(
new LexiconPage[] { new PageText("0"),
new AlphirineCraftPage(manaFlower, manaFlowerRecipe.getOutput(), ".alphirineCraft"),
BotaniaAPI.internalHandler.craftingRecipePage(".craft", getLastRecipe()) })
.setIcon(new ItemStack(ItemListAB.itemManaFlower));
}
// Pure Gladiolus recipe
pureGladRecipe = BotaniaAPI.registerPetalRecipe(
ItemBlockSpecialFlower.ofType("pureGladiolus"),
new ItemStack(ItemListAB.itemABResource, 1, 4),
@@ -659,6 +890,8 @@ public class RecipeListAB {
BotaniaAPI.internalHandler.petalRecipePage(".petalCraft", pureGladRecipe) });
}
///////////////////////////////////////////////////////////////////////////////////////// Itemlist
public static void relicInit() {
AdvancedBotanyAPI.diceList.add(new ItemStack(ModItems.dice));
@@ -687,4 +920,141 @@ public class RecipeListAB {
private static void addShapelessOreDictRecipe(ItemStack output, Object... recipe) {
CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(output, recipe));
}
public static void setupResearch() {
String category = "AB_botania";
ResearchCategories.registerCategory(
category,
new ResourceLocation("botania", "textures/gui/categories/forgotten.png"),
new ResourceLocation("botania", "textures/gui/categories/ABstars.png"));
ResearchItem TerraHoePage;
ResearchPage TerraHoePages;
ResearchPage infTerraHoePages;
ResearchItem AquaSwordPage;
ResearchPage AquaSwordPages;
ResearchPage infAquaSwordPages;
ResearchItem ManaChargerPage;
ResearchPage ManaChargerPages;
ResearchPage infManaChargerPages;
ResearchItem MithrillSwordPage;
ResearchPage MithrillSwordPages;
ResearchPage infMithrillSwordPages;
ResearchItem ForgePage;
ResearchPage ForgePages;
ResearchPage infForgePages;
ResearchItem DestroyerPage;
ResearchPage DestroyerPages;
ResearchPage infDestroyerPages;
TerraHoePage = new ResearchItem(
"TerraHoe",
category,
new AspectList().add(Aspect.MAGIC, 4).add(Aspect.LIFE, 1).add(Aspect.TOOL, 1).add(Aspect.EARTH, 8)
.add(Aspect.CROP, 4).add(Aspect.HARVEST, 2),
0,
2,
0,
new ItemStack(ItemListAB.itemTerraHoe));
TerraHoePages = new ResearchPage("TerraHoePages");
infTerraHoePages = new ResearchPage(TerraHoe);
AquaSwordPage = new ResearchItem(
"AquaSword",
category,
new AspectList().add(Aspect.MAGIC, 4).add(Aspect.LIFE, 1).add(Aspect.TOOL, 1).add(Aspect.EARTH, 8)
.add(Aspect.CROP, 4).add(Aspect.HARVEST, 2),
2,
2,
0,
new ItemStack(ItemListAB.itemAquaSword));
AquaSwordPages = new ResearchPage("AquaSwordPages");
infAquaSwordPages = new ResearchPage(AquaSword);
ManaChargerPage = new ResearchItem(
"ManaCharger",
category,
new AspectList().add(Aspect.MAGIC, 4).add(Aspect.LIFE, 1).add(Aspect.TOOL, 1).add(Aspect.EARTH, 8)
.add(Aspect.CROP, 4).add(Aspect.HARVEST, 2),
4,
6,
0,
new ItemStack(BlockListAB.blockManaCharger));
ManaChargerPages = new ResearchPage("ManaChargerPages");
infManaChargerPages = new ResearchPage(ManaCharger);
MithrillSwordPage = new ResearchItem(
"MithrillSword",
category,
new AspectList().add(Aspect.MAGIC, 4).add(Aspect.LIFE, 1).add(Aspect.TOOL, 1).add(Aspect.EARTH, 8)
.add(Aspect.CROP, 4).add(Aspect.HARVEST, 2),
2,
0,
0,
new ItemStack(ItemListAB.itemMithrillSword));
MithrillSwordPages = new ResearchPage("MithrillSwordPages");
infMithrillSwordPages = new ResearchPage(MithrillSword);
ForgePage = new ResearchItem(
"Forge",
category,
new AspectList().add(Aspect.MAGIC, 4).add(Aspect.LIFE, 1).add(Aspect.TOOL, 1).add(Aspect.EARTH, 8)
.add(Aspect.CROP, 4).add(Aspect.HARVEST, 2),
4,
5,
0,
new ItemStack(BlockListAB.blockABPlate));
ForgePages = new ResearchPage("ForgePages");
infForgePages = new ResearchPage(Forge);
DestroyerPage = new ResearchItem(
"Destroyer",
category,
new AspectList().add(Aspect.MAGIC, 4).add(Aspect.LIFE, 1).add(Aspect.TOOL, 1).add(Aspect.EARTH, 8)
.add(Aspect.CROP, 4).add(Aspect.HARVEST, 2),
0,
0,
0,
new ItemStack(ItemListAB.itemMihrillMultiTool));
DestroyerPages = new ResearchPage("DestroyerPages");
infDestroyerPages = new ResearchPage(Destroyer);
TerraHoePage.setPages(TerraHoePages, infTerraHoePages);
AquaSwordPage.setPages(AquaSwordPages, infAquaSwordPages);
ManaChargerPage.setPages(ManaChargerPages, infManaChargerPages);
MithrillSwordPage.setPages(MithrillSwordPages, infMithrillSwordPages);
ForgePage.setPages(ForgePages, infForgePages);
DestroyerPage.setPages(DestroyerPages, infDestroyerPages);
TerraHoePage.setParents("ELEMENTALHOE");
AquaSwordPage.setParents("Forge");
ManaChargerPage.setParents("MIRROR");
MithrillSwordPage.setParents("AquaSword", "Forge");
ForgePage.setParents("ManaCharger");
DestroyerPage.setParents("TerraHoe", "Forge");
ResearchCategories.addResearch(TerraHoePage);
ResearchCategories.addResearch(AquaSwordPage);
ResearchCategories.addResearch(ManaChargerPage);
ResearchCategories.addResearch(MithrillSwordPage);
ResearchCategories.addResearch(ForgePage);
ResearchCategories.addResearch(DestroyerPage);
}
public static ResearchPage getResearchPage(String ident) {
return new ResearchPage(LocalizationManager.getLocalizedString("tc.research_page." + ident));
}
public static void setupItemAspects() {}
}
@@ -0,0 +1,13 @@
package ab.utils;
public class CraftingManager {
public static void setupCrafting() {
setupVanillaCrafting();
}
private static void setupVanillaCrafting() {
}
}
+10
View File
@@ -0,0 +1,10 @@
package ab.utils;
public interface IModHelper {
public void preInit();
public void init();
public void postInit();
}
@@ -0,0 +1,22 @@
package ab.utils;
import net.minecraft.util.StatCollector;
public class LocalizationManager {
public static String getLocalizedString(String key) {
if (StatCollector.canTranslate(key)) {
return StatCollector.translateToLocal(key);
} else {
return StatCollector.translateToFallback(key);
}
}
public static String getLocalizedString(String key, Object... objects) {
if (StatCollector.canTranslate(key)) {
return String.format(StatCollector.translateToLocal(key), objects);
} else {
return String.format(StatCollector.translateToFallback(key), objects);
}
}
}
@@ -0,0 +1,27 @@
package ab.utils;
import ab.common.lib.register.RecipeListAB;
public class ModHelperManager {
private static IModHelper helper;
public static void preInit() {
setupHelpers();
helper.preInit();
}
public static void init() {
// helper.init();
}
public static void postInit() {
helper.postInit();
}
private static void setupHelpers() {
helper = new RecipeListAB();
}
}
+44
View File
@@ -0,0 +1,44 @@
package ab.utils;
import java.util.Arrays;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import vazkii.botania.common.lib.LibOreDict;
public class OreDict {
public static final String[] FLOWER_INGREDIENT = new String[] { "flowerIngredientWhite", "flowerIngredientOrange",
"flowerIngredientMagenta", "flowerIngredientLightBlue", "flowerIngredientYellow", "flowerIngredientLime",
"flowerIngredientPink", "flowerIngredientGray", "flowerIngredientLightGray", "flowerIngredientCyan",
"flowerIngredientPurple", "flowerIngredientBlue", "flowerIngredientBrown", "flowerIngredientGreen",
"flowerIngredientRed", "flowerIngredientBlack" };
public static final String[] FLOWER_VANILLA = new String[] { "flowerWhite", "flowerOrange", "flowerMagenta",
"flowerLightBlue", "flowerYellow", "flowerLime", "flowerPink", "flowerGray", "flowerLightGray",
"flowerCyan", "flowerPurple", "flowerBlue", "flowerBrown", "flowerGreen", "flowerRed", "flowerBlack" };
public static final String GAIA_SPIRIT = LibOreDict.LIFE_ESSENCE;
public static final String MUSHROOM = "listMagicMushroom";
public static final String FLOWER_NONMAGICAL = "flowerNonmagical";
// GT Material references
public static final String MANA_STEEL_PLATE = "plateManasteel";
public static final String DENSE_MANA_STEEL_PLATE = "plateDenseManasteel";
public static final String TERRA_STEEL_PLATE = "plateTerrasteel";
public static final String DENSE_TERRA_STEEL_PLATE = "plateDenseTerrasteel";
public static final String ELEMENTIUM_PLATE = "plateElvenElementium";
public static final String DENSE_ELEMENTIUM_STEEL_PLATE = "plateDenseElvenElementium";
public static final ItemStack preference(String... oredictKeys) {
for (String key : oredictKeys) {
List<ItemStack> ores = OreDictionary.getOres(key);
if (ores != null && ores.size() > 0) return ores.get(0);
}
throw new IllegalArgumentException("Can't find any oreDictionary entry among " + Arrays.toString(oredictKeys));
}
}
+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);
}
}
+9
View File
@@ -0,0 +1,9 @@
package ab.utils;
public class VersionInfo {
public static final String ModID = "GRADLETOKEN_MODID";
public static final String ModName = "GRADLETOKEN_MODNAME";
public static final String Version = "GRADLETOKEN_VERSION";
public static final String Depends = "required-after:Thaumcraft; ";
}
@@ -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.

After

Width:  |  Height:  |  Size: 283 KiB