mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-17 02:55:19 +00:00
Refactored mod helper handling to use an interface and automatically grab all of them after registration.
Added placeholder effect allele so if any 'oddness' happens when mods are added/removed or compat switched on/off bees won't lose their effects or crash the world. Removed classes no longer used (BlockPlanks, BlockSlab). cya cya cya Added alleles for Blitz & Basalz spawning in anticipation of the relevant bees.
This commit is contained in:
1 parent
8d65e675d1
commit
4d2ea94b76
22 files changed
+359
-557
No files matched your search
@@ -1,12 +1,12 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import thaumcraft.api.nodes.NodeType;
|
||||
import magicbees.api.MagicBeesAPI;
|
||||
import magicbees.bees.allele.effect.AlleleEffectCrumbling;
|
||||
import magicbees.bees.allele.effect.AlleleEffectCure;
|
||||
import magicbees.bees.allele.effect.AlleleEffectEmpowering;
|
||||
import magicbees.bees.allele.effect.AlleleEffectNodeRepair;
|
||||
import magicbees.bees.allele.effect.AlleleEffectNodeConversion;
|
||||
import magicbees.bees.allele.effect.AlleleEffectNodeRepair;
|
||||
import magicbees.bees.allele.effect.AlleleEffectPlaceholder;
|
||||
import magicbees.bees.allele.effect.AlleleEffectPotion;
|
||||
import magicbees.bees.allele.effect.AlleleEffectRecharge;
|
||||
import magicbees.bees.allele.effect.AlleleEffectSpawnMob;
|
||||
@@ -28,6 +28,7 @@ import magicbees.main.utils.compat.BotaniaHelper;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import magicbees.main.utils.compat.ThermalModsHelper;
|
||||
import net.minecraft.potion.Potion;
|
||||
import thaumcraft.api.nodes.NodeType;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
@@ -35,8 +36,30 @@ import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleEffect;
|
||||
import forestry.api.genetics.IAlleleFlowers;
|
||||
import forestry.api.genetics.IAlleleRegistry;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
|
||||
public class Allele implements IAllele {
|
||||
|
||||
private static final String FLOWER_ARS_MAGICA_PLANT = "flowerArsMagicaPlant";
|
||||
private static final String FLOWER_BOTANIA = "flowerBotania";
|
||||
private static final String EFFECT_TE_BLIZZY = "TEBlizzy";
|
||||
private static final String EFFECT_TE_BLITZ = "TEBlitz";
|
||||
private static final String EFFECT_TE_BASALZ = "TEBasalz";
|
||||
private static final String EFFECT_AM_WISP = "AMWisp";
|
||||
private static final String EFFECT_MANA_DRAIN = "ManaDrain";
|
||||
private static final String EFFECT_DREAMING = "Dreaming";
|
||||
private static final String EFFECT_WISPY = "Wispy";
|
||||
private static final String EFFECT_BATTY = "Batty";
|
||||
private static final String EFFECT_BRAINY = "Brainy";
|
||||
private static final String EFFECT_NODE_RAVENING = "NodeRavening";
|
||||
private static final String EFFECT_NODE_PURIFYING = "NodePurifying";
|
||||
private static final String EFFECT_NODE_TAINTING = "NodeTainting";
|
||||
private static final String EFFECT_NODE_REPAIR = "NodeRepair";
|
||||
private static final String EFFECT_NODE_EMPOWER = "NodeEmpower";
|
||||
private static final String EFFECT_VIS_RECHARGE = "VisRecharge";
|
||||
private static final String FLOWERS_AURA_NODE = "AuraNode";
|
||||
private static final String FLOWERS_THAUMCRAFT_PLANT = "ThaumcraftPlant";
|
||||
|
||||
public static AlleleFloat speedBlinding;
|
||||
|
||||
public static IAlleleBeeEffect forestryBaseEffect;
|
||||
@@ -71,110 +94,126 @@ public class Allele implements IAllele {
|
||||
public static IAlleleEffect spawnWisp;
|
||||
public static IAlleleEffect spawnBats;
|
||||
public static IAlleleEffect spawnBlizz;
|
||||
public static IAlleleEffect spawnBlitz;
|
||||
public static IAlleleEffect spawnBasalz;
|
||||
public static IAlleleEffect spawnManaDrainer;
|
||||
public static IAlleleEffect spawnWispOrHecate;
|
||||
|
||||
public static void setupAdditionalAlleles() {
|
||||
forestryBaseEffect = (IAlleleBeeEffect) getBaseAllele("effectNone");
|
||||
IFlowerProvider vanillaFlowers = ((IAlleleFlowers)getBaseAllele("flowersVanilla")).getProvider();
|
||||
|
||||
Allele.speedBlinding = new AlleleFloat("speedBlinding", 2f, false);
|
||||
|
||||
Allele.flowerBookshelf = new AlleleFlower("Bookshelf", new FlowerProviderBookshelf(), true);
|
||||
speedBlinding = new AlleleFloat("speedBlinding", 2f, false);
|
||||
flowerBookshelf = new AlleleFlower("Bookshelf", new FlowerProviderBookshelf(), true);
|
||||
|
||||
if (ThaumcraftHelper.isActive()) {
|
||||
Allele.flowerThaumcraft = new AlleleFlower("ThaumcraftPlant", new FlowerProviderThaumcraftFlower(), false);
|
||||
Allele.flowerAuraNode = new AlleleFlower("AuraNode", new FlowerProviderAuraNode(), true);
|
||||
flowerThaumcraft = new AlleleFlower(FLOWERS_THAUMCRAFT_PLANT, new FlowerProviderThaumcraftFlower(), false);
|
||||
flowerAuraNode = new AlleleFlower(FLOWERS_AURA_NODE, new FlowerProviderAuraNode(), true);
|
||||
|
||||
Allele.effectVisRecharge = new AlleleEffectRecharge("VisRecharge", false);
|
||||
Allele.effectNodeEmpower = new AlleleEffectEmpowering("NodeEmpower", false);
|
||||
Allele.effectNodeRepair = new AlleleEffectNodeRepair("NodeRepair", false);
|
||||
Allele.effectNodeConversionTaint = new AlleleEffectNodeConversion("NodeTainting", NodeType.TAINTED, false, 250);
|
||||
Allele.effectNodeConversionPure = new AlleleEffectNodeConversion("NodePurifying", NodeType.PURE, false, 250);
|
||||
Allele.effectNodeConversionHungry = new AlleleEffectNodeConversion("NodeRavening", NodeType.HUNGRY, false, 2);
|
||||
effectVisRecharge = new AlleleEffectRecharge(EFFECT_VIS_RECHARGE, false);
|
||||
effectNodeEmpower = new AlleleEffectEmpowering(EFFECT_NODE_EMPOWER, false);
|
||||
effectNodeRepair = new AlleleEffectNodeRepair(EFFECT_NODE_REPAIR, false);
|
||||
effectNodeConversionTaint = new AlleleEffectNodeConversion(EFFECT_NODE_TAINTING, NodeType.TAINTED, false, 250);
|
||||
effectNodeConversionPure = new AlleleEffectNodeConversion(EFFECT_NODE_PURIFYING, NodeType.PURE, false, 250);
|
||||
effectNodeConversionHungry = new AlleleEffectNodeConversion(EFFECT_NODE_RAVENING, NodeType.HUNGRY, false, 2);
|
||||
|
||||
Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("Brainy", false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID)
|
||||
spawnBrainyZombie = new AlleleEffectSpawnMob(EFFECT_BRAINY, false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID)
|
||||
.setAggrosPlayerOnSpawn()
|
||||
.setThrottle(800)
|
||||
.setSpawnsOnPlayerNear(null)
|
||||
.setMaxMobsInSpawnZone(2);
|
||||
|
||||
Allele.spawnBats = new AlleleEffectSpawnMob("Batty", false, ThaumcraftHelper.Entity.FIREBAT.entityID)
|
||||
spawnBats = new AlleleEffectSpawnMob(EFFECT_BATTY, false, ThaumcraftHelper.Entity.FIREBAT.entityID)
|
||||
.setThrottle(300)
|
||||
.setSpawnsOnPlayerNear("Bat");
|
||||
|
||||
Allele.spawnWisp = new AlleleEffectSpawnWisp("Wispy", false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive")
|
||||
spawnWisp = new AlleleEffectSpawnWisp(EFFECT_WISPY, false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive")
|
||||
.setThrottle(1800)
|
||||
.setChanceToSpawn(79);
|
||||
} else {
|
||||
Allele.flowerThaumcraft = Allele.flowerAuraNode = (IAlleleFlowers) Allele.getBaseAllele("flowersVanilla");
|
||||
flowerThaumcraft = new AlleleFlower(FLOWERS_THAUMCRAFT_PLANT, vanillaFlowers, false);
|
||||
flowerAuraNode = new AlleleFlower(FLOWERS_AURA_NODE, vanillaFlowers, true);Allele.effectVisRecharge = new AlleleEffectRecharge(EFFECT_VIS_RECHARGE, false);
|
||||
effectNodeEmpower = new AlleleEffectPlaceholder(EFFECT_NODE_EMPOWER, false);
|
||||
effectNodeRepair = new AlleleEffectPlaceholder(EFFECT_NODE_REPAIR, false);
|
||||
effectNodeConversionTaint = new AlleleEffectPlaceholder(EFFECT_NODE_TAINTING, false);
|
||||
effectNodeConversionPure = new AlleleEffectPlaceholder(EFFECT_NODE_PURIFYING, false);
|
||||
effectNodeConversionHungry = new AlleleEffectPlaceholder(EFFECT_NODE_RAVENING, false);
|
||||
spawnBrainyZombie = new AlleleEffectPlaceholder(EFFECT_BRAINY, false);
|
||||
spawnBats = new AlleleEffectPlaceholder(EFFECT_BATTY, false);
|
||||
spawnWisp = new AlleleEffectPlaceholder(EFFECT_WISPY, false);
|
||||
}
|
||||
|
||||
if (BotaniaHelper.isActive()) {
|
||||
Allele.flowerBotania = new AlleleFlower("flowerBotania", new FlowerProviderBotania(), true);
|
||||
flowerBotania = new AlleleFlower(FLOWER_BOTANIA, new FlowerProviderBotania(), true);
|
||||
effectDreaming = new AlleleEffectTransmuting(EFFECT_DREAMING, false,
|
||||
new TransmutationEffectController(new TransmutationEffectLBotaniaLiving()), 100);
|
||||
} else {
|
||||
Allele.flowerBotania = (IAlleleFlowers) Allele.getBaseAllele("flowersVanilla");
|
||||
flowerBotania = new AlleleFlower(FLOWER_BOTANIA, vanillaFlowers, true);
|
||||
effectDreaming = new AlleleEffectPlaceholder(EFFECT_DREAMING, false);
|
||||
}
|
||||
|
||||
if (ArsMagicaHelper.isActive()) {
|
||||
Allele.flowerArsMagica = new AlleleFlower("flowerArsMagicaPlant", new FlowerProviderArsMagicaFlower(), false);
|
||||
// String id, boolean isDominant, int throttle, String[] mobs, int[]
|
||||
// chance
|
||||
Allele.spawnManaDrainer = new AlleleEffectSpawnMobWeighted("ManaDrain", true, 20,
|
||||
flowerArsMagica = new AlleleFlower(FLOWER_ARS_MAGICA_PLANT, new FlowerProviderArsMagicaFlower(), false);
|
||||
spawnManaDrainer = new AlleleEffectSpawnMobWeighted(EFFECT_MANA_DRAIN, true, 20,
|
||||
new String[] { ArsMagicaHelper.Name + ".MobManaCreeper", ArsMagicaHelper.Name + ".ManaVortex" },
|
||||
new int[] { 60, 2 }
|
||||
);
|
||||
|
||||
Allele.spawnWispOrHecate = new AlleleEffectSpawnMobWeighted("AMWisp", true, 20,
|
||||
spawnWispOrHecate = new AlleleEffectSpawnMobWeighted(EFFECT_AM_WISP, true, 20,
|
||||
new String[] { ArsMagicaHelper.Name + ".MobWisp", ArsMagicaHelper.Name + ".MobHecate" },
|
||||
new int[] { 40, 3 }
|
||||
);
|
||||
} else {
|
||||
Allele.flowerArsMagica = (IAlleleFlowers) Allele.getBaseAllele("flowersVanilla");
|
||||
Allele.spawnManaDrainer = Allele.spawnWispOrHecate = (IAlleleEffect) Allele.getBaseAllele("effectNone");
|
||||
flowerArsMagica = new AlleleFlower(FLOWER_ARS_MAGICA_PLANT, vanillaFlowers, false);
|
||||
spawnManaDrainer = new AlleleEffectPlaceholder(EFFECT_MANA_DRAIN, true);
|
||||
spawnWispOrHecate = new AlleleEffectPlaceholder(EFFECT_AM_WISP, true);
|
||||
}
|
||||
|
||||
if (ThermalModsHelper.isActive()) {
|
||||
Allele.spawnBlizz = new AlleleEffectSpawnMob("TEBlizzy", true, ThermalModsHelper.Entity.BLIZZ.entityID)
|
||||
.setThrottle(100)
|
||||
.setChanceToSpawn(80);
|
||||
spawnBlizz = new AlleleEffectSpawnMob(EFFECT_TE_BLIZZY, true, ThermalModsHelper.Entity.BLIZZ.entityID)
|
||||
.setThrottle(100)
|
||||
.setChanceToSpawn(80);
|
||||
spawnBlitz = new AlleleEffectSpawnMob(EFFECT_TE_BLITZ, true, ThermalModsHelper.Entity.BLIZZ.entityID)
|
||||
.setThrottle(100)
|
||||
.setChanceToSpawn(80);
|
||||
spawnBasalz = new AlleleEffectSpawnMob(EFFECT_TE_BASALZ, true, ThermalModsHelper.Entity.BLIZZ.entityID)
|
||||
.setThrottle(100)
|
||||
.setChanceToSpawn(80);
|
||||
} else {
|
||||
Allele.spawnBlizz = (IAlleleEffect) Allele.getBaseAllele("effectNone");
|
||||
}
|
||||
|
||||
if (BotaniaHelper.isActive()) {
|
||||
Allele.effectDreaming = new AlleleEffectTransmuting("Dreaming", false,
|
||||
new TransmutationEffectController(new TransmutationEffectLBotaniaLiving()), 100);
|
||||
spawnBlizz = new AlleleEffectPlaceholder(EFFECT_TE_BLIZZY, true);
|
||||
spawnBlitz = new AlleleEffectPlaceholder(EFFECT_TE_BLITZ, true);
|
||||
spawnBasalz = new AlleleEffectPlaceholder(EFFECT_TE_BASALZ, true);
|
||||
}
|
||||
|
||||
Allele.effectCleansing = new AlleleEffectCure("Curative", false);
|
||||
Allele.effectDigSpeed = new AlleleEffectPotion("DigSpeed", Potion.digSpeed, 15, false);
|
||||
Allele.effectMoveSpeed = new AlleleEffectPotion("MoveSpeed", Potion.moveSpeed, 10, false);
|
||||
Allele.effectSlowSpeed = new AlleleEffectPotion("SlowSpeed", Potion.moveSlowdown, 3, false).setMalicious();
|
||||
Allele.effectWithering = new AlleleEffectPotion("Withering", Potion.wither, 10, false).setMalicious();
|
||||
effectCleansing = new AlleleEffectCure("Curative", false);
|
||||
effectDigSpeed = new AlleleEffectPotion("DigSpeed", Potion.digSpeed, 15, false);
|
||||
effectMoveSpeed = new AlleleEffectPotion("MoveSpeed", Potion.moveSpeed, 10, false);
|
||||
effectSlowSpeed = new AlleleEffectPotion("SlowSpeed", Potion.moveSlowdown, 3, false).setMalicious();
|
||||
effectWithering = new AlleleEffectPotion("Withering", Potion.wither, 10, false).setMalicious();
|
||||
|
||||
TransmutationEffectController controller = new TransmutationEffectController(
|
||||
new TransmutationEffectRailcraft(),
|
||||
new TransmutationEffectVanilla()
|
||||
);
|
||||
MagicBeesAPI.transmutationEffectController = controller;
|
||||
Allele.effectTransmuting = new AlleleEffectTransmuting("Transmuting", true, controller, 200);
|
||||
Allele.effectCrumbling = new AlleleEffectCrumbling("Crumbling", true);
|
||||
effectTransmuting = new AlleleEffectTransmuting("Transmuting", true, controller, 200);
|
||||
effectCrumbling = new AlleleEffectCrumbling("Crumbling", true);
|
||||
|
||||
Allele.effectInvisibility = new AlleleEffectPotion("Invisibility", Potion.invisibility, 10, false);
|
||||
effectInvisibility = new AlleleEffectPotion("Invisibility", Potion.invisibility, 10, false);
|
||||
|
||||
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghastly", false, "Ghast", "mob.ghast.moan")
|
||||
spawnGhast = new AlleleEffectSpawnMob("Ghastly", false, "Ghast", "mob.ghast.moan")
|
||||
.setThrottle(2060)
|
||||
.setChanceToSpawn(10)
|
||||
.setMaxMobsInSpawnZone(1);
|
||||
Allele.spawnSpider = new AlleleEffectSpawnMob("Spidery", false, "Spider", "mob.spider.step")
|
||||
spawnSpider = new AlleleEffectSpawnMob("Spidery", false, "Spider", "mob.spider.step")
|
||||
.setThrottle(400)
|
||||
.setChanceToSpawn(70)
|
||||
.setMaxMobsInSpawnZone(4);
|
||||
Allele.spawnBlaze = new AlleleEffectSpawnMob("Ablaze", false, "Blaze", "mob.blaze.breathe")
|
||||
spawnBlaze = new AlleleEffectSpawnMob("Ablaze", false, "Blaze", "mob.blaze.breathe")
|
||||
.setThrottle(800)
|
||||
.setChanceToSpawn(60)
|
||||
.setMaxMobsInSpawnZone(2);
|
||||
Allele.spawnWolf = new AlleleEffectSpawnMob("Canine", false , "Wolf", "mob.wolf.panting")
|
||||
spawnWolf = new AlleleEffectSpawnMob("Canine", false , "Wolf", "mob.wolf.panting")
|
||||
.setThrottle(650)
|
||||
.setChanceToSpawn(40)
|
||||
.setMaxMobsInSpawnZone(2);
|
||||
@@ -182,84 +221,11 @@ public class Allele implements IAllele {
|
||||
|
||||
public static void registerDeprecatedAlleleReplacements() {
|
||||
IAlleleRegistry registry = AlleleManager.alleleRegistry;
|
||||
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.fertilityHighDominant", Allele.getBaseAllele("fertilityHigh"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.flowerflowerBookshelf", flowerBookshelf);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speedBlinding", speedBlinding);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodeAttract", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodePurify", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodeFlux", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectNodeCharge", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeAttract", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodePurify", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeFlux", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeCharge", Allele.getBaseAllele("effectBeatific"));
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effectCurative", effectCleansing);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effecteffectDigSpeed", effectDigSpeed);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effecteffectMoveSpeed", effectMoveSpeed);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.effecteffectSlowSpeed", effectSlowSpeed);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.Ghast", spawnGhast);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.Spider", spawnSpider);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesEsoteric", BeeSpecies.ESOTERIC);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesMysterious", BeeSpecies.MYSTERIOUS);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesArcane", BeeSpecies.ARCANE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesCharmed", BeeSpecies.CHARMED);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesEnchanted", BeeSpecies.ENCHANTED);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesSupernatural", BeeSpecies.SUPERNATURAL);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesPupil", BeeSpecies.PUPIL);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesScholarly", BeeSpecies.SCHOLARLY);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesSavant", BeeSpecies.SAVANT);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesAware", BeeSpecies.AWARE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesSpirit", BeeSpecies.SPIRIT);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesSoul", BeeSpecies.SOUL);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesSkulking", BeeSpecies.SKULKING);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesGhastly", BeeSpecies.GHASTLY);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesSpidery", BeeSpecies.SPIDERY);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesTimely", BeeSpecies.TIMELY);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesLordly", BeeSpecies.LORDLY);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesDoctoral", BeeSpecies.DOCTORAL);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesIron", BeeSpecies.IRON);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesGold", BeeSpecies.GOLD);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesCopper", BeeSpecies.COPPER);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesTin", BeeSpecies.TIN);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesSilver", BeeSpecies.SILVER);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesLead", BeeSpecies.LEAD);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesDiamond", BeeSpecies.DIAMOND);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesEmerald", BeeSpecies.EMERALD);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesApatite", BeeSpecies.APATITE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesStark", BeeSpecies.TC_CHAOS);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesAura", BeeSpecies.TC_AIR);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesIgnis", BeeSpecies.TC_FIRE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesAqua", BeeSpecies.TC_WATER);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesSolum", BeeSpecies.TC_EARTH);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesPraecantatio", BeeSpecies.TC_ORDER);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesVis", BeeSpecies.TC_VIS);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesPure", BeeSpecies.TC_PURE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesFlux", BeeSpecies.TC_TAINT);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesNode", BeeSpecies.TC_EMPOWERING);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesRejuvenating", BeeSpecies.TC_REJUVENATING);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesBrainy", BeeSpecies.TC_BRAINY);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesGossamer", BeeSpecies.TC_WISPY);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesWispy", BeeSpecies.TC_WISPY);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesBatty", BeeSpecies.TC_BATTY);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesChicken", BeeSpecies.TC_CHICKEN);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesBeef", BeeSpecies.TC_BEEF);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesPork", BeeSpecies.TC_PORK);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesMinium", BeeSpecies.EE_MINIUM);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesEssence", BeeSpecies.AM_ESSENCE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesQuintessence", BeeSpecies.AM_QUINTESSENCE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesErde", BeeSpecies.AM_EARTH);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesLuft", BeeSpecies.AM_AIR);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesFeuer", BeeSpecies.AM_FIRE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesWasser", BeeSpecies.AM_WATER);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesBlitz", BeeSpecies.AM_LIGHTNING);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesStaude", BeeSpecies.AM_PLANT);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesEis", BeeSpecies.AM_ICE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesMagma", BeeSpecies.AM_FIRE);
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.speciesMagma", BeeSpecies.AM_FIRE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesArkanen", BeeSpecies.AM_ARCANE);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesVortex", BeeSpecies.AM_VORTEX);
|
||||
registry.registerDeprecatedAlleleReplacement("thaumicbees.speciesWight", BeeSpecies.AM_WIGHT);
|
||||
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeAttract", effectNodeEmpower);
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodePurify", effectNodeConversionPure);
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeFlux", effectNodeConversionTaint);
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeCharge", effectNodeEmpower);
|
||||
registry.registerDeprecatedAlleleReplacement("magicbees.speciesTCAttractive", BeeSpecies.TC_EMPOWERING);
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ public class BeeProductHelper {
|
||||
EE_MINIUM.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.16f);
|
||||
|
||||
if (EquivalentExchangeHelper.isActive()) {
|
||||
EE_MINIUM.addSpecialty(new ItemStack(Config.eeMinuimShard), 0.6f);
|
||||
EE_MINIUM.addSpecialty(new ItemStack(EquivalentExchangeHelper.minuimShard), 0.6f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,17 +314,17 @@ public class BeeProductHelper {
|
||||
.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f);
|
||||
|
||||
if (ArsMagicaHelper.isActive()) {
|
||||
AM_QUINTESSENCE.addSpecialty(new ItemStack(Config.amItemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()), 0.5f);
|
||||
AM_EARTH.addSpecialty(new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.7f);
|
||||
AM_AIR.addSpecialty(new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.AIR.ordinal()), 0.7f);
|
||||
AM_FIRE.addSpecialty(new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.FIRE.ordinal()), 0.7f);
|
||||
AM_WATER.addSpecialty(new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.WATER.ordinal()), 0.7f);
|
||||
AM_LIGHTNING.addSpecialty(new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.LIGHTNING.ordinal()), 0.7f);
|
||||
AM_PLANT.addSpecialty(new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()), 0.7f);
|
||||
AM_ICE.addSpecialty(new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.ICE.ordinal()), 0.7f);
|
||||
AM_ARCANE.addSpecialty(new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.ARCANE.ordinal()), 0.11f);
|
||||
AM_VORTEX.addSpecialty(new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.15f);
|
||||
AM_WIGHT.addSpecialty(new ItemStack(Config.amItemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()), 0.11f);
|
||||
AM_QUINTESSENCE.addSpecialty(new ItemStack(ArsMagicaHelper.itemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()), 0.5f);
|
||||
AM_EARTH.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.7f);
|
||||
AM_AIR.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.AIR.ordinal()), 0.7f);
|
||||
AM_FIRE.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.FIRE.ordinal()), 0.7f);
|
||||
AM_WATER.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.WATER.ordinal()), 0.7f);
|
||||
AM_LIGHTNING.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.LIGHTNING.ordinal()), 0.7f);
|
||||
AM_PLANT.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()), 0.7f);
|
||||
AM_ICE.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ICE.ordinal()), 0.7f);
|
||||
AM_ARCANE.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ARCANE.ordinal()), 0.11f);
|
||||
AM_VORTEX.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.15f);
|
||||
AM_WIGHT.addSpecialty(new ItemStack(ArsMagicaHelper.itemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()), 0.11f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -354,12 +354,12 @@ public class BeeProductHelper {
|
||||
|
||||
if (ThermalModsHelper.isActive()) {
|
||||
LogHelper.info("Thermal Expansion bees active");
|
||||
TE_BLIZZY.addSpecialty(ThermalModsHelper.teDustBlizz, 0.9f);
|
||||
TE_GELID.addSpecialty(ThermalModsHelper.teDustCryotheum, 0.9f);
|
||||
TE_DANTE.addSpecialty(ThermalModsHelper.teDustSulfur, 0.9f);
|
||||
TE_PYRO.addSpecialty(ThermalModsHelper.teDustPyrotheum, 0.9f);
|
||||
TE_WINSOME.addSpecialty(ThermalModsHelper.teDustPlatinum, 0.9f);
|
||||
TE_ENDEARING.addSpecialty(ThermalModsHelper.teEnderiumNugget, 0.9f);
|
||||
TE_BLIZZY.addSpecialty(ThermalModsHelper.dustBlizz, 0.9f);
|
||||
TE_GELID.addSpecialty(ThermalModsHelper.dustCryotheum, 0.9f);
|
||||
TE_DANTE.addSpecialty(ThermalModsHelper.dustSulfur, 0.9f);
|
||||
TE_PYRO.addSpecialty(ThermalModsHelper.dustPyrotheum, 0.9f);
|
||||
TE_WINSOME.addSpecialty(ThermalModsHelper.dustPlatinum, 0.9f);
|
||||
TE_ENDEARING.addSpecialty(ThermalModsHelper.enderiumNugget, 0.9f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import magicbees.bees.AlleleEffect;
|
||||
|
||||
public class AlleleEffectPlaceholder extends AlleleEffect {
|
||||
|
||||
public AlleleEffectPlaceholder(String id, boolean isDominant) {
|
||||
super(id, isDominant, 100000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEffectData validateStorage(IEffectData storedData) {
|
||||
return storedData;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IEffectData doEffectThrottled(IBeeGenome genome,IEffectData storedData, IBeeHousing housing) {
|
||||
return storedData;
|
||||
}
|
||||
|
||||
}
|
||||
+12
-12
@@ -1,7 +1,7 @@
|
||||
package magicbees.bees.allele.flowerProvider;
|
||||
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -13,11 +13,11 @@ public class FlowerProviderArsMagicaFlower extends FlowerProvider {
|
||||
|
||||
public FlowerProviderArsMagicaFlower() {
|
||||
super(5);
|
||||
flowers.add(new FlowerImpl(Config.amBlackOrchid, 0, 1, true));
|
||||
flowers.add(new FlowerImpl(Config.amDesertNova, 0, 1, true));
|
||||
flowers.add(new FlowerImpl(Config.amAum, 0, 1, true));
|
||||
flowers.add(new FlowerImpl(Config.amWakebloom, 0, 1, true));
|
||||
flowers.add(new FlowerImpl(Config.amTarmaRoot, 0, 1, true));
|
||||
flowers.add(new FlowerImpl(ArsMagicaHelper.blackOrchid, 0, 1, true));
|
||||
flowers.add(new FlowerImpl(ArsMagicaHelper.desertNova, 0, 1, true));
|
||||
flowers.add(new FlowerImpl(ArsMagicaHelper.aum, 0, 1, true));
|
||||
flowers.add(new FlowerImpl(ArsMagicaHelper.wakebloom, 0, 1, true));
|
||||
flowers.add(new FlowerImpl(ArsMagicaHelper.tarmaRoot, 0, 1, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -29,22 +29,22 @@ public class FlowerProviderArsMagicaFlower extends FlowerProvider {
|
||||
int dart = world.rand.nextInt(100);
|
||||
Block block;
|
||||
if (dart > 60) {
|
||||
block = Config.amBlackOrchid;
|
||||
block = ArsMagicaHelper.blackOrchid;
|
||||
} else if (dart > 30) {
|
||||
block = Config.amAum;
|
||||
block = ArsMagicaHelper.aum;
|
||||
} else {
|
||||
block = Config.amTarmaRoot;
|
||||
block = ArsMagicaHelper.tarmaRoot;
|
||||
}
|
||||
world.setBlock(x, y, z, block);
|
||||
flag = true;
|
||||
} else if (blockDown == Blocks.sand) {
|
||||
world.setBlock(x, y, z, Config.amDesertNova);
|
||||
world.setBlock(x, y, z, ArsMagicaHelper.desertNova);
|
||||
flag = true;
|
||||
} else if (blockDown == Blocks.stone) {
|
||||
world.setBlock(x, y, z, Config.amTarmaRoot);
|
||||
world.setBlock(x, y, z, ArsMagicaHelper.tarmaRoot);
|
||||
flag = true;
|
||||
} else if (blockDown == Blocks.water || blockDown == Blocks.water) {
|
||||
world.setBlock(x, y, z, Config.amWakebloom);
|
||||
world.setBlock(x, y, z, ArsMagicaHelper.wakebloom);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
package magicbees.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.block.types.PlankType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockPlanks extends Block
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] IIcons;
|
||||
|
||||
public BlockPlanks()
|
||||
{
|
||||
super(Material.wood);
|
||||
this.setHardness(2.5f);
|
||||
this.setResistance(6.0f);
|
||||
this.setCreativeTab(CreativeTabs.tabBlock);
|
||||
if (Config.areMagicPlanksFlammable)
|
||||
{
|
||||
Blocks.fire.setFireInfo(this, 5, 20);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta)
|
||||
{
|
||||
return meta;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List itemsList)
|
||||
{
|
||||
for (PlankType type : PlankType.values())
|
||||
{
|
||||
itemsList.add(new ItemStack(this, 1, type.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
return this.IIcons[Math.max(0, Math.min(meta & 7, IIcons.length - 1))];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister par1IIconRegister)
|
||||
{
|
||||
this.IIcons = new IIcon[PlankType.values().length];
|
||||
for (PlankType t : PlankType.values())
|
||||
{
|
||||
this.IIcons[t.ordinal()] = par1IIconRegister.registerIcon(CommonProxy.DOMAIN + ":" + t.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package magicbees.block;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.block.types.PlankType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockWoodSlab extends BlockSlab
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public BlockWoodSlab(boolean doubleSlab)
|
||||
{
|
||||
super(doubleSlab, Material.wood);
|
||||
this.setHardness(2.5f);
|
||||
this.setResistance(6.0f);
|
||||
this.setBlockName("tb.slab.wood");
|
||||
this.setCreativeTab(CreativeTabs.tabBlock);
|
||||
this.setLightOpacity(doubleSlab ? 255 : 0);
|
||||
if (Config.areMagicPlanksFlammable)
|
||||
{
|
||||
Blocks.fire.setFireInfo(this, 5, 20);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int id, Random rand, int par3)
|
||||
{
|
||||
return Item.getItemFromBlock(Config.slabWoodHalf);
|
||||
}
|
||||
|
||||
protected ItemStack createStackedBlock(int meta)
|
||||
{
|
||||
return new ItemStack(Config.planksWood, 1, meta & 7);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_150002_b(int meta)
|
||||
{
|
||||
return this.getUnlocalizedName() + "." + PlankType.getType(meta).name;
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List itemsList)
|
||||
{
|
||||
for (PlankType type : PlankType.values())
|
||||
{
|
||||
itemsList.add(new ItemStack(this, 1, type.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
return this.icons[Math.max(0, Math.min(meta & 7, icons.length - 1))];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.icons = new IIcon[PlankType.values().length];
|
||||
for (PlankType t : PlankType.values())
|
||||
{
|
||||
this.icons[t.ordinal()] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":" + t.name);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
||||
{
|
||||
Block block = world.getBlock(x, y, z);
|
||||
|
||||
if (block.isAir(world, x, y, z))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
if (item == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ItemStack(item, 1, getDamageValue(world, x, y, z) & 7);
|
||||
}
|
||||
}
|
||||
@@ -8,9 +8,7 @@ import magicbees.block.BlockEnchantedEarth;
|
||||
import magicbees.block.BlockHive;
|
||||
import magicbees.block.BlockMagicApiary;
|
||||
import magicbees.block.BlockManaAuraProvider;
|
||||
import magicbees.block.BlockPlanks;
|
||||
import magicbees.block.BlockVisAuraProvider;
|
||||
import magicbees.block.BlockWoodSlab;
|
||||
import magicbees.block.types.HiveType;
|
||||
import magicbees.item.ItemCapsule;
|
||||
import magicbees.item.ItemComb;
|
||||
@@ -43,7 +41,6 @@ import magicbees.tileentity.TileEntityEffectJar;
|
||||
import magicbees.tileentity.TileEntityMagicApiary;
|
||||
import magicbees.tileentity.TileEntityManaAuraProvider;
|
||||
import magicbees.tileentity.TileEntityVisAuraProvider;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -104,10 +101,7 @@ public class Config
|
||||
|
||||
public static boolean forestryDebugEnabled;
|
||||
|
||||
public static BlockPlanks planksWood;
|
||||
public static BlockEnchantedEarth enchantedEarth;
|
||||
public static BlockWoodSlab slabWoodHalf;
|
||||
public static BlockWoodSlab slabWoodFull;
|
||||
public static BlockEffectJar effectJar;
|
||||
public static BlockHive hive;
|
||||
public static BlockMagicApiary magicApiary;
|
||||
@@ -147,20 +141,6 @@ public class Config
|
||||
public static Item thaumaturgeBackpackT2;
|
||||
public static BackpackDefinition thaumaturgeBackpackDef;
|
||||
|
||||
//----- Equivalent Exchange Blocks -------------------------
|
||||
//----- Equivalent Exchange Items --------------------------
|
||||
public static Item eeMinuimShard;
|
||||
//----- Ars Magica Blocks ----------------------------------
|
||||
public static Block amResourceBlock;
|
||||
public static Block amBlackOrchid;
|
||||
public static Block amDesertNova;
|
||||
public static Block amAum;
|
||||
public static Block amWakebloom;
|
||||
public static Block amTarmaRoot;
|
||||
//----- Ars Magica Items -----------------------------------
|
||||
public static Item amItemResource;
|
||||
public static Item amEssence;
|
||||
|
||||
//----- Config State info ----------------------------------
|
||||
public static Configuration configuration;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import magicbees.main.utils.CraftingManager;
|
||||
import magicbees.main.utils.IMCManager;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
import magicbees.main.utils.compat.ModHelper;
|
||||
import magicbees.main.utils.compat.ModHelperManager;
|
||||
import magicbees.main.utils.net.NetworkEventHandler;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
@@ -45,7 +45,7 @@ public class MagicBees
|
||||
FMLCommonHandler.instance().bus().register(modConfig);
|
||||
|
||||
// Compatibility Helpers setup time.
|
||||
ModHelper.preInit();
|
||||
ModHelperManager.preInit();
|
||||
|
||||
this.modConfig.setupBlocks();
|
||||
this.modConfig.setupItems();
|
||||
@@ -56,7 +56,7 @@ public class MagicBees
|
||||
@Mod.EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
ModHelper.init();
|
||||
ModHelperManager.init();
|
||||
LogHelper.info("Init completed");
|
||||
|
||||
BeeManager.getBeeRoot();
|
||||
@@ -66,7 +66,7 @@ public class MagicBees
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
ModHelper.postInit();
|
||||
ModHelperManager.postInit();
|
||||
|
||||
BeeManager.lateBeeInit();
|
||||
|
||||
|
||||
@@ -394,11 +394,11 @@ public class CraftingManager {
|
||||
input = ItemInterface.getItemStack("apatite");
|
||||
output = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER, 4);
|
||||
GameRegistry.addShapelessRecipe(output,
|
||||
new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()),
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()),
|
||||
input, input
|
||||
);
|
||||
GameRegistry.addShapelessRecipe(output,
|
||||
new ItemStack(Config.amEssence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()),
|
||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()),
|
||||
input, input
|
||||
);
|
||||
}
|
||||
@@ -564,8 +564,8 @@ public class CraftingManager {
|
||||
if (ArsMagicaHelper.isActive()) {
|
||||
output = newMap();
|
||||
output.put(Config.wax.getStackForType(WaxType.MAGIC), 0.85f);
|
||||
output.put(new ItemStack(Config.amItemResource), 0.10f);
|
||||
output.put(new ItemStack(Config.amItemResource), 0.024f);
|
||||
output.put(new ItemStack(ArsMagicaHelper.itemResource), 0.10f);
|
||||
output.put(new ItemStack(ArsMagicaHelper.itemResource), 0.024f);
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.AM_ESSENCE), output);
|
||||
output = newMap();
|
||||
output.put(ItemInterface.getItemStack("beeswax"), 0.5f);
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.block.Block;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class AppliedEnergisticsHelper {
|
||||
public class AppliedEnergisticsHelper implements IModHelper {
|
||||
|
||||
public static Block skystone;
|
||||
|
||||
@@ -16,19 +16,19 @@ public class AppliedEnergisticsHelper {
|
||||
return isModActive;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
public void preInit() {
|
||||
if (Loader.isModLoaded(Name) && Config.ae2Active) {
|
||||
isModActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
public void init() {
|
||||
if (isActive()) {
|
||||
skystone = GameRegistry.findBlock(Name, "tile.BlockSkyStone");
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
public void postInit() {
|
||||
/*if (isActive()) {
|
||||
}*/
|
||||
}
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
|
||||
public class ArsMagicaHelper {
|
||||
public class ArsMagicaHelper implements IModHelper {
|
||||
|
||||
public static Block resourceBlock;
|
||||
public static Block blackOrchid;
|
||||
public static Block desertNova;
|
||||
public static Block aum;
|
||||
public static Block wakebloom;
|
||||
public static Block tarmaRoot;
|
||||
|
||||
public static Item itemResource;
|
||||
public static Item essence;
|
||||
|
||||
public enum ResourceType {
|
||||
VINTEUM_DUST,
|
||||
@@ -41,16 +53,16 @@ public class ArsMagicaHelper {
|
||||
return isArsMagicaPresent;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
public void preInit() {
|
||||
if (Loader.isModLoaded(Name) && Config.arsMagicaActive) {
|
||||
isArsMagicaPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
public void init() {
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
public void postInit() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
@@ -58,16 +70,16 @@ public class ArsMagicaHelper {
|
||||
}
|
||||
|
||||
private static void getBlocks() {
|
||||
Config.amResourceBlock = BlockInterface.getBlock(Name, "AMOres");
|
||||
Config.amBlackOrchid = BlockInterface.getBlock(Name, "blueOrchid");
|
||||
Config.amDesertNova = BlockInterface.getBlock(Name, "desertNova");
|
||||
Config.amAum = BlockInterface.getBlock(Name, "aum");
|
||||
Config.amWakebloom = BlockInterface.getBlock(Name, "wakebloom");
|
||||
Config.amTarmaRoot = BlockInterface.getBlock(Name, "tarmaRoot");
|
||||
ArsMagicaHelper.resourceBlock = BlockInterface.getBlock(Name, "AMOres");
|
||||
ArsMagicaHelper.blackOrchid = BlockInterface.getBlock(Name, "blueOrchid");
|
||||
ArsMagicaHelper.desertNova = BlockInterface.getBlock(Name, "desertNova");
|
||||
ArsMagicaHelper.aum = BlockInterface.getBlock(Name, "aum");
|
||||
ArsMagicaHelper.wakebloom = BlockInterface.getBlock(Name, "wakebloom");
|
||||
ArsMagicaHelper.tarmaRoot = BlockInterface.getBlock(Name, "tarmaRoot");
|
||||
}
|
||||
|
||||
private static void getItems() {
|
||||
Config.amItemResource = ItemInterface.getItem(Name, "itemOre");
|
||||
Config.amEssence = ItemInterface.getItem(Name, "essence");
|
||||
ArsMagicaHelper.itemResource = ItemInterface.getItem(Name, "itemOre");
|
||||
ArsMagicaHelper.essence = ItemInterface.getItem(Name, "essence");
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
|
||||
public class BloodMagicHelper
|
||||
{
|
||||
public class BloodMagicHelper implements IModHelper {
|
||||
|
||||
//--- Blood Magic Blocks ---
|
||||
public static Block bloodStoneBrick;
|
||||
@@ -32,30 +31,24 @@ public class BloodMagicHelper
|
||||
private static boolean isBloodMagicActive = false;
|
||||
public static final String Name = "AWWayofTime";
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
public static boolean isActive() {
|
||||
return isBloodMagicActive;
|
||||
}
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.bloodMagicActive)
|
||||
{
|
||||
public void preInit() {
|
||||
if (Loader.isModLoaded(Name) && Config.bloodMagicActive) {
|
||||
isBloodMagicActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
public void init() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
public void postInit() {
|
||||
if (isActive()) {
|
||||
// Disabled for now until we can figure out a better way to match these.
|
||||
/*BloodMagicHelper.addAltarRecipeBee(BeeSpecies.MYSTICAL, BeeSpecies.BM_BLOODY, 1, 1000, 100, 100);
|
||||
@@ -63,14 +56,12 @@ public class BloodMagicHelper
|
||||
}
|
||||
}
|
||||
|
||||
public static void getBlocks()
|
||||
{
|
||||
public static void getBlocks() {
|
||||
bloodStoneBrick = BlockInterface.getBlock(Name, "bloodStoneBrick");
|
||||
masterRitualStone = BlockInterface.getBlock(Name, "masterStone");
|
||||
}
|
||||
|
||||
public static void getItems()
|
||||
{
|
||||
public static void getItems() {
|
||||
bloodShard = ItemInterface.getItemStack(Name, "weakBloodShard");
|
||||
incendium = ItemInterface.getItemStack(Name, "incendium");
|
||||
magicales = ItemInterface.getItemStack(Name, "magicales");
|
||||
@@ -83,25 +74,21 @@ public class BloodMagicHelper
|
||||
tennebrae = ItemInterface.getItemStack(Name, "tennebrae");
|
||||
}
|
||||
|
||||
public static void addAltarRecipe(ItemStack requiredItem, ItemStack result, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled)
|
||||
{
|
||||
public static void addAltarRecipe(ItemStack requiredItem, ItemStack result, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled) {
|
||||
AltarRecipeRegistry.registerAltarRecipe(result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled);
|
||||
}
|
||||
|
||||
public static void addAltarRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee, int minTier, int liquidRequired, int consumptionRate, int drainRate)
|
||||
{
|
||||
public static void addAltarRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee, int minTier, int liquidRequired, int consumptionRate, int drainRate) {
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.DRONE), outputBee.getBeeItem(EnumBeeType.DRONE), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.PRINCESS), outputBee.getBeeItem(EnumBeeType.PRINCESS), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
addAltarRecipe(inputBee.getBeeItem(EnumBeeType.QUEEN), outputBee.getBeeItem(EnumBeeType.QUEEN), minTier, liquidRequired, consumptionRate, drainRate, false);
|
||||
}
|
||||
|
||||
public static void addBindingRecipe(ItemStack input, ItemStack output)
|
||||
{
|
||||
public static void addBindingRecipe(ItemStack input, ItemStack output) {
|
||||
BindingRegistry.registerRecipe(output, input);
|
||||
}
|
||||
|
||||
public static void addBindingRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee)
|
||||
{
|
||||
public static void addBindingRecipeBee(BeeSpecies inputBee, BeeSpecies outputBee) {
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.DRONE), outputBee.getBeeItem(EnumBeeType.DRONE));
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.PRINCESS), outputBee.getBeeItem(EnumBeeType.PRINCESS));
|
||||
addBindingRecipe(inputBee.getBeeItem(EnumBeeType.QUEEN), outputBee.getBeeItem(EnumBeeType.QUEEN));
|
||||
|
||||
@@ -24,7 +24,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BotaniaHelper {
|
||||
public class BotaniaHelper implements IModHelper {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon subtileIcons[];
|
||||
@@ -112,13 +112,13 @@ public class BotaniaHelper {
|
||||
return isBotaniaActive;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
public void preInit() {
|
||||
if (Loader.isModLoaded(Name) && Config.botaniaActive) {
|
||||
isBotaniaActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
public void init() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
@@ -127,7 +127,7 @@ public class BotaniaHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
public void postInit() {
|
||||
if (isActive()) {
|
||||
// Hiveacynth would appreciate it if this list existed.
|
||||
BeeManager.populateSpeciesListRarity();
|
||||
|
||||
@@ -1,36 +1,40 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class EquivalentExchangeHelper {
|
||||
public class EquivalentExchangeHelper implements IModHelper {
|
||||
|
||||
public static Item minuimShard;
|
||||
|
||||
private static boolean isEquivalentExchangePresent = false;
|
||||
|
||||
public static boolean isActive() {
|
||||
return isEquivalentExchangePresent;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
public void preInit() {
|
||||
if (Loader.isModLoaded("EE3") && Config.equivalentExchangeActive) {
|
||||
isEquivalentExchangePresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
public void init() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
public void postInit() {
|
||||
}
|
||||
|
||||
private static void getBlocks() {
|
||||
}
|
||||
|
||||
private static void getItems() {
|
||||
Config.eeMinuimShard = ItemInterface.getItem("EE3", "miniumShard");
|
||||
minuimShard = ItemInterface.getItem("EE3", "miniumShard");
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ package magicbees.main.utils.compat;
|
||||
import magicbees.main.Config;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class ExtraBeesHelper {
|
||||
public class ExtraBeesHelper implements IModHelper {
|
||||
|
||||
public enum CombType {
|
||||
BARREN,
|
||||
@@ -96,16 +96,15 @@ public class ExtraBeesHelper {
|
||||
return isEBPresent;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
if (Loader.isModLoaded("ExtraBees") && Config.extraBeesActive)
|
||||
{
|
||||
public void preInit() {
|
||||
if (Loader.isModLoaded("ExtraBees") && Config.extraBeesActive) {
|
||||
isEBPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
public void init() {
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
public void postInit() {
|
||||
}
|
||||
}
|
||||
@@ -20,17 +20,15 @@ import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
public class ForestryHelper
|
||||
{
|
||||
public enum BlockResource
|
||||
{
|
||||
public class ForestryHelper implements IModHelper {
|
||||
|
||||
public enum BlockResource {
|
||||
APATITE,
|
||||
COPPER,
|
||||
TIN,;
|
||||
}
|
||||
|
||||
public enum CraftingMaterial
|
||||
{
|
||||
public enum CraftingMaterial {
|
||||
PULSATING_DUST, // unused
|
||||
PULSATING_MESH,
|
||||
SILK_WISP,
|
||||
@@ -40,8 +38,7 @@ public class ForestryHelper
|
||||
SCENTED_PANELING,;
|
||||
}
|
||||
|
||||
public enum Comb
|
||||
{
|
||||
public enum Comb {
|
||||
HONEY,
|
||||
COCOA,
|
||||
SIMMERING,
|
||||
@@ -60,30 +57,26 @@ public class ForestryHelper
|
||||
MOSSY,;
|
||||
}
|
||||
|
||||
public enum Propolis
|
||||
{
|
||||
public enum Propolis {
|
||||
NORMAL,
|
||||
STICKY, // Unused.
|
||||
PULSATING,
|
||||
SILKY,;
|
||||
}
|
||||
|
||||
public enum Pollen
|
||||
{
|
||||
public enum Pollen {
|
||||
NORMAL,
|
||||
CRYSTALLINE,;
|
||||
}
|
||||
|
||||
public enum CircuitBoard
|
||||
{
|
||||
public enum CircuitBoard {
|
||||
BASIC,
|
||||
ENHANCED,
|
||||
REFINED,
|
||||
INTRICATE,;
|
||||
}
|
||||
|
||||
public enum Tube
|
||||
{
|
||||
public enum Tube {
|
||||
COPPER,
|
||||
TIN,
|
||||
BRONZE,
|
||||
@@ -119,8 +112,7 @@ public class ForestryHelper
|
||||
public static Item craftingResource;
|
||||
public static ItemStack itemHoneycomb;
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
public void preInit() {
|
||||
IHiveRegistry hiveRegistry = HiveManager.hiveRegistry;
|
||||
registerHive(hiveRegistry, HiveDescription.CURIOUS);
|
||||
registerHive(hiveRegistry, HiveDescription.UNUSUAL);
|
||||
@@ -129,37 +121,32 @@ public class ForestryHelper
|
||||
registerHive(hiveRegistry, HiveDescription.INFERNAL);
|
||||
registerHive(hiveRegistry, HiveDescription.OBLIVION);
|
||||
|
||||
if (Config.doSpecialHiveGen)
|
||||
{
|
||||
if (Config.doSpecialHiveGen) {
|
||||
registerHive(hiveRegistry, HiveDescription.INFERNAL_OVERWORLD);
|
||||
registerHive(hiveRegistry, HiveDescription.OBLIVION_OVERWORLD);
|
||||
}
|
||||
}
|
||||
|
||||
public void init() {
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
|
||||
public void postInit() {
|
||||
}
|
||||
|
||||
private static void registerHive(IHiveRegistry hiveRegistry, HiveDescription hiveDescription) {
|
||||
String hiveName = VersionInfo.ModName + ":" + hiveDescription.toString().toLowerCase(Locale.ENGLISH);
|
||||
hiveRegistry.registerHive(hiveName, hiveDescription);
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
}
|
||||
|
||||
private static void getBlocks()
|
||||
{
|
||||
private static void getBlocks() {
|
||||
alvearyBlock = BlockInterface.getBlock("alveary");
|
||||
hiveBlock = BlockInterface.getBlock("beehives");
|
||||
apicultureBlock = BlockInterface.getBlock("apiculture");
|
||||
}
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
private static void getItems() {
|
||||
beeComb = ItemInterface.getItem("beeCombs");
|
||||
pollen = ItemInterface.getItem("pollen");
|
||||
ForestryHelper.craftingResource = ItemInterface.getItem("craftingMaterial");
|
||||
@@ -170,18 +157,15 @@ public class ForestryHelper
|
||||
itemHoneycomb = new ItemStack(beeComb, 1, Comb.HONEY.ordinal());
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateForestryForSpecies(String speciesName)
|
||||
{
|
||||
public static IAllele[] getTemplateForestryForSpecies(String speciesName) {
|
||||
return BeeManager.beeRoot.getTemplate("forestry.species" + speciesName);
|
||||
}
|
||||
|
||||
public static EnumTemperature getEnumTemperatureFromValue(float rawTemp)
|
||||
{
|
||||
public static EnumTemperature getEnumTemperatureFromValue(float rawTemp) {
|
||||
return EnumTemperature.getFromValue(rawTemp);
|
||||
}
|
||||
|
||||
public static EnumHumidity getEnumHumidityFromValue(float rawHumidity)
|
||||
{
|
||||
public static EnumHumidity getEnumHumidityFromValue(float rawHumidity) {
|
||||
return EnumHumidity.getFromValue(rawHumidity);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
public interface IModHelper {
|
||||
|
||||
public void preInit();
|
||||
|
||||
public void init();
|
||||
|
||||
public void postInit();
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
public class ModHelper
|
||||
{
|
||||
public static void preInit()
|
||||
{
|
||||
ForestryHelper.preInit();
|
||||
ExtraBeesHelper.preInit();
|
||||
ThaumcraftHelper.preInit();
|
||||
EquivalentExchangeHelper.preInit();
|
||||
ArsMagicaHelper.preInit();
|
||||
ThermalModsHelper.preInit();
|
||||
RedstoneArsenalHelper.preInit();
|
||||
BloodMagicHelper.preInit();
|
||||
BotaniaHelper.preInit();
|
||||
AppliedEnergisticsHelper.preInit();
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
ForestryHelper.init();
|
||||
ExtraBeesHelper.init();
|
||||
ThaumcraftHelper.init();
|
||||
EquivalentExchangeHelper.init();
|
||||
ArsMagicaHelper.init();
|
||||
ThermalModsHelper.init();
|
||||
RedstoneArsenalHelper.init();
|
||||
BloodMagicHelper.init();
|
||||
BotaniaHelper.init();
|
||||
AppliedEnergisticsHelper.init();
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
ForestryHelper.postInit();
|
||||
ExtraBeesHelper.postInit();
|
||||
ThaumcraftHelper.postInit();
|
||||
EquivalentExchangeHelper.postInit();
|
||||
ArsMagicaHelper.postInit();
|
||||
ThermalModsHelper.postInit();
|
||||
RedstoneArsenalHelper.postInit();
|
||||
BloodMagicHelper.postInit();
|
||||
BotaniaHelper.postInit();
|
||||
AppliedEnergisticsHelper.postInit();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ModHelperManager {
|
||||
|
||||
private static List<IModHelper> helpers;
|
||||
|
||||
public static void preInit() {
|
||||
setupHelpers();
|
||||
|
||||
for (IModHelper helper : helpers) {
|
||||
helper.preInit();
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
for (IModHelper helper : helpers) {
|
||||
helper.init();
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
for (IModHelper helper : helpers) {
|
||||
helper.postInit();
|
||||
}
|
||||
}
|
||||
|
||||
private static void setupHelpers() {
|
||||
helpers = new ArrayList<IModHelper>();
|
||||
|
||||
helpers.add(new ForestryHelper());
|
||||
helpers.add(new ExtraBeesHelper());
|
||||
helpers.add(new ThaumcraftHelper());
|
||||
helpers.add(new EquivalentExchangeHelper());
|
||||
helpers.add(new ArsMagicaHelper());
|
||||
helpers.add(new ThermalModsHelper());
|
||||
helpers.add(new RedstoneArsenalHelper());
|
||||
helpers.add(new BloodMagicHelper());
|
||||
helpers.add(new BotaniaHelper());
|
||||
helpers.add(new AppliedEnergisticsHelper());
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import magicbees.main.utils.ItemInterface;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class RedstoneArsenalHelper {
|
||||
public class RedstoneArsenalHelper implements IModHelper {
|
||||
public enum MiscResource {
|
||||
FLUXED_ELECTRUMBLOCK, ;
|
||||
}
|
||||
@@ -24,17 +24,17 @@ public class RedstoneArsenalHelper {
|
||||
return isRedstoneArsenalPresent;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
public void preInit() {
|
||||
if (Loader.isModLoaded(Name) && Config.redstoneArsenalActive) {
|
||||
isRedstoneArsenalPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
public void init() {
|
||||
// if (isActive()) { }
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
public void postInit() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
|
||||
@@ -33,7 +33,8 @@ import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
|
||||
public class ThaumcraftHelper {
|
||||
public class ThaumcraftHelper implements IModHelper {
|
||||
|
||||
public enum MiscResource {
|
||||
ALUMENTUM,
|
||||
NITOR,
|
||||
@@ -192,7 +193,7 @@ public class ThaumcraftHelper {
|
||||
return isThaumcraftPresent;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
public void preInit() {
|
||||
if (Loader.isModLoaded(Name) && Config.thaumcraftActive) {
|
||||
isThaumcraftPresent = true;
|
||||
aspectTime = new Aspect("tempus", 0xB68CFF, new Aspect[] {
|
||||
@@ -212,14 +213,14 @@ public class ThaumcraftHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
public void init() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
public void postInit() {
|
||||
if (isActive()) {
|
||||
setupItemAspects();
|
||||
setupCrafting();
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class ThermalModsHelper {
|
||||
public class ThermalModsHelper implements IModHelper {
|
||||
|
||||
public enum MiscResource {
|
||||
EnderiumBlock,
|
||||
@@ -32,7 +32,10 @@ public class ThermalModsHelper {
|
||||
}
|
||||
|
||||
public enum Entity {
|
||||
BLIZZ("Blizz"),;
|
||||
BLIZZ("Blizz"),
|
||||
BLITZ("Blitz"),
|
||||
BASALZ("Basalz"),
|
||||
;
|
||||
|
||||
public final String entityID;
|
||||
|
||||
@@ -43,26 +46,30 @@ public class ThermalModsHelper {
|
||||
}
|
||||
|
||||
//---ThermalExpansion Items ---
|
||||
public static ItemStack teEnderiumBlock;
|
||||
public static ItemStack teElectrumBlock;
|
||||
public static ItemStack teInvarBlock;
|
||||
public static ItemStack teNickelBlock;
|
||||
public static ItemStack tePlatinumBlock;
|
||||
public static ItemStack teBronzeBlock;
|
||||
public static ItemStack teEnderiumNugget;
|
||||
public static ItemStack teInvarNugget;
|
||||
public static ItemStack teElectrumNugget;
|
||||
public static ItemStack teNickelNugget;
|
||||
public static ItemStack tePlatinumNugget;
|
||||
public static ItemStack teDustCryotheum;
|
||||
public static ItemStack teDustBlizz;
|
||||
public static ItemStack teDustPyrotheum;
|
||||
public static ItemStack teDustSulfur;
|
||||
public static ItemStack teDustPlatinum;
|
||||
public static FluidStack teFluidGlowstone;
|
||||
public static FluidStack teFluidCoal;
|
||||
public static FluidStack teFluidRedstone;
|
||||
public static FluidStack teFluidEnder;
|
||||
public static ItemStack enderiumBlock;
|
||||
public static ItemStack electrumBlock;
|
||||
public static ItemStack invarBlock;
|
||||
public static ItemStack nickelBlock;
|
||||
public static ItemStack platinumBlock;
|
||||
public static ItemStack bronzeBlock;
|
||||
public static ItemStack enderiumNugget;
|
||||
public static ItemStack invarNugget;
|
||||
public static ItemStack electrumNugget;
|
||||
public static ItemStack nickelNugget;
|
||||
public static ItemStack platinumNugget;
|
||||
public static ItemStack dustCryotheum;
|
||||
public static ItemStack dustBlizz;
|
||||
public static ItemStack dustPyrotheum;
|
||||
public static ItemStack dustBlitz;
|
||||
public static ItemStack dustAerotheum;
|
||||
public static ItemStack dustBasalz;
|
||||
public static ItemStack dustPetrotheum;
|
||||
public static ItemStack dustSulfur;
|
||||
public static ItemStack dustPlatinum;
|
||||
public static FluidStack fluidGlowstone;
|
||||
public static FluidStack fluidCoal;
|
||||
public static FluidStack fluidRedstone;
|
||||
public static FluidStack fluidEnder;
|
||||
|
||||
public static final String Name = "ThermalExpansion";
|
||||
private static boolean isThermalExpansionPresent = false;
|
||||
@@ -71,13 +78,13 @@ public class ThermalModsHelper {
|
||||
return isThermalExpansionPresent;
|
||||
}
|
||||
|
||||
public static void preInit() {
|
||||
public void preInit() {
|
||||
if (Loader.isModLoaded(Name) && Config.thermalExpansionActive) {
|
||||
isThermalExpansionPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
public void init() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
@@ -86,37 +93,41 @@ public class ThermalModsHelper {
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit() {
|
||||
public void postInit() {
|
||||
// if (isActive()) { }
|
||||
}
|
||||
|
||||
private static void getFluids() {
|
||||
teFluidGlowstone = FluidRegistry.getFluidStack("glowstone", 50);
|
||||
teFluidCoal = FluidRegistry.getFluidStack("coal", 50);
|
||||
teFluidRedstone = FluidRegistry.getFluidStack("redstone", 50);
|
||||
teFluidEnder = FluidRegistry.getFluidStack("ender", 50);
|
||||
fluidGlowstone = FluidRegistry.getFluidStack("glowstone", 50);
|
||||
fluidCoal = FluidRegistry.getFluidStack("coal", 50);
|
||||
fluidRedstone = FluidRegistry.getFluidStack("redstone", 50);
|
||||
fluidEnder = FluidRegistry.getFluidStack("ender", 50);
|
||||
}
|
||||
|
||||
private static void getBlocks() {
|
||||
teEnderiumBlock = GameRegistry.findItemStack(Name, "blockEnderium", 1);
|
||||
teElectrumBlock = GameRegistry.findItemStack(Name, "blockElectrum", 1);
|
||||
teInvarBlock = GameRegistry.findItemStack(Name, "blockInvar", 1);
|
||||
teNickelBlock = GameRegistry.findItemStack(Name, "blockNickel", 1);
|
||||
tePlatinumBlock = GameRegistry.findItemStack(Name, "blockPlatinum", 1);
|
||||
teBronzeBlock = GameRegistry.findItemStack(Name, "blockBronze", 1);
|
||||
enderiumBlock = GameRegistry.findItemStack(Name, "blockEnderium", 1);
|
||||
electrumBlock = GameRegistry.findItemStack(Name, "blockElectrum", 1);
|
||||
invarBlock = GameRegistry.findItemStack(Name, "blockInvar", 1);
|
||||
nickelBlock = GameRegistry.findItemStack(Name, "blockNickel", 1);
|
||||
platinumBlock = GameRegistry.findItemStack(Name, "blockPlatinum", 1);
|
||||
bronzeBlock = GameRegistry.findItemStack(Name, "blockBronze", 1);
|
||||
}
|
||||
|
||||
private static void getItems() {
|
||||
teEnderiumNugget = GameRegistry.findItemStack(Name, "nuggetEnderium", 1);
|
||||
teInvarNugget = GameRegistry.findItemStack(Name, "nuggetInvar", 1);
|
||||
teElectrumNugget = GameRegistry.findItemStack(Name, "nuggetElectrum", 1);
|
||||
teNickelNugget = GameRegistry.findItemStack(Name, "nuggetNickel", 1);
|
||||
tePlatinumNugget = GameRegistry.findItemStack(Name, "nuggetPlatinum", 1);
|
||||
teDustCryotheum = GameRegistry.findItemStack(Name, "dustCryotheum", 1);
|
||||
teDustBlizz = GameRegistry.findItemStack(Name, "dustBlizz", 1);
|
||||
teDustPyrotheum = GameRegistry.findItemStack(Name, "dustPyrotheum", 1);
|
||||
teDustSulfur = GameRegistry.findItemStack(Name, "dustSulfur", 1);
|
||||
teDustPlatinum = GameRegistry.findItemStack(Name, "dustPlatinum", 1);
|
||||
enderiumNugget = GameRegistry.findItemStack(Name, "nuggetEnderium", 1);
|
||||
invarNugget = GameRegistry.findItemStack(Name, "nuggetInvar", 1);
|
||||
electrumNugget = GameRegistry.findItemStack(Name, "nuggetElectrum", 1);
|
||||
nickelNugget = GameRegistry.findItemStack(Name, "nuggetNickel", 1);
|
||||
platinumNugget = GameRegistry.findItemStack(Name, "nuggetPlatinum", 1);
|
||||
dustCryotheum = GameRegistry.findItemStack(Name, "dustCryotheum", 1);
|
||||
dustBlizz = GameRegistry.findItemStack(Name, "dustBlizz", 1);
|
||||
dustPyrotheum = GameRegistry.findItemStack(Name, "dustPyrotheum", 1);
|
||||
dustBlitz = GameRegistry.findItemStack(Name, "dustBlitz", 1);
|
||||
dustAerotheum = GameRegistry.findItemStack(Name, "dustAerotheum", 1);
|
||||
dustBasalz = GameRegistry.findItemStack(Name, "dustBasalz", 1);
|
||||
dustPetrotheum = GameRegistry.findItemStack(Name, "dustPetrotheum", 1);
|
||||
dustSulfur = GameRegistry.findItemStack(Name, "dustSulfur", 1);
|
||||
dustPlatinum = GameRegistry.findItemStack(Name, "dustPlatinum", 1);
|
||||
}
|
||||
|
||||
private static void setupCrafting() {
|
||||
@@ -126,7 +137,7 @@ public class ThermalModsHelper {
|
||||
toSend.setTag("output", new NBTTagCompound());
|
||||
ItemStack carbonDrop = Config.drops.getStackForType(DropType.CARBON);
|
||||
carbonDrop.writeToNBT(toSend.getCompoundTag("input"));
|
||||
teFluidCoal.writeToNBT(toSend.getCompoundTag("output"));
|
||||
fluidCoal.writeToNBT(toSend.getCompoundTag("output"));
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
|
||||
|
||||
@@ -136,7 +147,7 @@ public class ThermalModsHelper {
|
||||
toSend.setTag("output", new NBTTagCompound());
|
||||
ItemStack destabilizedDrop = Config.drops.getStackForType(DropType.DESTABILIZED);
|
||||
destabilizedDrop.writeToNBT(toSend.getCompoundTag("input"));
|
||||
teFluidRedstone.writeToNBT(toSend.getCompoundTag("output"));
|
||||
fluidRedstone.writeToNBT(toSend.getCompoundTag("output"));
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
|
||||
toSend = new NBTTagCompound();
|
||||
@@ -145,7 +156,7 @@ public class ThermalModsHelper {
|
||||
toSend.setTag("output", new NBTTagCompound());
|
||||
ItemStack endearingDrop = Config.drops.getStackForType(DropType.ENDEARING);
|
||||
endearingDrop.writeToNBT(toSend.getCompoundTag("input"));
|
||||
teFluidEnder.writeToNBT(toSend.getCompoundTag("output"));
|
||||
fluidEnder.writeToNBT(toSend.getCompoundTag("output"));
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
|
||||
toSend = new NBTTagCompound();
|
||||
@@ -154,7 +165,7 @@ public class ThermalModsHelper {
|
||||
toSend.setTag("output", new NBTTagCompound());
|
||||
ItemStack luxDrop = Config.drops.getStackForType(DropType.LUX);
|
||||
luxDrop.writeToNBT(toSend.getCompoundTag("input"));
|
||||
teFluidGlowstone.writeToNBT(toSend.getCompoundTag("output"));
|
||||
fluidGlowstone.writeToNBT(toSend.getCompoundTag("output"));
|
||||
FMLInterModComms.sendMessage("ThermalExpansion", "CrucibleRecipe", toSend);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user