Corrupting enchant and Gluttony shards

This commit is contained in:
Jeremy Diamond committed 2014-02-17 18:00:28 -08:00
1 parent 0d58ce9c77
commit cd01464b66
10 files changed
+202 -14

No files matched your search

+11 -5
View File
@@ -32,6 +32,7 @@ item.MobCrystalEmpty.name=Blank Imprinting Crystal
item.MobCrystal.name=Imprinted Crystal
item.DiabolistFork.name=Diabolist Fork
item.DiabolistSpork.name=Spork of Doom
item.GluttonyShard.name=Gluttony Shard
#
# Wand components
item.Wand.tainted.rod=Tainted
@@ -61,9 +62,10 @@ tile.WrathCage.name=Wrath Cage
# Enchantments
enchantment.cluster=Fiery Core
enchantment.pigbane=Porcivore
enchantment.greedy=Greedy
enchantment.greedy=Capitalist
enchantment.consuming=Consuming
enchantment.educational=Educational
enchantment.corrupting=Corrupting
#
# Misc
itemGroup.forbidden=Forbidden Magic
@@ -156,9 +158,9 @@ forbidden.research_name.CLUSTER=Enchantment: Fiery Core
forbidden.research_text.CLUSTER=Chameleon of the Core
forbidden.research_page.CLUSTER.1=You've discovered an enchantment to allow the Chameleon Pickaxe to imitate the effects of the Pickaxe of the Core. A Chameleon Pickaxe with the Fiery Core enchantment has a chance of dropping clusters when mining certain ores. Clusters are a lot purer than raw ore and can be smelted for two of the ore's normal smelting result. Higher levels of Fiery Core increase the chance of dropping clusters.
#
forbidden.research_name.GREEDY=Enchantment: Greedy
forbidden.research_text.GREEDY=I want your money AND your life!
forbidden.research_page.GREEDY.1=You've discovered a weapon enchantment that allows you to profit from taking lives. Every time a Greedy weapon slays a hostile creature, there's a chance to drop an Emerald Fragment. If a Greedy Weapon is used to kill a villager, it will instead drop one of the villager's emeralds.
forbidden.research_name.GREEDY=Enchantment: Capitalist
forbidden.research_text.GREEDY=Unregulated enchanting
forbidden.research_page.GREEDY.1=You've discovered a weapon enchantment that allows you to profit from taking lives. Every time a Capitalist weapon slays a hostile creature, there's a chance to drop an Emerald Fragment. If a Capitalist Weapon is used to kill a villager, it will instead drop one of the villager's emeralds.
#
forbidden.research_name.CONSUMING=Enchantment: Consuming
forbidden.research_text.CONSUMING=Garbage Disposal
@@ -169,9 +171,13 @@ forbidden.research_text.PIGBANE=Show those Zombie Pigmen who's at the top of the
forbidden.research_page.PIGBANE.1=Zombie Pigmen think they're so great. They're always stomping around the Nether ganging up on innocent travelers. It's time someone put a stop to them.<BR><BR>Weapons with the Porcivore enchantment will do excessive amounts of damage to Pigs and Zombie Pigmen.
#
forbidden.research_name.EDUCATIONAL=Enchantment: Educational
forbidden.research_text.EDUCATIONAL=Get a learn job!
forbidden.research_text.EDUCATIONAL=You will LEARN!
forbidden.research_page.EDUCATIONAL.1=You've created an enchantment to infuse a weapon with the very essence of knowledge and learning. Hammering such learning into monsters' heads will result in them dropping more experience than normal, depending on the level of enchantment.
#
forbidden.research_name.CORRUPTING=Enchantment: Corrupting
forbidden.research_text.CORRUPTING=A bad influence on shards
forbidden.research_page.CORRUPTING.1=The Nether is great and all, but it's also kind of a... Hell Hole.<BR><BR>The Corrupting enchant allows you to harvest Nether Shards without having to be in the Nether. A pickaxe enchanted with Corrupting will randomly corrupt harvested elemental shards, changing them into nether shards. The shards only seem susceptible while they are encased in infused stone, so corrupting a shard cluster will have no effect.
#
forbidden.research_name.TAINTBASICS=Tainted Lands
forbidden.research_text.TAINTBASICS=Deep Purple
forbidden.research_page.TAINTBASICS.1=Sometimes, Thaumaturgy goes horribly wrong. Miracles become twisted calamities and the very landscape twists into hideous forms. Tainted Lands are places infected by the sick runoff of magical workings, flux. Local flora and fauna become warped and mutated into forms hostile to normal life and the very ground of a tainted land infects those who tread upon its pulsing fibres.
+11 -3
View File
@@ -40,6 +40,7 @@ public class Config
public static int morphShovelID;
public static int morphAxeID;
public static int wandCapID;
public static int gluttonyShardID;
public static int arcaneCakeBlockID;
public static int blackFlowerBlockID;
@@ -50,11 +51,14 @@ public class Config
public static int greedyEnchID;
public static int consumingEnchID;
public static int educationalEnchID;
public static int corruptingEnchID;
public static int thaumcraftResourceID;
public static int thaumcraftTaintBlockID;
public static int thaumcraftTaintPotionID;
public static int thaumcraftTaintBiomeID;
public static int thaumcraftOreID;
public static int thaumcraftShardID;
public static boolean noLust = false;
public static boolean noHell = false;
@@ -92,6 +96,7 @@ public class Config
morphShovelID = conf.getItem("Chameleon Shovel", idCount++).getInt();
morphAxeID = conf.getItem("Chameleon Axe", idCount++).getInt();
wandCapID = conf.getItem("Wand Caps", idCount++).getInt();
gluttonyShardID = conf.getItem("Gluttony Shard", idCount++).getInt();
int blockCount = 3000;
arcaneCakeBlockID = conf.getBlock("Thaumic Cake", blockCount++).getInt();
@@ -101,9 +106,10 @@ public class Config
int enchCount = 66;
clusterEnchID = conf.get("enchantments", "Fiery Core", enchCount++).getInt();
pigBaneEnchID = conf.get("enchantments", "Porcivore", enchCount++).getInt();
greedyEnchID = conf.get("enchantments", "Greedy", enchCount++).getInt();
greedyEnchID = conf.get("enchantments", "Capitalist", enchCount++).getInt();
consumingEnchID = conf.get("enchantments", "Consuming", enchCount++).getInt();
educationalEnchID = conf.get("enchantments", "Educational", enchCount++).getInt();
corruptingEnchID = conf.get("enchantments", "Corrupting", enchCount++).getInt();
Property nl = conf.get("general", "No Lust", noLust);
nl.comment = "Enable to remove Luxuria aspect and related items.";
@@ -114,8 +120,8 @@ public class Config
Property sf = conf.get("general", "Silverfish Drop Emerald Nuggets", silverfishEmeralds);
sf.comment = "Disable to prevent Silverfish from dropping emerald nuggets.";
silverfishEmeralds = sf.getBoolean(true);
Property ge = conf.get("general", "Greedy Enchantment", greedyEnch);
ge.comment = "Disable to remove the recipe and effects of the Greedy enchantment.";
Property ge = conf.get("general", "Capitalist Enchantment", greedyEnch);
ge.comment = "Disable to remove the recipe and effects of the Capitalist enchantment.";
greedyEnch = ge.getBoolean(true);
Property et = conf.get("general", "Emerald Transmutation", emeraldTrans);
et.comment = "Disable to remove the Emerald Transmutation research and recipe.";
@@ -150,7 +156,9 @@ public class Config
try {
thaumcraftResourceID = ItemApi.getItem("itemResource", 0).itemID;
thaumcraftShardID = ItemApi.getItem("itemShard", 0).itemID;
thaumcraftTaintBlockID = ItemApi.getBlock("blockTaint", 0).itemID;
thaumcraftOreID = ItemApi.getBlock("blockCustomOre", 0).itemID;
taintMaterial = Block.blocksList[thaumcraftTaintBlockID].blockMaterial;
thaumcraftTaintPotionID = Class.forName("thaumcraft.common.config.Config").getField("potionFluxTaintID").getInt(null);
+4 -4
View File
@@ -71,7 +71,7 @@ public class DarkAspects
ThaumcraftApi.registerObjectTag(Item.netherrackBrick.itemID, -1, list);
list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.ghastTear));
list.add(NETHER, 2).add(WRATH, 4);
list.add(WRATH, 4);
ThaumcraftApi.registerObjectTag(Item.ghastTear.itemID, -1, list);
list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Item.skull.itemID, 1, 1));
@@ -86,9 +86,9 @@ public class DarkAspects
list.add(PRIDE, 1);
ThaumcraftApi.registerObjectTag(Item.enderPearl.itemID, -1, list);
list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Block.slowSand));
list.add(NETHER, 1);
ThaumcraftApi.registerObjectTag(Block.slowSand.blockID, -1, list);
//list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Block.slowSand));
//list.add(NETHER, 1);
//ThaumcraftApi.registerObjectTag(Block.slowSand.blockID, -1, list);
list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(Block.tnt));
list.add(WRATH, 2);
+54 -2
View File
@@ -5,6 +5,8 @@ import com.spiteful.forbidden.blocks.ForbiddenBlocks;
import com.spiteful.forbidden.blocks.BlockBlackFlower;
import com.spiteful.forbidden.enchantments.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.EnumCreatureAttribute;
@@ -309,17 +311,67 @@ public class FMEventHandler
}
}
}
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.consuming.effectId, equip) > 0){
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.consuming.effectId, equip) > 0)
{
for(int x = 0;x < event.drops.size();x++)
{
ItemStack drop = (ItemStack)event.drops.get(x);
if(drop != null && (drop.itemID == Block.cobblestone.blockID || drop.itemID == Block.dirt.blockID || drop.itemID == Block.netherrack.blockID))
if(drop != null && (drop.itemID == Block.cobblestone.blockID || drop.itemID == Block.dirt.blockID || drop.itemID == Block.netherrack.blockID
|| drop.itemID == Block.gravel.blockID))
event.drops.remove(x);
}
}
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.corrupting.effectId, equip) > 0 && event.block.blockID == Config.thaumcraftOreID && randy.nextInt(3) == 1)
{
ArrayList<ItemStack> moarDrops = new ArrayList<ItemStack>();
ArrayList<ItemStack> deadDrops = new ArrayList<ItemStack>();
Iterator current = event.drops.iterator();
while(current.hasNext())
{
ItemStack curDrop = (ItemStack)current.next();
if(curDrop != null && curDrop.itemID == Config.thaumcraftShardID)
{
int x = curDrop.stackSize;
for(int i = 0;i < x;i++)
{
moarDrops.add(getSinShard());
}
deadDrops.add(curDrop);
}
}
current = deadDrops.iterator();
while(current.hasNext())
{
event.drops.remove((ItemStack)(current.next()));
}
current = moarDrops.iterator();
while(current.hasNext())
{
event.drops.add((ItemStack)(current.next()));
}
}
}
}
public ItemStack getSinShard()
{
int x = randy.nextInt(7);
switch(x)
{
case 0:
case 1:
case 3:
case 5:
case 6: return new ItemStack(ForbiddenItems.deadlyShards, 1, x);
case 2: return new ItemStack(ForbiddenItems.gluttonyShard, 1, 0);
case 4: if(Config.noLust)
return getSinShard();
else
return new ItemStack(ForbiddenItems.deadlyShards, 1, 4);
}
return null;
}
@ForgeSubscribe
public void onBonemeal(BonemealEvent event){
if(event.ID == ForbiddenBlocks.blackFlower.blockID){
@@ -64,6 +64,7 @@ public class ForbiddenRecipes
ForbiddenResearch.recipes.put("Consuming", ThaumcraftApi.addInfusionEnchantmentRecipe("CONSUMING", DarkEnchantments.consuming, 3, (new AspectList()).add(Aspect.VOID, 8).add(Aspect.TOOL, 8).add(Aspect.HUNGER, 8), new ItemStack[]{new ItemStack(Item.pickaxeIron), new ItemStack(Item.bucketLava), ItemApi.getItem("itemResource", 14)}));
ForbiddenResearch.recipes.put("Pigbane", ThaumcraftApi.addInfusionEnchantmentRecipe("PIGBANE", DarkEnchantments.pigBane, 1, (new AspectList()).add(Aspect.HUNGER, 4).add(Aspect.WEAPON, 4).add(Aspect.BEAST, 4), new ItemStack[]{new ItemStack(Item.swordIron), new ItemStack(Item.porkRaw), ItemApi.getItem("itemResource", 14)}));
ForbiddenResearch.recipes.put("Educational", ThaumcraftApi.addInfusionEnchantmentRecipe("EDUCATIONAL", DarkEnchantments.educational, 3, (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.WEAPON, 4).add(Aspect.MIND, 8), new ItemStack[]{ItemApi.getItem("itemResource", 5), new ItemStack(Item.book), ItemApi.getItem("itemResource", 14)}));
ForbiddenResearch.recipes.put("Corrupting", ThaumcraftApi.addInfusionEnchantmentRecipe("CORRUPTING", DarkEnchantments.corrupting, 4, (new AspectList()).add(DarkAspects.NETHER, 16).add(Aspect.EXCHANGE, 16).add(Aspect.CRYSTAL, 8), new ItemStack[]{new ItemStack(Item.netherStalkSeeds), new ItemStack(Block.slowSand), ItemApi.getItem("itemResource", 14)}));
CraftingManager.getInstance().addRecipe(new ItemStack(Item.emerald, 1, 0), new Object[]{"###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 0)});
CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 0), new Object[]{"#", Character.valueOf('#'), new ItemStack(Item.emerald, 1, 0)});
@@ -72,6 +72,7 @@ public class ForbiddenResearch
(new DarkResearchItem("CLUSTER", "FORBIDDEN", (new AspectList()).add(Aspect.METAL, 1).add(Aspect.FIRE, 2).add(DarkAspects.ENVY, 1), -7, 7, 3, new ResourceLocation("forbidden", "textures/misc/lucrative.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CLUSTER.1"), new ResearchPage((InfusionEnchantmentRecipe)recipes.get("Cluster"))}).setParents(new String[]{"MORPHTOOLS", "ELEMENTALPICK"}).setConcealed().registerResearchItem();
if(Config.greedyEnch)
(new DarkResearchItem("GREEDY", "FORBIDDEN", (new AspectList()).add(Aspect.MAGIC, 1).add(Aspect.WEAPON, 1).add(Aspect.GREED, 2), -1, 5, 4, new ResourceLocation("forbidden", "textures/misc/greedy.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.GREEDY.1"), new ResearchPage((InfusionEnchantmentRecipe)recipes.get("Greedy"))}).setParents(new String[]{"INFAUXSIONENCHANTMENT"}).setConcealed().registerResearchItem();
(new DarkResearchItem("CORRUPTING", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 2).add(Aspect.CRYSTAL, 1).add(Aspect.EXCHANGE, 1), -1, 6, 4, new ResourceLocation("forbidden", "textures/misc/corrupting.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CORRUPTING.1"), new ResearchPage((InfusionEnchantmentRecipe)recipes.get("Corrupting"))}).setParents(new String[]{"INFAUXSIONENCHANTMENT"}).setConcealed().registerResearchItem();
if(Config.wrathCage){
if(Config.wrathCost > 0)
@@ -15,6 +15,7 @@ public class DarkEnchantments
public static Enchantment greedy;
public static Enchantment consuming;
public static Enchantment educational;
public static Enchantment corrupting;
public static void hex()
{
@@ -23,6 +24,7 @@ public class DarkEnchantments
greedy = new EnchantmentGreedy(Config.greedyEnchID);
consuming = new EnchantmentConsuming(Config.consumingEnchID);
educational = new EnchantmentEducational(Config.educationalEnchID);
corrupting = new EnchantmentCorrupting(Config.corruptingEnchID);
//EnchantmentManager.registerExponentialCostData(pigBane, "forbidden:textures/misc/pigbane.png", false, (new AspectList()).add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1), "PIGBANE");
//EnchantmentManager.registerExponentialCostData(cluster, "forbidden:textures/misc/lucrative.png", false, (new AspectList()).add(Aspect.FIRE, 5).add(Aspect.EARTH, 5).add(Aspect.ORDER, 5), "CLUSTER");
@@ -0,0 +1,66 @@
package com.spiteful.forbidden.enchantments;
import com.spiteful.forbidden.*;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.EnumEnchantmentType;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemPickaxe;
public class EnchantmentCorrupting extends Enchantment
{
public EnchantmentCorrupting(int id)
{
super(id, 0, EnumEnchantmentType.digger);
setName("corrupting");
}
@Override
/**
* Returns the maximum level that the enchantment can have.
*/
public int getMaxLevel()
{
return 1;
}
/**
* Returns the minimal value of enchantability needed on the enchantment level passed.
*/
public int getMinEnchantability(int par1)
{
return 20;
}
/**
* Returns the maximum value of enchantability nedded on the enchantment level passed.
*/
public int getMaxEnchantability(int par1)
{
return super.getMinEnchantability(par1) + 50;
}
@Override
public boolean canApply(ItemStack item)
{
if(item.getItem() instanceof ItemPickaxe)
return true;
else
return false;
}
@Override
/**
* This applies specifically to applying at the enchanting table. The other method {@link #canApply(ItemStack)}
* applies for <i>all possible</i> enchantments.
* @param stack
* @return
*/
public boolean canApplyAtEnchantingTable(ItemStack stack)
{
return false;
}
}
@@ -18,6 +18,7 @@ import thaumcraft.api.wands.WandRod;
public class ForbiddenItems
{
public static Item deadlyShards;
public static Item gluttonyShard;
public static Item skullAxe;
public static Item arcaneCakeItem;
public static Item taintShovel;
@@ -47,6 +48,17 @@ public class ForbiddenItems
{
deadlyShards = new ItemDeadlyShard(Config.shardID).setUnlocalizedName("NetherShard");
GameRegistry.registerItem(deadlyShards, "NetherShard");
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 0));
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 1));
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 3));
if(!Config.noLust)
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 4));
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 5));
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 6));
gluttonyShard = new ItemGluttonyShard(Config.gluttonyShardID).setUnlocalizedName("GluttonyShard");
GameRegistry.registerItem(gluttonyShard, "GluttonyShard");
OreDictionary.registerOre("shardNether", new ItemStack(gluttonyShard, 1, 0));
taintShovel = new ItemTaintShovel(Config.taintShovelID, ThaumcraftApi.toolMatElemental).setUnlocalizedName("TaintShovel");
GameRegistry.registerItem(taintShovel, "TaintShovel");
@@ -0,0 +1,40 @@
package com.spiteful.forbidden.items;
import com.spiteful.forbidden.*;
import net.minecraft.item.ItemFood;
import net.minecraft.util.Icon;
import net.minecraft.client.renderer.texture.IconRegister;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
public class ItemGluttonyShard extends ItemFood
{
Icon icon;
public ItemGluttonyShard(int id)
{
super(id, 2, 0.1F, false);
this.setCreativeTab(Forbidden.tab);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister ir)
{
this.icon = ir.registerIcon("forbidden:gluttonyshard");
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIconFromDamage(int par1)
{
return this.icon;
}
}