Skip to content

Commit

Permalink
Merge pull request #7 from EnderProyects/feature/advanced_botany_infu
Browse files Browse the repository at this point in the history
Feature/advanced botany infu
  • Loading branch information
Dream-Master authored May 30, 2023
2 parents acdc711 + 6e3518f commit 62b24c7
Show file tree
Hide file tree
Showing 8 changed files with 676 additions and 342 deletions.
7 changes: 3 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ dependencies {
api('com.github.GTNewHorizons:Botania:1.9.16-GTNH:dev')
api('com.github.GTNewHorizons:Botanic-horizons:1.0.15-GTNH:dev')
api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.42.71:dev')
api('com.github.GTNewHorizons:Baubles:1.0.1.16:dev')
compileOnly("com.github.GTNewHorizons:CodeChickenLib:1.1.8:dev")
compileOnly("com.github.GTNewHorizons:CodeChickenCore:1.1.11:dev")
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.3.45-GTNH:dev")
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.3.46-GTNH:dev")
compileOnly("com.github.GTNewHorizons:CraftTweaker:3.2.11:dev")
//compileOnly("com.github.stanhebben:MineTweaker3:1.7.10-3.0.10B:dev")
}

}
2 changes: 2 additions & 0 deletions src/main/java/ab/common/core/proxy/CommonProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import ab.common.lib.register.FlowerRegister;
import ab.common.lib.register.ItemListAB;
import ab.common.minetweaker.MineTweakerConfig;
import ab.nei.IMCForNEI;
import ab.utils.CraftingManager;
import ab.utils.ModHelperManager;
import cpw.mods.fml.common.Loader;
Expand All @@ -34,6 +35,7 @@ public void preInit(FMLPreInitializationEvent event) {
public void init(FMLInitializationEvent event) {
NetworkRegistry.INSTANCE.registerGuiHandler(AdvancedBotany.instance, new GuiHandler());
NetworkHandler.registerPackets();
IMCForNEI.IMCSender();
ModHelperManager.init();
}

Expand Down
624 changes: 447 additions & 177 deletions src/main/java/ab/common/lib/register/RecipeListAB.java

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions src/main/java/ab/nei/IMCForNEI.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package ab.nei;

import net.minecraft.nbt.NBTTagCompound;

import cpw.mods.fml.common.event.FMLInterModComms;

public class IMCForNEI {

public static void IMCSender() {
sendHandler("ab.client.nei.RecipeHandlerAlphirine", "Botania:lexicon");
sendCatalyst("ab.client.nei.RecipeHandlerAlphirine", "Botania:lexicon");

sendHandler("ab.client.nei.RecipeHandlerAdvancedPlate", "AdvancedBotany:blockABPlate");
sendCatalyst("ab.client.nei.RecipeHandlerAdvancedPlate", "AdvancedBotany:blockABPlate");

}

private static void sendHandler(String aName, String aBlock) {
sendHandler(aName, aBlock, 1);
}

private static void sendHandler(String aName, String aBlock, int maxRecipesPerPage) {
NBTTagCompound aNBT = new NBTTagCompound();
aNBT.setString("handler", aName);
aNBT.setString("modName", "Advanced Botany");
aNBT.setString("modId", "AdvancedBotany");
aNBT.setBoolean("modRequired", true);
aNBT.setString("itemName", aBlock);
aNBT.setInteger("handlerHeight", 135);
aNBT.setInteger("handlerWidth", 166);
aNBT.setInteger("maxRecipesPerPage", maxRecipesPerPage);
aNBT.setInteger("yShift", 6);
FMLInterModComms.sendMessage("NotEnoughItems", "registerHandlerInfo", aNBT);
}

private static void sendCatalyst(String aName, String aStack, int aPriority) {
NBTTagCompound aNBT = new NBTTagCompound();
aNBT.setString("handlerID", aName);
aNBT.setString("itemName", aStack);
aNBT.setInteger("priority", aPriority);
FMLInterModComms.sendMessage("NotEnoughItems", "registerCatalystInfo", aNBT);
}

private static void sendCatalyst(String aName, String aStack) {
sendCatalyst(aName, aStack, 0);
}
}
38 changes: 38 additions & 0 deletions src/main/java/ab/nei/NEI_Config.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package ab.nei;

import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

import ab.AdvancedBotany;
import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;

public class NEI_Config implements IConfigureNEI {

public static boolean isAdded = true;

@Override
public void loadConfig() {
NEI_Config.isAdded = false;
NEI_Config.isAdded = true;
}

public static void hide(Block aBlock) {
API.hideItem(new ItemStack(aBlock, 1));
}

public static void hide(Item aItem) {
API.hideItem(new ItemStack(aItem, 1));
}

@Override
public String getName() {
return "Advanced Botany NEI Plugin";
}

@Override
public String getVersion() {
return AdvancedBotany.version;
}
}
129 changes: 129 additions & 0 deletions src/main/java/ab/utils/Constants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
package ab.utils;

import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;

public final class Constants {

private Constants() {}

public static final int POOL_META_DILUTE = 2;
public static final int POOL_META_REGULAR = 0;
public static final int POOL_META_REGULAR_FABULOUS = 3;
public static final int POOL_META_CREATIVE = 1;

public static final int SPREADER_META_REGULAR = 0;
public static final int SPREADER_META_ALFHEIM = 2;
public static final int SPREADER_META_GAIA = 3;
public static final int SPREADER_META_PULSE = 1;

public static final int MANARESOURCE_META_MANASTEEL = 0;
public static final int MANARESOURCE_META_DIAMOND = 2;
public static final int MANARESOURCE_META_PEARL = 1;
public static final int MANARESOURCE_META_TWIG_WOOD = 3;
public static final int MANARESOURCE_META_TERRASTEEL = 4;
public static final int MANARESOURCE_META_GAIA_SPIRIT = 5;
public static final int MANARESOURCE_META_ROOT = 6;
public static final int MANARESOURCE_META_ELEMENTIUM = 7;
public static final int MANARESOURCE_META_PIXIE_DUST = 8;
public static final int MANARESOURCE_META_DRAGONSTONE = 9;
public static final int MANARESOURCE_META_PRISMARINE = 10;
public static final int MANARESOURCE_META_CRAFT = 11;
public static final int MANARESOURCE_META_TWIG_DREAM = 13;
public static final int MANARESOURCE_META_GAIA_INGOT = 14;
public static final int MANARESOURCE_META_STRING = 16;
public static final int MANARESOURCE_META_CLOTH = 22;
public static final int MANARESOURCE_META_MANAPOWDER = 23;

public static final int STORAGE_META_MANASTEELBLOCK = 0;
public static final int STORAGE_META_TERRASTEELBLOCK = 1;
public static final int STORAGE_META_ELEMENTIUMBLOCK = 2;
public static final int STORAGE_META_DIAMONDBLOCK = 3;
public static final int STORAGE_META_DRAGONSTONEBLOCK = 4;

public static final int STORAGE_META_MITHRILL = 0;

public static final int SEEDS_META_GRASS = 0;
public static final int SEEDS_META_PODZOL = 1;
public static final int SEEDS_META_MYCELIUM = 2;
public static final int SEEDS_META_DRY = 3;
public static final int SEEDS_META_GOLD = 4;
public static final int SEEDS_META_VIVID = 5;
public static final int SEEDS_META_SCORCHED = 6;
public static final int SEEDS_META_INFUSED = 7;
public static final int SEEDS_META_MUTATED = 8;

public static final int LIVINGWOOD_META_BLOCK = 0;
public static final int LIVINGWOOD_META_PLANK = 1;
public static final int LIVINGWOOD_META_MOSSY = 2;
public static final int LIVINGWOOD_META_FRAMED = 3;
public static final int LIVINGWOOD_META_PATTERNED = 4;
public static final int LIVINGWOOD_META_GLIMMERING = 5;

public static final int LIVINGSTONE_META_BLOCK = 0;
public static final int LIVINGSTONE_META_BRICK = 1;
public static final int LIVINGSTONE_META_MOSSY = 2;
public static final int LIVINGSTONE_META_CRACKED = 3;
public static final int LIVINGSTONE_META_CHISELED = 4;

public static final int PYLON_META_MANA = 0;
public static final int PYLON_META_NATURA = 1;
public static final int PYLON_META_GAIA = 2;

public static final int VIAL_META_MANAGLASS = 0;
public static final int VIAL_META_ALFGLASS = 1;

public static final int QUARTZ_META_DARK = 0;
public static final int QUARTZ_META_MANA = 1;
public static final int QUARTZ_META_BLAZE = 2;
public static final int QUARTZ_META_LAVENDER = 3;
public static final int QUARTZ_META_RED = 4;
public static final int QUARTZ_META_ELVEN = 5;
public static final int QUARTZ_META_SUNNY = 6;

public static final int VIRUS_METADATA_NECRO = 0;
public static final int VIRUS_METADATA_NULL = 1;

public static final int PRISMARINE_META_BLOCK = 0;
public static final int PRISMARINE_META_BRICK = 1;
public static final int PRISMARINE_META_DARK = 2;

public static final int BRICK_META_HELL = 0;
public static final int BRICK_META_SOUL = 1;
public static final int BRICK_META_FROST = 2;
public static final int BRICK_META_ROOF = 3;

public static final int ENDSTONE_META_BRICK_YELLOW = 0;
public static final int ENDSTONE_META_BRICK_PURPLE = 2;

public static final String THAUMCRAFT_METAL_DEVICE = "Thaumcraft:blockMetalDevice";
public static final String THAUMCRAFT_STONE_DEVICE = "Thaumcraft:blockStoneDevice";
public static final int THAUMCRAFT_METAL_META_CRUCIBLE = 0;
public static final int THAUMCRAFT_METAL_META_CONSTRUCT = 9;
public static final int THAUMCRAFT_STONE_META_PEDESTAL = 1;
public static final int THAUMCRAFT_STONE_META_RUNIC_MATRIX = 2;

public static final String GT_CASING_ID = "gregtech:gt.blockcasings4";
public static final int GT_CASING_META = 1;

public static final int POOL_MAX_MANA_DILUTED = 10000;
public static final int POOL_MAX_MANA_REGULAR = 1000000;

public static final int MANA_TABLET_MAGIC_META = 10000;

public static ItemStack thaumcraftCrucible() {
return new ItemStack(Block.getBlockFromName(THAUMCRAFT_METAL_DEVICE), 1, THAUMCRAFT_METAL_META_CRUCIBLE);
}

public static ItemStack thaumcraftMatrix() {
return new ItemStack(Block.getBlockFromName(THAUMCRAFT_STONE_DEVICE), 1, THAUMCRAFT_STONE_META_RUNIC_MATRIX);
}

public static ItemStack thaumcraftConstruct() {
return new ItemStack(Block.getBlockFromName(THAUMCRAFT_METAL_DEVICE), 1, THAUMCRAFT_METAL_META_CONSTRUCT);
}

public static ItemStack gtTradeCasing() {
return new ItemStack(Block.getBlockFromName(GT_CASING_ID), 1, GT_CASING_META);
}
}
Loading

0 comments on commit 62b24c7

Please sign in to comment.