mirror of
https://github.com/GTNewHorizons/ForbiddenMagic.git
synced 2026-11-19 03:39:08 +00:00
Bloodthorn added
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user