mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-21 20:52:24 +00:00
Added Botania Transmutation effect for Alfheim bees.
Refactored the Aura provider code to not depend on Thaumcraft & allow for other modes of providing aura to bees. Added Mana Apiary Booster. Added Botania lexicon integration for Alfheim bee, Mana apiary booster.
This commit is contained in:
1 parent
549433e445
commit
83f82decd8
20 files changed
+389
-84
No files matched your search
@@ -0,0 +1,33 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import magicbees.api.bees.AuraChargeType;
|
||||
|
||||
public enum AuraCharge {
|
||||
MUTATION(AuraChargeType.MUTATION, 850, 11),
|
||||
DEATH(AuraChargeType.DEATH, 400, 5),
|
||||
PRODUCTION(AuraChargeType.PRODUCTION, 300, 3),
|
||||
;
|
||||
|
||||
public final AuraChargeType type;
|
||||
public final int duration;
|
||||
/** The number of ticks to count between draining vis from the environment **/
|
||||
public final int tickRate;
|
||||
public final int flag;
|
||||
|
||||
AuraCharge(AuraChargeType chargeType, int duration, int tickRate) {
|
||||
this.type = chargeType;
|
||||
this.duration = duration;
|
||||
this.tickRate = tickRate;
|
||||
flag = 1 << ordinal();
|
||||
}
|
||||
|
||||
public static AuraCharge fromChargeType(AuraChargeType type) {
|
||||
for (AuraCharge charge : values()) {
|
||||
if (type == charge.type) {
|
||||
return charge;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package magicbees.bees;
|
||||
|
||||
import magicbees.api.bees.IAuraChargeType;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public enum AuraChargeType implements IAuraChargeType {
|
||||
MUTATION(Aspect.WATER, 850, 11),
|
||||
DEATH(Aspect.ENTROPY, 400, 5),
|
||||
PRODUCTION(Aspect.AIR, 300, 3);
|
||||
|
||||
public final int duration;
|
||||
public final Aspect aspect;
|
||||
/** The number of ticks to count between draining vis from the environment **/
|
||||
public final int tickRate;
|
||||
public final int flag = 1 << ordinal();
|
||||
|
||||
AuraChargeType(Aspect aspect, int duration, int tickRate) {
|
||||
this.aspect = aspect;
|
||||
this.duration = duration;
|
||||
this.tickRate = tickRate;
|
||||
}
|
||||
}
|
||||
@@ -1366,7 +1366,7 @@ public class BeeGenomeManager {
|
||||
public static IAllele[] getTemplateBotAelfheim() {
|
||||
IAllele[] genome = getTemplateBotDreaming();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BOT_AELFHEIM;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BOT_ALFHEIM;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectDreaming;
|
||||
|
||||
return genome;
|
||||
|
||||
@@ -318,10 +318,10 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
BOT_SOMNOLENT("BotSomnolent", "soporatus",
|
||||
BeeClassification.BOTANICAL, 0x2978C6, 0xFFB2BB, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
BOT_DREAMING("BotDreaming", "somnior",
|
||||
BeeClassification.BOTANICAL, 0x123456, 0xFFB2BB, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||
BeeClassification.BOTANICAL, 0x123456, 0xFFB2BB, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
|
||||
BOT_AELFHEIM("BotAelfheim", "aelfheimis",
|
||||
BeeClassification.BOTANICAL, -1/*0x987654*/, -1/*0xFFB2BB*/, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||
BOT_ALFHEIM("BotAlfheim", "alfheimis",
|
||||
BeeClassification.BOTANICAL, -1, -1, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||
|
||||
;
|
||||
|
||||
@@ -1054,7 +1054,7 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
.setGenome(BeeGenomeManager.getTemplateBotDreaming())
|
||||
.register();
|
||||
|
||||
BOT_AELFHEIM
|
||||
BOT_ALFHEIM
|
||||
.setGenome(BeeGenomeManager.getTemplateBotAelfheim())
|
||||
.register();
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package magicbees.bees.allele.effect;
|
||||
|
||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||
import magicbees.main.utils.compat.BotaniaHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class TransmutationEffectLBotaniaLiving implements ITransmutationEffectLogic {
|
||||
|
||||
@Override
|
||||
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||
int[] oreIDs = OreDictionary.getOreIDs(sourceBlock);
|
||||
for (int oreId : oreIDs) {
|
||||
if (oreId == OreDictionary.getOreID("logWood")) {
|
||||
world.setBlock(x, y, z, BotaniaHelper.blockLivingWood);
|
||||
return true;
|
||||
}
|
||||
else if (oreId == OreDictionary.getOreID("stone")) {
|
||||
world.setBlock(x, y, z, BotaniaHelper.blockLivingRock);
|
||||
return true;
|
||||
}
|
||||
else if (oreId == OreDictionary.getOreID("livingwood")) {
|
||||
world.setBlock(x, y, z, BotaniaHelper.blockDreamWood);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user