Bloodthorn added

This commit is contained in:
Jeremy Diamond committed 2014-11-22 21:06:13 -08:00
1 parent 82d6e0e8a5
commit e528d6911b
4 files changed
+98 -1

No files matched your search

@@ -1,10 +1,12 @@
package fox.spiteful.forbidden.compat;
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import fox.spiteful.forbidden.Config;
import fox.spiteful.forbidden.DarkResearchItem;
import fox.spiteful.forbidden.LogHandler;
import fox.spiteful.forbidden.items.ForbiddenItems;
import fox.spiteful.forbidden.tiles.SubTileBloodthorn;
import fox.spiteful.forbidden.tiles.SubTileEuclidaisy;
import fox.spiteful.forbidden.tiles.SubTileTainthistle;
import fox.spiteful.forbidden.tiles.SubTileWhisperweed;
@@ -113,6 +115,29 @@ public class ForbiddenBotany {
InfusionRecipe thistlecraft = ThaumcraftApi.addInfusionCraftingRecipe("TAINTHISTLE", tainthistle, 4, (new AspectList()).add(Aspect.TAINT, 8).add(Aspect.HUNGER, 4).add(Aspect.AIR, 4).add(Aspect.WATER, 4), new ItemStack(ConfigItems.itemResource, 1, 12), new ItemStack[] { new ItemStack(petal, 1, 10), new ItemStack(manaPetal, 1, 10), new ItemStack(manaPetal, 1, 10), new ItemStack(rune, 1, 10), new ItemStack(rune, 1, 8)});
(new DarkResearchItem("TAINTHISTLE", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.PLANT, 8).add(Aspect.TAINT, 10).add(Aspect.MAGIC, 4), -8, 4, 8, tainthistle)).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTHISTLE.1"), new ResearchPage(thistlecraft) }).setParents(new String[] { "INFAUXSION" }).setConcealed().registerResearchItem();
if(Compat.bm){
BotaniaAPI.registerSubTile("bloodthorn", SubTileBloodthorn.class);
BotaniaAPI.registerSubTileSignature(SubTileBloodthorn.class, new DarkSignature("bloodthorn"));
BotaniaAPI.addSubTileToCreativeMenu("bloodthorn");
SubTileBloodthorn.lexicon = new ForbiddenLexicon("bloodthorn", functional){
@Override
public String getSubtitle(){
return "[Forbidden Magic][Blood Magic]";
}
};
SubTileBloodthorn.lexicon.addPage(BotaniaAPI.internalHandler.textPage("forbidden.lexicon.bloodthorn.0"));
ItemStack bloodthorn = getFlower("bloodthorn");
try{
AltarRecipeRegistry.registerAltarRecipe(bloodthorn, new ItemStack(flower, 1, 14), 4, 15000, 25, 50, false);
}
catch(Throwable e){
LogHandler.log(Level.INFO, e, "Forbidden Magic tried to do some Blood Magic, but bled out.");
}
}
ThaumcraftApi.registerObjectTag(GameRegistry.findItemStack("Botania", "specialFlower", 1), (new AspectList()).add(Aspect.PLANT, 4).add(Aspect.MAGIC, 1));
} catch (Throwable e) {
@@ -0,0 +1,69 @@
/**
* This class based on a class created by <Vazkii>.
*
* It was distributed as part of the Botania Mod.
* Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* File Created @ [May 15, 2014, 4:47:41 PM (GMT)]
*/
package fox.spiteful.forbidden.tiles;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.SubTileFunctional;
import java.util.List;
public class SubTileBloodthorn extends SubTileFunctional {
public static LexiconEntry lexicon;
@Override
public void onUpdate() {
super.onUpdate();
if(redstoneSignal > 0)
return;
final int range = 6;
final int cost = 40;
List<EntityLivingBase> entities = supertile.getWorldObj().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - range, supertile.zCoord - range, supertile.xCoord + range, supertile.yCoord + range, supertile.zCoord + range));
for(EntityLivingBase entity : entities) {
if(!(entity instanceof EntityPlayer) && entity.getActivePotionEffect(Potion.weakness) == null && mana >= cost && !entity.worldObj.isRemote) {
entity.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
mana -= cost;
}
}
}
@Override
public boolean acceptsRedstone() {
return true;
}
@Override
public int getColor() {
return 0x7D0600;
}
@Override
public int getMaxMana() {
return 360;
}
@Override
public LexiconEntry getEntry() {
return lexicon;
}
@Override
public IIcon getIcon(){
return BotaniaAPI.getSignatureForName("bloodthorn").getIconForStack(null);
}
}
@@ -89,6 +89,7 @@ tile.blackRoseBush.name=Umbral Rose Bush
darkflower.euclidaisy.name=Euclidaisy
darkflower.whisperweed.name=Whisperweed
darkflower.tainthistle.name=Tainthistle
darkflower.bloodthorn.name=Bloodthorn
#
# Enchantments
enchantment.cluster=Fiery Core
@@ -301,4 +302,6 @@ forbidden.lexicon.euclidaisy.0=The eerie, pink &1Euclidaisy&0 is an oddity. It u
forbidden.lexicon.whisperweed=Whisperweed
forbidden.lexicon.whisperweed.0=The &1Whisperweed&0 is an unpleasant plant that whispers secrets into the ears of anyone who'll listen. There doesn't seem to be much point to the plant, since the secrets aren't even relevant to botany.<br>&oMore secrets than Wan Shi Tong&r
forbidden.lexicon.tainthistle=Tainthistle
forbidden.lexicon.tainthistle.0=The disgusting &1Tainthistle&0 derives sustenance from the tainted runoff of magical experiments. It'll suck up any such substance it can find and try to turn it into mana. Since Botany is an environmentally friendly practice, there doesn't seem to be much point to it.<br>&oMore intrusive than a Spirit Vine&r
forbidden.lexicon.tainthistle.0=The disgusting &1Tainthistle&0 derives sustenance from the tainted runoff of magical experiments. It'll suck up any such substance it can find and try to turn it into mana. Since Botany is an environmentally friendly practice, there doesn't seem to be much point to it.<br>&oMore intrusive than a Spirit Vine&r
forbidden.lexicon.bloodthorn=Bloodthorn
forbidden.lexicon.bloodthorn.0=The results of some sick, twisted Blood Mage's experiments, the &1Bloodthorn&0 is a red mystical flower that has been steeped in blood until it developed a taste for the life force of all things. It uses mana to inflict an extreme level of Weakness on surrounding creatures that is unmatched by any conventional alchemy.<br>&oYakone's legacy&r
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB