Kuba requested changes, what am I doing wrong?

This commit is contained in:
Alastors committed 2023-04-29 18:25:31 -04:00
1 parent 83b0bfc504
commit 5f56b46e00
4 files changed
+79 -85

No files matched your search

+2 -26
View File
@@ -14,7 +14,6 @@ import net.minecraftforge.common.config.Property;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.client.event.ConfigChangedEvent;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -57,9 +56,6 @@ import magicbees.main.utils.VersionInfo;
import magicbees.main.utils.compat.BloodHelper;
import magicbees.main.utils.compat.BotaniaHelper;
import magicbees.main.utils.compat.ThaumcraftHelper;
import magicbees.main.utils.compat.bloodmagic.ItemBloodBaseFrame;
import magicbees.main.utils.compat.bloodmagic.ItemBloodFrame;
import magicbees.main.utils.compat.bloodmagic.ItemFrenziedFrame;
import magicbees.storage.BackpackDefinition;
import magicbees.tileentity.TileEntityEffectJar;
import magicbees.tileentity.TileEntityMagicApiary;
@@ -150,9 +146,6 @@ public class Config {
public static ItemMagicHiveFrame hiveFrameNecrotic;
public static ItemMagicHiveFrame hiveFrameTemporal;
public static ItemMagicHiveFrame hiveFrameOblivion;
public static Item hiveFrameBlood;
public static Item hiveFrameFrenzy;
public static Item hiveFrameBloodBase;
// ----- Backpacks ------------------------------------------
public static Item thaumaturgeBackpackT1;
@@ -255,7 +248,7 @@ public class Config {
arsMagicaActive = p.getBoolean();
p = configuration.get(CATEGORY_MODULES, "BloodMagic", true);
bloodMagicActive = (Loader.isModLoaded("AWWayofTime"));
bloodMagicActive = p.getBoolean();
p = configuration.get(CATEGORY_MODULES, "EquivalentExchange", true);
equivalentExchangeActive = p.getBoolean();
@@ -491,24 +484,7 @@ public class Config {
GameRegistry.registerItem(voidGrafter, voidGrafter.getUnlocalizedName(), CommonProxy.DOMAIN);
if (BloodHelper.isActive()) {
Config.hiveFrameBloodBase = new ItemBloodBaseFrame();
GameRegistry.registerItem(
Config.hiveFrameBloodBase,
Config.hiveFrameBloodBase.getUnlocalizedName(),
CommonProxy.DOMAIN);
Config.hiveFrameBlood = new ItemBloodFrame();
GameRegistry.registerItem(
Config.hiveFrameBlood,
Config.hiveFrameBlood.getUnlocalizedName(),
CommonProxy.DOMAIN);
Config.hiveFrameFrenzy = new ItemFrenziedFrame();
GameRegistry.registerItem(
Config.hiveFrameFrenzy,
Config.hiveFrameFrenzy.getUnlocalizedName(),
CommonProxy.DOMAIN);
BloodHelper.getItems();
}
}
@@ -1,25 +1,36 @@
package magicbees.main.utils.compat;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
import WayofTime.alchemicalWizardry.*;
import WayofTime.alchemicalWizardry.ModItems;
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import magicbees.main.CommonProxy;
import magicbees.main.Config;
import magicbees.main.utils.compat.bloodmagic.ItemBloodBaseFrame;
import magicbees.main.utils.compat.bloodmagic.ItemBloodFrame;
import magicbees.main.utils.compat.bloodmagic.ItemFrenziedFrame;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.crafting.IArcaneRecipe;
import thaumcraft.api.research.ResearchCategories;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchPage;
import thaumcraft.common.config.ConfigItems;
public class BloodHelper implements IModHelper {
public static Item hiveFrameBlood;
public static Item hiveFrameFrenzy;
public static Item hiveFrameBloodBase;
@SideOnly(Side.CLIENT)
public static IIcon subtileIcons[];
private static boolean isBloodMagicActive = false;
public static final String Name = "AWWayofTime";
@@ -34,25 +45,38 @@ public class BloodHelper implements IModHelper {
}
}
public static void bloodMagicInstalled() {
isBloodMagicActive = true;
}
public void init() {
getItems();
if (isActive()) {
getItems();
}
}
public void postInit() {
getRecipes();
if (isActive()) {
getRecipes();
if (ThaumcraftHelper.isActive()) {
thaumRecipes();
thaumResearch();
}
}
}
public static void getBlocks() {}
public static void getItems() {}
public static void getItems() {
hiveFrameBloodBase = new ItemBloodBaseFrame();
GameRegistry.registerItem(hiveFrameBloodBase, hiveFrameBloodBase.getUnlocalizedName(), CommonProxy.DOMAIN);
hiveFrameBlood = new ItemBloodFrame();
GameRegistry.registerItem(hiveFrameBlood, hiveFrameBlood.getUnlocalizedName(), CommonProxy.DOMAIN);
hiveFrameFrenzy = new ItemFrenziedFrame();
GameRegistry.registerItem(hiveFrameFrenzy, hiveFrameFrenzy.getUnlocalizedName(), CommonProxy.DOMAIN);
}
public static void getRecipes() {
AltarRecipeRegistry.registerAltarRecipe(
new ItemStack(Config.hiveFrameBloodBase),
new ItemStack(hiveFrameBloodBase),
new ItemStack(Config.hiveFrameMagic),
1,
5000,
@@ -64,24 +88,59 @@ public class BloodHelper implements IModHelper {
public static void thaumRecipes() {
ThaumcraftHelper.bloodFrame = ThaumcraftApi.addArcaneCraftingRecipe(
"MB_BloodFrame",
new ItemStack(Config.hiveFrameBlood),
new ItemStack(hiveFrameBlood),
new AspectList().add(Aspect.AIR, 50).add(Aspect.FIRE, 50).add(Aspect.WATER, 50).add(Aspect.EARTH, 50)
.add(Aspect.ORDER, 50).add(Aspect.ENTROPY, 50),
new Object[] { "sbs", "bFb", "sbs", 's', ModItems.imbuedSlate, 'b', ModItems.bucketLife, 'F',
Config.hiveFrameBloodBase });
hiveFrameBloodBase });
ThaumcraftHelper.frenziedFrame = ThaumcraftApi.addArcaneCraftingRecipe(
"MB_FrenziedFrame",
new ItemStack(Config.hiveFrameFrenzy),
new ItemStack(hiveFrameFrenzy),
new AspectList().add(Aspect.AIR, 50).add(Aspect.FIRE, 50).add(Aspect.WATER, 50).add(Aspect.EARTH, 50)
.add(Aspect.ORDER, 50).add(Aspect.ENTROPY, 50),
new Object[] { "sns", "nFn", "sns", 's', ModItems.imbuedSlate, 'n',
new ItemStack(ConfigItems.itemResource, 1, 1), 'F', Config.hiveFrameBloodBase });
new ItemStack(ConfigItems.itemResource, 1, 1), 'F', hiveFrameBloodBase });
}
public static void doBloodMagicModuleConfigs(Configuration configuration) {
Property p;
public static void thaumResearch() {
if (ThaumcraftHelper.isActive()) {
ThaumcraftHelper.bloodFrame1 = new ResearchPage("bloodFrame.1");
ThaumcraftHelper.bloodFrame2 = new ResearchPage((IArcaneRecipe) ThaumcraftHelper.bloodFrame);
ThaumcraftHelper.bloodFramePage = new ResearchItem(
"MB_BloodFrame",
"MAGICBEES",
new AspectList().add(Aspect.LIFE, 1).add(Aspect.ORDER, 1).add(Aspect.HEAL, 1)
.add(Aspect.EXCHANGE, 1).add(Aspect.GREED, 1),
-4,
3,
1,
new ItemStack(BloodHelper.hiveFrameBlood));
ThaumcraftHelper.frenzyFrame1 = new ResearchPage("frenziedFrame.1");
ThaumcraftHelper.frenzyFrame2 = new ResearchPage((IArcaneRecipe) ThaumcraftHelper.frenziedFrame);
ThaumcraftHelper.frenzyFramePage = new ResearchItem(
"MB_FrenziedFrame",
"MAGICBEES",
new AspectList().add(Aspect.LIFE, 1).add(Aspect.ORDER, 1).add(Aspect.HEAL, 1)
.add(Aspect.EXCHANGE, 1).add(Aspect.GREED, 1),
-5,
3,
1,
new ItemStack(BloodHelper.hiveFrameFrenzy));
ThaumcraftHelper.bloodFramePage.setPages(ThaumcraftHelper.bloodFrame1, ThaumcraftHelper.bloodFrame2);
ThaumcraftHelper.bloodFramePage.setParents("MB_FrameMagic");
ThaumcraftHelper.frenzyFramePage.setPages(ThaumcraftHelper.frenzyFrame1, ThaumcraftHelper.frenzyFrame2);
ThaumcraftHelper.frenzyFramePage.setParents("MB_FrameMagic");
ResearchCategories.addResearch(ThaumcraftHelper.bloodFramePage);
ResearchCategories.addResearch(ThaumcraftHelper.frenzyFramePage);
}
}
}
@@ -40,6 +40,5 @@ public class ModHelperManager {
helpers.add(new BotaniaHelper());
helpers.add(new AppliedEnergisticsHelper());
helpers.add(new BloodHelper());
}
}
@@ -442,10 +442,6 @@ public class ThaumcraftHelper implements IModHelper {
new AspectList().add(Aspect.ORDER, 5),
new Object[] { " T", " s ", "s ", 's', Items.stick, 'T',
new ItemStack(miscResource, 1, MiscResource.VOID_INGOT.ordinal()) });
if (Config.bloodMagicActive) {
BloodHelper.thaumRecipes();
}
}
private static void setupResearch() {
@@ -690,42 +686,6 @@ public class ThaumcraftHelper implements IModHelper {
new ResearchPage((IArcaneRecipe) visAuraProvider))
.setParentsHidden("VISPOWER").registerResearchItem();
if (Config.bloodMagicActive) {
bloodFrame1 = new ResearchPage("bloodFrame.1");
bloodFrame2 = new ResearchPage((IArcaneRecipe) bloodFrame);
bloodFramePage = new ResearchItem(
"MB_BloodFrame",
category,
new AspectList().add(Aspect.LIFE, 1).add(Aspect.ORDER, 1).add(Aspect.HEAL, 1)
.add(Aspect.EXCHANGE, 1).add(Aspect.GREED, 1),
-4,
3,
1,
new ItemStack(Config.hiveFrameBlood));
frenzyFrame1 = new ResearchPage("frenziedFrame.1");
frenzyFrame2 = new ResearchPage((IArcaneRecipe) frenziedFrame);
frenzyFramePage = new ResearchItem(
"MB_FrenziedFrame",
category,
new AspectList().add(Aspect.LIFE, 1).add(Aspect.ORDER, 1).add(Aspect.HEAL, 1)
.add(Aspect.EXCHANGE, 1).add(Aspect.GREED, 1),
-5,
3,
1,
new ItemStack(Config.hiveFrameFrenzy));
bloodFramePage.setPages(bloodFrame1, bloodFrame2);
bloodFramePage.setParents("MB_FrameMagic");
frenzyFramePage.setPages(frenzyFrame1, frenzyFrame2);
frenzyFramePage.setParents("MB_FrameMagic");
ResearchCategories.addResearch(bloodFramePage);
ResearchCategories.addResearch(frenzyFramePage);
}
}
private static ResearchPage getResearchPage(String ident) {