Taint and stuff

This commit is contained in:
Jeremy Diamond committed 2015-02-23 01:16:58 -08:00
1 parent 440b96c7ba
commit 0db382a3ed
38 files changed
+921 -30

No files matched your search

@@ -245,5 +245,11 @@ public class DarkAspects {
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenBlocks.blackFlower, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.PLANT, 1).add(Aspect.LIFE, 1).add(Aspect.SENSES, 1).add(Aspect.DARKNESS, 1));
if (!Config.noLust)
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.ridingCrop, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.TREE, 2).add(Aspect.CLOTH, 2).add(Aspect.BEAST, 1).add(LUST, 1).add(Aspect.WEAPON, 1));
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.taintFruit, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.TAINT, 2).add(Aspect.POISON, 1));
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.taintCoal, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.TAINT, 2).add(Aspect.ENTROPY, 2));
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenBlocks.taintLeaves, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.TAINT, 1).add(Aspect.PLANT, 1));
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenBlocks.taintLog, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.TAINT, 1).add(Aspect.TREE, 3));
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenBlocks.taintPlanks, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(Aspect.TREE, 1));
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenBlocks.taintStone, 1, 1), (new AspectList()).add(Aspect.EARTH, 1));
}
}
@@ -6,6 +6,7 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import baubles.common.lib.PlayerHandler;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
import fox.spiteful.forbidden.compat.Compat;
import fox.spiteful.forbidden.items.tools.ItemRidingCrop;
import fox.spiteful.forbidden.items.baubles.ItemSubCollar;
@@ -288,13 +289,13 @@ public class FMEventHandler {
EntityPlayer player = event.harvester;
if (player != null && player.inventory.getCurrentItem() != null) {
ItemStack equip = player.inventory.getCurrentItem();
if (equip.getItem() == ForbiddenItems.taintShovel && event.block.getMaterial() == Config.taintMaterial && !(event.block == Block.getBlockFromItem(Config.thaumcraftTaintBlock.getItem()) && event.blockMetadata == 2)) {
if (equip.getItem() == ForbiddenItems.taintShovel && event.block.getMaterial() == thaumcraft.common.config.Config.taintMaterial && event.drops.size() == 0 && event.block != ForbiddenBlocks.taintLeaves) {
int fortune = EnchantmentHelper.getFortuneModifier(player);
int chance = 1 + (2 * fortune);
if (event.isSilkTouching)
chance += 6;
if (randy.nextInt(51) <= chance) {
if (randy.nextInt(31) <= chance) {
event.drops.add(new ItemStack(ForbiddenItems.deadlyShards, 1, 2));
}
}
@@ -369,7 +370,7 @@ public class FMEventHandler {
ItemStack ring = PlayerHandler.getPlayerBaubles(event.entityPlayer).getStackInSlot(1);
ItemStack ring2 = PlayerHandler.getPlayerBaubles(event.entityPlayer).getStackInSlot(2);
if((ring != null && ring.getItem() == ForbiddenItems.ringFood) || (ring2 != null && ring2.getItem() == ForbiddenItems.ringFood)){
event.entityPlayer.getFoodStats().addStats(2, 4.0F);
event.entityPlayer.getFoodStats().addStats(2, 2.0F);
}
}
}
@@ -1,12 +1,16 @@
package fox.spiteful.forbidden;
import java.util.Iterator;
import java.util.Random;
import cpw.mods.fml.common.IFuelHandler;
import cpw.mods.fml.common.registry.GameRegistry;
import fox.spiteful.forbidden.compat.Compat;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraftforge.oredict.OreDictionary;
import thaumcraft.api.ItemApi;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.aspects.Aspect;
@@ -23,7 +27,14 @@ public class ForbiddenRecipes {
public static void addRecipes() {
ForbiddenResearch.recipes.put("TaintShovel", ThaumcraftApi.addInfusionCraftingRecipe("TAINTSHOVEL", new ItemStack(ForbiddenItems.taintShovel), 5, (new AspectList()).add(Aspect.HEAL, 8).add(Aspect.CRYSTAL, 24).add(Aspect.MINE, 12), ItemApi.getItem("itemShovelThaumium", 0), new ItemStack[] { ItemApi.getItem("itemShard", 4), ItemApi.getItem("itemShard", 4), new ItemStack(Items.diamond), ItemApi.getBlock("blockMagicalLog", 1) }));
ForbiddenResearch.recipes.put("TaintPick", ThaumcraftApi.addInfusionCraftingRecipe("TAINTPICK", new ItemStack(ForbiddenItems.taintPickaxe), 1, (new AspectList()).add(Aspect.ENTROPY, 8).add(Aspect.MINE, 8).add(Aspect.TAINT, 12), ItemApi.getItem("itemPickThaumium", 0), new ItemStack[] { ItemApi.getItem("itemShard", 5), ItemApi.getItem("itemShard", 5), new ItemStack(Items.diamond), ItemApi.getBlock("blockMagicalLog", 0) }));
ForbiddenResearch.recipes.put("WandRodTainted", ThaumcraftApi.addInfusionCraftingRecipe("ROD_tainted", new ItemStack(ForbiddenItems.wandCore, 1, 0), 5, (new AspectList()).add(Aspect.TAINT, 24).add(Aspect.MAGIC, 12).add(Aspect.ENTROPY, 12), ItemApi.getItem("itemResource", 12), new ItemStack[] { ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2) }));
ForbiddenResearch.recipes.put("WandRodTainted", ThaumcraftApi.addInfusionCraftingRecipe("ROD_tainted", new ItemStack(ForbiddenItems.wandCore, 1, 0), 5, (new AspectList()).add(Aspect.TAINT, 24).add(Aspect.MAGIC, 12).add(Aspect.ENTROPY, 12), ItemApi.getItem("itemResource", 12), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), new ItemStack(ForbiddenItems.deadlyShards, 1, 2)}));
ForbiddenResearch.recipes.put("TaintTree", ThaumcraftApi.addCrucibleRecipe("TAINTTREE", new ItemStack(ForbiddenBlocks.taintSapling, 1, 0), new ItemStack(Blocks.sapling, 1, 0), (new AspectList()).merge(Aspect.TAINT, 10).add(Aspect.POISON, 4)));
ForbiddenResearch.recipes.put("TaintPlank", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenBlocks.taintPlanks, 4, 0), new Object[]{"#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.taintLog, 1, 0)}));
GameRegistry.addSmelting(ForbiddenBlocks.taintLog, new ItemStack(ForbiddenItems.taintCoal, 1), 0.15F);
OreDictionary.registerOre("resourceTaint", new ItemStack(ConfigItems.itemResource, 1, 11));
OreDictionary.registerOre("resourceTaint", new ItemStack(ForbiddenItems.deadlyShards, 1, 2));
ForbiddenResearch.recipes.put("TaintStone", ThaumcraftApi.addArcaneCraftingRecipe("TAINTSTONE", new ItemStack(ForbiddenBlocks.taintStone, 9, 0), (new AspectList()).add(Aspect.ENTROPY, 2).add(Aspect.ORDER, 1), new Object[]{"SSS", "SXS", "SSS", Character.valueOf('S'), new ItemStack(Blocks.stone, 1), Character.valueOf('X'), "resourceTaint"}));
ForbiddenResearch.recipes.put("TaintBrick", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenBlocks.taintStone, 4, 1), new Object[] { "##", "##", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.taintStone, 1, 0) }));
ForbiddenResearch.recipes.put("SkullAxe", ThaumcraftApi.addInfusionCraftingRecipe("SKULLAXE", new ItemStack(ForbiddenItems.skullAxe), 1, (new AspectList()).add(DarkAspects.WRATH, 8).add(Aspect.WEAPON, 8).add(DarkAspects.NETHER, 8), ItemApi.getItem("itemAxeThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(Items.diamond), new ItemStack(Items.skull, 1, 1) }));
if(!Config.noLust)
@@ -52,7 +63,7 @@ public class ForbiddenRecipes {
if (Config.emeraldTrans)
ForbiddenResearch.recipes.put("TransEmerald", ThaumcraftApi.addCrucibleRecipe("TRANSEMERALD", new ItemStack(ForbiddenItems.resource, 4, 0), "nuggetEmerald", (new AspectList()).merge(Aspect.CRYSTAL, 2).merge(Aspect.GREED, 2)));
ForbiddenResearch.recipes.put("BlackFlower", ThaumcraftApi.addCrucibleRecipe("BLACKFLOWER", new ItemStack(ForbiddenBlocks.roseBush, 1, 0), new ItemStack(Blocks.double_plant, 1, 4), (new AspectList()).merge(Aspect.DARKNESS, 8).merge(Aspect.LIFE, 5)));
ForbiddenResearch.recipes.put("BlackInk", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 2, 1), new Object[] { "#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.blackFlower, 1, 0) }));
ForbiddenResearch.recipes.put("BlackInk", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 2, 1), new Object[]{"#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.blackFlower, 1, 0)}));
ForbiddenResearch.recipes.put("Crystalwell", ThaumcraftApi.addShapelessArcaneCraftingRecipe("CRYSTALWELL", new ItemStack(ForbiddenItems.crystalwell, 1, 0), (new AspectList()), new Object[] { new ItemStack(ConfigItems.itemInkwell, 1, 32767), "dyeBlack", new ItemStack(ConfigItems.itemShard, 1, 32767), new ItemStack(ConfigItems.itemShard, 1, 32767) }));
ForbiddenResearch.recipes.put("Primewell", ThaumcraftApi.addShapelessArcaneCraftingRecipe("PRIMEWELL", new ItemStack(ForbiddenItems.primewell, 1, 0), (new AspectList()).add(Aspect.WATER, 50).add(Aspect.EARTH, 50).add(Aspect.FIRE, 50).add(Aspect.AIR, 50).add(Aspect.ORDER, 50).add(Aspect.ENTROPY, 50), new Object[] { new ItemStack(Items.feather, 1, 0), new ItemStack(ConfigItems.itemEldritchObject, 1, 3), new ItemStack(Items.glass_bottle, 1, 0) }));
@@ -66,14 +77,26 @@ public class ForbiddenRecipes {
ForbiddenResearch.recipes.put("Cluster", ThaumcraftApi.addInfusionEnchantmentRecipe("CLUSTER", DarkEnchantments.cluster, 3, (new AspectList()).add(Aspect.FIRE, 4).add(Aspect.METAL, 4).add(Aspect.GREED, 4), new ItemStack[] { ItemApi.getItem("itemPickElemental", 0), ItemApi.getItem("itemResource", 14) }));
ForbiddenResearch.recipes.put("Impact", ThaumcraftApi.addInfusionEnchantmentRecipe("IMPACT", DarkEnchantments.impact, 4, (new AspectList()).add(Aspect.ENTROPY, 16).add(Aspect.MINE, 16), new ItemStack[] { ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ConfigItems.itemShovelElemental, 1, 0)}));
ForbiddenResearch.recipes.put("Voidtouched", ThaumcraftApi.addInfusionEnchantmentRecipe("VOIDTOUCHED", DarkEnchantments.voidtouched, 8, (new AspectList()).add(Aspect.VOID, 16).add(Aspect.DARKNESS, 16).add(DarkAspects.ENVY, 24).add(Aspect.ELDRITCH, 16), new ItemStack[] { ItemApi.getItem("itemResource", 14), ItemApi.getItem("itemResource", 16), ItemApi.getItem("itemResource", 16), ItemApi.getItem("itemResource", 16), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1) }));
ForbiddenResearch.recipes.put("Voidtouched", ThaumcraftApi.addInfusionEnchantmentRecipe("VOIDTOUCHED", DarkEnchantments.voidtouched, 8, (new AspectList()).add(Aspect.VOID, 16).add(Aspect.DARKNESS, 16).add(DarkAspects.ENVY, 24).add(Aspect.ELDRITCH, 16), new ItemStack[]{ItemApi.getItem("itemResource", 14), ItemApi.getItem("itemResource", 16), ItemApi.getItem("itemResource", 16), ItemApi.getItem("itemResource", 16), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1)}));
CraftingManager.getInstance().addRecipe(new ItemStack(Items.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(Items.emerald, 1, 0) });
CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenBlocks.starBlock, 1, 0), new Object[] { "###", "###", "###", Character.valueOf('#'), new ItemStack(Items.nether_star, 1, 0) });
CraftingManager.getInstance().addRecipe(new ItemStack(Items.nether_star, 9, 0), new Object[] { "#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.starBlock, 1, 0) });
ForbiddenResearch.recipes.put("RidingCrop", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.ridingCrop, 1, 0), new Object[] { "X", "#", "#", Character.valueOf('#'), Items.stick, Character.valueOf('X'), Items.leather }));
CraftingManager.getInstance().addRecipe(new ItemStack(Items.nether_star, 9, 0), new Object[]{"#", Character.valueOf('#'), new ItemStack(ForbiddenBlocks.starBlock, 1, 0)});
ForbiddenResearch.recipes.put("RidingCrop", CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.ridingCrop, 1, 0), new Object[]{"X", "#", "#", Character.valueOf('#'), Items.stick, Character.valueOf('X'), Items.leather}));
ThaumcraftApi.addSmeltingBonus(new ItemStack(Items.emerald), new ItemStack(ForbiddenItems.resource, 0, 0));
GameRegistry.registerFuelHandler(new IFuelHandler() {
Random randy = new Random();
@Override
public int getBurnTime(ItemStack fuel) {
if(fuel.getItem() == ForbiddenItems.taintCoal) {
return 1 + randy.nextInt(2400);
}
return 0;
}
});
}
}
@@ -93,6 +93,10 @@ public class ForbiddenResearch {
(new DarkResearchItem("TAINTSHOVEL", "FORBIDDEN", (new AspectList()).add(Aspect.CRYSTAL, 3).add(Aspect.TAINT, 2).add(Aspect.TOOL, 1), -8, 1, 2, new ItemStack(ForbiddenItems.taintShovel))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTSHOVEL.1"), new ResearchPage((InfusionRecipe) recipes.get("TaintShovel")), new ResearchPage("forbidden.research_page.TAINTSHOVEL.2") }).setParents(new String[] { "THAUMIUM", "INFUSION", "ETHEREALBLOOM" }).setConcealed().registerResearchItem();
(new DarkResearchItem("TAINTPICK", "FORBIDDEN", (new AspectList()).add(Aspect.TOOL, 2).add(Aspect.TAINT, 4).add(Aspect.ENTROPY, 3), -10, 1, 2, new ItemStack(ForbiddenItems.taintPickaxe))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTPICK.1"), new ResearchPage((InfusionRecipe) recipes.get("TaintPick")) }).setParents(new String[] { "THAUMIUM", "INFUSION" }).setConcealed().registerResearchItem();
(new DarkResearchItem("ROD_tainted", "FORBIDDEN", (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.TAINT, 5).add(Aspect.TOOL, 2), -8, 3, 3, new ItemStack(ForbiddenItems.wandCore, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_tainted.1"), new ResearchPage((InfusionRecipe) recipes.get("WandRodTainted")) }).setParents(new String[] { "ROD_silverwood", "TAINTSHOVEL", "INFUSION" }).setConcealed().registerResearchItem();
(new DarkResearchItem("TAINTTREE", "FORBIDDEN", (new AspectList()).add(Aspect.TREE, 4).add(Aspect.TAINT, 6).add(Aspect.POISON, 2).add(Aspect.PLANT, 3), -11, 3, 3, new ItemStack(ForbiddenBlocks.taintSapling))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTTREE.1"), new ResearchPage((CrucibleRecipe) recipes.get("TaintTree")), new ResearchPage((IRecipe) recipes.get("TaintPlank")), new ResearchPage(new ItemStack(ForbiddenBlocks.taintLog, 1, 0)) }).setHidden().setAspectTriggers(Aspect.TAINT).registerResearchItem();
ThaumcraftApi.addWarpToResearch("TAINTTREE", 3);
ThaumcraftApi.addWarpToItem(new ItemStack(ForbiddenBlocks.taintSapling, 1, 0), 1);
(new DarkResearchItem("TAINTSTONE", "FORBIDDEN", (new AspectList()).add(Aspect.EARTH, 4).add(Aspect.TAINT, 6).add(Aspect.ORDER, 2), -10, 3, 2, new ItemStack(ForbiddenBlocks.taintStone, 1, 1))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.TAINTSTONE.1"), new ResearchPage((IArcaneRecipe) recipes.get("TaintStone")), new ResearchPage((IRecipe) recipes.get("TaintBrick"))}).setHidden().setAspectTriggers(Aspect.TAINT).registerResearchItem();
ThaumcraftApi.addWarpToResearch("ROD_tainted", 2);
}
}
@@ -0,0 +1,167 @@
package fox.spiteful.forbidden;
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.init.Blocks;
import net.minecraft.util.Direction;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import net.minecraftforge.common.util.ForgeDirection;
import java.util.Random;
public class WorldGenTaintedTree extends WorldGenAbstractTree
{
/** The minimum height of a generated tree. */
private final int minTreeHeight;
public WorldGenTaintedTree(boolean p_i2027_1_)
{
this(p_i2027_1_, 4);
}
public WorldGenTaintedTree(boolean p_i2028_1_, int p_i2028_2_)
{
super(p_i2028_1_);
this.minTreeHeight = p_i2028_2_;
}
public boolean generate(World p_76484_1_, Random p_76484_2_, int p_76484_3_, int p_76484_4_, int p_76484_5_)
{
int l = p_76484_2_.nextInt(3) + this.minTreeHeight;
boolean flag = true;
if (p_76484_4_ >= 1 && p_76484_4_ + l + 1 <= 256)
{
byte b0;
int k1;
Block block;
for (int i1 = p_76484_4_; i1 <= p_76484_4_ + 1 + l; ++i1)
{
b0 = 1;
if (i1 == p_76484_4_)
{
b0 = 0;
}
if (i1 >= p_76484_4_ + 1 + l - 2)
{
b0 = 2;
}
for (int j1 = p_76484_3_ - b0; j1 <= p_76484_3_ + b0 && flag; ++j1)
{
for (k1 = p_76484_5_ - b0; k1 <= p_76484_5_ + b0 && flag; ++k1)
{
if (i1 >= 0 && i1 < 256)
{
block = p_76484_1_.getBlock(j1, i1, k1);
if (!this.isReplaceable(p_76484_1_, j1, i1, k1))
{
flag = false;
}
}
else
{
flag = false;
}
}
}
}
if (!flag)
{
return false;
}
else
{
Block block2 = p_76484_1_.getBlock(p_76484_3_, p_76484_4_ - 1, p_76484_5_);
boolean isSoil = block2.canSustainPlant(p_76484_1_, p_76484_3_, p_76484_4_ - 1, p_76484_5_, ForgeDirection.UP, (BlockSapling) Blocks.sapling);
if (isSoil && p_76484_4_ < 256 - l - 1)
{
block2.onPlantGrow(p_76484_1_, p_76484_3_, p_76484_4_ - 1, p_76484_5_, p_76484_3_, p_76484_4_, p_76484_5_);
b0 = 3;
byte b1 = 0;
int l1;
int i2;
int j2;
int i3;
for (k1 = p_76484_4_ - b0 + l; k1 <= p_76484_4_ + l; ++k1)
{
i3 = k1 - (p_76484_4_ + l);
l1 = b1 + 1 - i3 / 2;
for (i2 = p_76484_3_ - l1; i2 <= p_76484_3_ + l1; ++i2)
{
j2 = i2 - p_76484_3_;
for (int k2 = p_76484_5_ - l1; k2 <= p_76484_5_ + l1; ++k2)
{
int l2 = k2 - p_76484_5_;
if (Math.abs(j2) != l1 || Math.abs(l2) != l1 || p_76484_2_.nextInt(2) != 0 && i3 != 0)
{
Block block1 = p_76484_1_.getBlock(i2, k1, k2);
if (block1.isAir(p_76484_1_, i2, k1, k2) || block1.isLeaves(p_76484_1_, i2, k1, k2))
{
this.setBlockAndNotifyAdequately(p_76484_1_, i2, k1, k2, ForbiddenBlocks.taintLeaves, 0);
}
}
}
}
}
for (k1 = 0; k1 < l; ++k1)
{
block = p_76484_1_.getBlock(p_76484_3_, p_76484_4_ + k1, p_76484_5_);
if (block.isAir(p_76484_1_, p_76484_3_, p_76484_4_ + k1, p_76484_5_) || block.isLeaves(p_76484_1_, p_76484_3_, p_76484_4_ + k1, p_76484_5_))
{
this.setBlockAndNotifyAdequately(p_76484_1_, p_76484_3_, p_76484_4_ + k1, p_76484_5_, ForbiddenBlocks.taintLog, 0);
}
}
return true;
}
else
{
return false;
}
}
}
else
{
return false;
}
}
/**
* Grows vines downward from the given block for a given length. Args: World, x, starty, z, vine-length
*/
private void growVines(World p_76529_1_, int p_76529_2_, int p_76529_3_, int p_76529_4_, int p_76529_5_)
{
this.setBlockAndNotifyAdequately(p_76529_1_, p_76529_2_, p_76529_3_, p_76529_4_, Blocks.vine, p_76529_5_);
int i1 = 4;
while (true)
{
--p_76529_3_;
if (!p_76529_1_.getBlock(p_76529_2_, p_76529_3_, p_76529_4_).isAir(p_76529_1_, p_76529_2_, p_76529_3_, p_76529_4_) || i1 <= 0)
{
return;
}
this.setBlockAndNotifyAdequately(p_76529_1_, p_76529_2_, p_76529_3_, p_76529_4_, Blocks.vine, p_76529_5_);
--i1;
}
}
}
@@ -27,6 +27,8 @@ public class BlockArcaneCake extends Block {
protected BlockArcaneCake() {
super(Material.cake);
this.setTickRandomly(true);
setHardness(0.5F);
setStepSound(Block.soundTypeCloth);
}
@Override
@@ -24,6 +24,8 @@ public class BlockBlackFlower extends BlockFlower {
float f = 0.2F;
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
this.setCreativeTab(Forbidden.tab);
setStepSound(Block.soundTypeGrass);
setBlockTextureName("forbidden:flower_black");
}
public void spreadFlowers(World world, int x, int y, int z, Random rand) {
@@ -0,0 +1,252 @@
package fox.spiteful.forbidden.blocks;
import cpw.mods.fml.relauncher.ReflectionHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import fox.spiteful.forbidden.Forbidden;
import fox.spiteful.forbidden.items.ForbiddenItems;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeaves;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import thaumcraft.common.config.Config;
import thaumcraft.common.config.ConfigBlocks;
import java.lang.reflect.Field;
import java.util.Random;
public class BlockLeavesTainted extends BlockLeaves
{
int[] decayThingy;
@SideOnly(Side.CLIENT)
private IIcon opaqueIcon;
@SideOnly(Side.CLIENT)
private IIcon transparentIcon;
public BlockLeavesTainted()
{
super();
setCreativeTab(Forbidden.tab);
setLightOpacity(0);
setHardness(0.2F);
setStepSound(ConfigBlocks.blockTaint.stepSound);
try {
Field mat = ReflectionHelper.findField(Block.class, "blockMaterial", "field_149764_J");
mat.set(this, Config.taintMaterial);
} catch (Exception e){
e.printStackTrace();
}
}
@Override
public Item getItemDropped(int i, Random random, int j)
{
return Item.getItemFromBlock(ForbiddenBlocks.taintSapling);
}
/**
* Chance of sapling dropping
*/
@Override
protected int func_150123_b(int p_150123_1_)
{
return 60;
}
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockAccess iba, int x, int y, int z, int side)
{
return !Blocks.leaves.isOpaqueCube() || super.shouldSideBeRendered(iba, x, y, z, side);
}
@Override
public boolean isOpaqueCube()
{
return Blocks.leaves.isOpaqueCube();
}
@Override
public IIcon getIcon(int side, int meta)
{
return !Blocks.leaves.isOpaqueCube() ? transparentIcon : opaqueIcon;
}
@Override
public String[] func_150125_e()
{
return new String[0];
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister register)
{
opaqueIcon = register.registerIcon("forbidden:taint_leaves_opaque");
transparentIcon = register.registerIcon("forbidden:taint_leaves");
}
@Override
protected void func_150124_c(World world, int x, int y, int z, int meta, int wat)
{
if (world.rand.nextInt(20) == 0)
{
this.dropBlockAsItem(world, x, y, z, new ItemStack(ForbiddenItems.taintFruit, 1, 0));
}
}
/**
* Ticks the block if it's been scheduled
*/
public void updateTick(World world, int x, int y, int z, Random rand)
{
if (!world.isRemote)
{
int l = world.getBlockMetadata(x, y, z);
if ((l & 8) != 0 && (l & 4) == 0)
{
byte b0 = 4;
int i1 = b0 + 1;
byte b1 = 32;
int j1 = b1 * b1;
int k1 = b1 / 2;
if (this.decayThingy == null)
{
this.decayThingy = new int[b1 * b1 * b1];
}
int l1;
if (world.checkChunksExist(x - i1, y - i1, z - i1, x + i1, y + i1, z + i1))
{
int i2;
int j2;
for (l1 = -b0; l1 <= b0; ++l1)
{
for (i2 = -b0; i2 <= b0; ++i2)
{
for (j2 = -b0; j2 <= b0; ++j2)
{
Block block = world.getBlock(x + l1, y + i2, z + j2);
if (block != ForbiddenBlocks.taintLog)
{
if (block.isLeaves(world, x + l1, y + i2, z + j2))
{
this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -2;
}
else
{
this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -1;
}
}
else
{
this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = 0;
}
}
}
}
for (l1 = 1; l1 <= 4; ++l1)
{
for (i2 = -b0; i2 <= b0; ++i2)
{
for (j2 = -b0; j2 <= b0; ++j2)
{
for (int k2 = -b0; k2 <= b0; ++k2)
{
if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1] == l1 - 1)
{
if (this.decayThingy[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2)
{
this.decayThingy[(i2 + k1 - 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1;
}
if (this.decayThingy[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] == -2)
{
this.decayThingy[(i2 + k1 + 1) * j1 + (j2 + k1) * b1 + k2 + k1] = l1;
}
if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] == -2)
{
this.decayThingy[(i2 + k1) * j1 + (j2 + k1 - 1) * b1 + k2 + k1] = l1;
}
if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] == -2)
{
this.decayThingy[(i2 + k1) * j1 + (j2 + k1 + 1) * b1 + k2 + k1] = l1;
}
if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] == -2)
{
this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + (k2 + k1 - 1)] = l1;
}
if (this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] == -2)
{
this.decayThingy[(i2 + k1) * j1 + (j2 + k1) * b1 + k2 + k1 + 1] = l1;
}
}
}
}
}
}
}
l1 = this.decayThingy[k1 * j1 + k1 * b1 + k1];
if (l1 >= 0)
{
world.setBlockMetadataWithNotify(x, y, z, l & -9, 4);
}
else
{
this.removeLeaves(world, x, y, z);
}
}
}
}
private void removeLeaves(World world, int x, int y, int z)
{
this.dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
world.setBlockToAir(x, y, z);
}
@SideOnly(Side.CLIENT)
public int getBlockColor()
{
return 0xFFFFFF;
}
/**
* Returns the color this block should be rendered. Used by leaves.
*/
@SideOnly(Side.CLIENT)
@Override
public int getRenderColor(int metadata)
{
return 0xFFFFFF;
}
/**
* Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
* when first determining what to render.
*/
@SideOnly(Side.CLIENT)
public int colorMultiplier(IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_)
{
return 0xFFFFFF;
}
@Override
public boolean isLeaves(IBlockAccess world, int x, int y, int z)
{
return false;
}
}
@@ -0,0 +1,104 @@
package fox.spiteful.forbidden.blocks;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.relauncher.ReflectionHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import fox.spiteful.forbidden.Forbidden;
import fox.spiteful.forbidden.LogHandler;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLog;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import org.apache.logging.log4j.Level;
import thaumcraft.common.config.Config;
import thaumcraft.common.config.ConfigBlocks;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Random;
public class BlockLogTainted extends BlockLog
{
@SideOnly(Side.CLIENT)
private IIcon sides;
@SideOnly(Side.CLIENT)
private IIcon ends;
@SideOnly(Side.CLIENT)
private IIcon gross;
@SideOnly(Side.CLIENT)
private IIcon gross2;
public BlockLogTainted()
{
super();
setCreativeTab(Forbidden.tab);
setStepSound(ConfigBlocks.blockTaint.stepSound);
try {
Field mat = ReflectionHelper.findField(Block.class, "blockMaterial", "field_149764_J");
mat.set(this, Config.taintMaterial);
} catch (Exception e){
e.printStackTrace();
}
this.setHarvestLevel("axe", 0);
}
@Override
public int damageDropped(int p_149692_1_)
{
return 0;
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister register)
{
sides = register.registerIcon("forbidden:taint_log_side");
ends = register.registerIcon("forbidden:taint_log_bottom");
gross = register.registerIcon("forbidden:taint_log_side_gross");
gross2 = register.registerIcon("forbidden:taint_log_side_gross2");
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int side, int meta)
{
int logDirection = meta & 12;
return logDirection == 0 && (side == 1 || side == 0) ? ends : (logDirection == 4 && (side == 5 || side == 4) ? ends : (logDirection == 8 && (side == 2 || side == 3) ? ends : sides));
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side)
{
int meta = world.getBlockMetadata(x, y, z);
int logDirection = meta & 12;
if((logDirection == 0 && (side == 1 || side == 0)) || (logDirection == 4 && (side == 5 || side == 4)) || (logDirection == 8 && (side == 2 || side == 3)))
return ends;
else {
Random r = new Random((long)(side + y + x * z));
return r.nextInt(100) < 75 ? sides : r.nextBoolean() ? gross : gross2;
}
}
@SideOnly(Side.CLIENT)
protected IIcon getSideIcon(int meta)
{
return sides;
}
@SideOnly(Side.CLIENT)
protected IIcon getTopIcon(int meta)
{
return ends;
}
public boolean canSustainLeaves(IBlockAccess world, int x, int y, int z)
{
return false;
}
}
@@ -0,0 +1,19 @@
package fox.spiteful.forbidden.blocks;
import fox.spiteful.forbidden.Forbidden;
import net.minecraft.block.Block;
import thaumcraft.common.config.Config;
public class BlockPlanksTainted extends Block{
public BlockPlanksTainted(){
super(Config.taintMaterial);
setCreativeTab(Forbidden.tab);
setStepSound(Block.soundTypeWood);
setHardness(2.0F);
setResistance(5.0F);
setBlockTextureName("forbidden:taint_planks");
this.setHarvestLevel("axe", 0);
}
}
@@ -10,6 +10,9 @@ public class BlockResource extends Block {
super(Material.iron);
this.setCreativeTab(Forbidden.tab);
setHardness(5.0F);
setStepSound(Block.soundTypeMetal);
this.setBlockTextureName("forbidden:starblock");
}
@Override
@@ -0,0 +1,88 @@
package fox.spiteful.forbidden.blocks;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.relauncher.ReflectionHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import fox.spiteful.forbidden.Forbidden;
import fox.spiteful.forbidden.WorldGenTaintedTree;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSapling;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenAbstractTree;
import thaumcraft.common.config.Config;
import thaumcraft.common.config.ConfigBlocks;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Random;
public class BlockSaplingTainted extends BlockSapling
{
@SideOnly(Side.CLIENT)
private IIcon icon;
public BlockSaplingTainted()
{
super();
setCreativeTab(Forbidden.tab);
setStepSound(ConfigBlocks.blockTaint.stepSound);
try {
Field mat = ReflectionHelper.findField(Block.class, "blockMaterial", "field_149764_J");
mat.set(this, Config.taintMaterial);
} catch (Exception e){
e.printStackTrace();
}
}
/**
* Grow the tree
*/
@Override
public void func_149878_d(World world, int x, int y, int z, Random rand)
{
if(!world.isRemote)
{
int meta = world.getBlockMetadata(x, y, z);
world.setBlockToAir(x, y, z);
WorldGenTaintedTree tree = new WorldGenTaintedTree(true);
if (!tree.generate(world, rand, x, y, z))
{
world.setBlock(x, y, z, this, meta, 2);
}
}
}
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list)
{
list.add(new ItemStack(this, 1, 0));
}
@Override
public Item getItemDropped(int wut, Random random, int yeah)
{
return Item.getItemFromBlock(this);
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister register)
{
icon = register.registerIcon("forbidden:sapling_taint");
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int side, int meta)
{
return icon;
}
}
@@ -0,0 +1,61 @@
package fox.spiteful.forbidden.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import fox.spiteful.forbidden.Forbidden;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import thaumcraft.common.config.Config;
import thaumcraft.common.config.ConfigBlocks;
import java.util.List;
public class BlockStoneTainted extends Block {
private IIcon smooth;
private IIcon brick;
public BlockStoneTainted(){
super(Config.taintMaterial);
setHardness(2.0F);
setResistance(10.0F);
setStepSound(Block.soundTypeStone);
setCreativeTab(Forbidden.tab);
this.setHarvestLevel("pickaxe", 0);
}
@SideOnly(Side.CLIENT)
@Override
public void registerBlockIcons(IIconRegister iconRegister)
{
smooth = iconRegister.registerIcon("forbidden:taint_stone_smooth");
brick = iconRegister.registerIcon("forbidden:taint_stone_brick");
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int side, int metadata)
{
if(metadata == 0)
return smooth;
else
return brick;
}
@Override
public int damageDropped(int metadata)
{
return metadata;
}
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs tab, List list)
{
list.add(new ItemStack(item, 1, 0));
list.add(new ItemStack(item, 1, 1));
}
}
@@ -4,6 +4,7 @@ import java.util.Random;
import fox.spiteful.forbidden.Forbidden;
import fox.spiteful.forbidden.tiles.TileEntityWrathCage;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.item.EntityItem;
@@ -26,6 +27,10 @@ public class BlockWrathCage extends BlockContainer {
protected BlockWrathCage() {
super(Material.iron);
this.setCreativeTab(Forbidden.tab);
setHardness(5.0F);
setResistance(2000.0F);
setStepSound(Block.soundTypeMetal);
setBlockTextureName("forbidden:spirit_box");
}
@Override
@@ -13,23 +13,30 @@ public class ForbiddenBlocks {
public static Block wrathCage;
public static Block starBlock;
public static Block roseBush;
public static Block taintLog;
public static Block taintPlanks;
public static Block taintLeaves;
public static Block taintSapling;
public static Block taintStone;
public static void addBlocks() {
arcaneCake = new BlockArcaneCake().setHardness(0.5F).setStepSound(Block.soundTypeCloth).setBlockName("ArcaneCake");
GameRegistry.registerBlock(arcaneCake, "ArcaneCake");
arcaneCake = GameRegistry.registerBlock(new BlockArcaneCake().setBlockName("ArcaneCake"), "ArcaneCake");
wrathCage = new BlockWrathCage().setHardness(5.0F).setResistance(2000.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("forbidden:spirit_box").setBlockName("WrathCage");
GameRegistry.registerBlock(wrathCage, "WrathCage");
wrathCage = GameRegistry.registerBlock(new BlockWrathCage().setBlockName("WrathCage"), "WrathCage");
GameRegistry.registerTileEntity(TileEntityWrathCage.class, "WrathCage");
blackFlower = new BlockBlackFlower().setStepSound(Block.soundTypeGrass).setBlockTextureName("forbidden:flower_black").setBlockName("InkFlower");
GameRegistry.registerBlock(blackFlower, "InkFlower");
blackFlower = GameRegistry.registerBlock(new BlockBlackFlower().setBlockName("InkFlower"), "InkFlower");
starBlock = new BlockResource().setHardness(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("forbidden:starblock").setBlockName("StarBlock");
GameRegistry.registerBlock(starBlock, "StarBlock");
starBlock = GameRegistry.registerBlock(new BlockResource().setBlockName("StarBlock"), "StarBlock");
OreDictionary.registerOre("blockNetherStar", new ItemStack(starBlock, 1, 0));
roseBush = new BlockRoseBush();
GameRegistry.registerBlock(roseBush, "UmbralBush");
roseBush = GameRegistry.registerBlock(new BlockRoseBush(), "UmbralBush");
taintLog = GameRegistry.registerBlock(new BlockLogTainted().setBlockName("TaintLog"), "TaintLog");
taintPlanks = GameRegistry.registerBlock(new BlockPlanksTainted().setBlockName("TaintPlank"), "TaintPlank");
taintLeaves = GameRegistry.registerBlock(new BlockLeavesTainted().setBlockName("TaintLeaves"), "TaintLeaves");
taintSapling = GameRegistry.registerBlock(new BlockSaplingTainted().setBlockName("TaintSapling"), "TaintSapling");
taintStone = GameRegistry.registerBlock(new BlockStoneTainted(), ItemBlockStoneTainted.class, "TaintBlock");
}
}
@@ -0,0 +1,23 @@
package fox.spiteful.forbidden.blocks;
import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemBlockStoneTainted extends ItemBlock {
public ItemBlockStoneTainted(Block block){
super(block);
this.setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta;
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return "tile.TaintStone_" + (itemStack.getItemDamage() == 0 ? "Smooth" : "Brick");
}
}
@@ -71,7 +71,9 @@ public class RitualSanity extends RitualEffect
PotionEffect effect = player.getActivePotionEffect(PotionWarpWard.instance);
if (effect == null || effect.getDuration() <= timeDelay)
{
player.addPotionEffect(new PotionEffect(PotionWarpWard.instance.id, timeDelay + 2, 0));
PotionEffect ward = new PotionEffect(PotionWarpWard.instance.id, timeDelay + 2, 0, true);
effect.getCurativeItems().clear();
player.addPotionEffect(ward);
entityCount++;
if(crazy && world.rand.nextInt(35) <= 3)
Thaumcraft.proxy.getPlayerKnowledge().addWarpTemp(player.getDisplayName(), 1 + world.rand.nextInt(3));
@@ -4,10 +4,11 @@ import fox.spiteful.forbidden.compat.Compat;
import net.minecraft.enchantment.Enchantment;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumic.tinkerer.common.enchantment.core.EnchantmentManager;
import fox.spiteful.forbidden.Config;
import java.lang.reflect.Method;
public class DarkEnchantments {
public static Enchantment cluster;
public static Enchantment wrath;
@@ -30,14 +31,17 @@ public class DarkEnchantments {
if (Compat.tt) {
try {
EnchantmentManager.registerExponentialCostData(wrath, "forbidden:textures/misc/pigbane.png", false, (new AspectList()).add(Aspect.ENTROPY, 6).add(Aspect.FIRE, 6), "WRATH");
EnchantmentManager.registerExponentialCostData(cluster, "forbidden:textures/misc/lucrative.png", false, (new AspectList()).add(Aspect.FIRE, 5).add(Aspect.EARTH, 5).add(Aspect.ORDER, 5), "CLUSTER");
EnchantmentManager.registerExponentialCostData(greedy, "forbidden:textures/misc/greedy.png", false, (new AspectList()).add(Aspect.ENTROPY, 50).add(Aspect.EARTH, 30).add(Aspect.ORDER, 20), "GREEDY");
EnchantmentManager.registerExponentialCostData(educational, "forbidden:textures/misc/educational.png", false, new AspectList().add(Aspect.AIR, 10).add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 15).add(Aspect.ENTROPY, 15), "EDUCATIONAL");
EnchantmentManager.registerExponentialCostData(consuming, "forbidden:textures/misc/consuming.png", false, (new AspectList()).add(Aspect.ENTROPY, 10), "CONSUMING");
EnchantmentManager.registerExponentialCostData(corrupting, "forbidden:textures/misc/corrupting.png", false, (new AspectList()).add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 15).add(Aspect.EARTH, 10), "CORRUPTING");
EnchantmentManager.registerExponentialCostData(voidtouched, "forbidden:textures/misc/voidtouched.png", false, (new AspectList()).add(Aspect.ENTROPY, 70), "VOIDTOUCHED");
Method reg = Class.forName("thaumic.tinkerer.common.enchantment.core.EnchantmentManager").getDeclaredMethod("registerExponentialCostData", Enchantment.class, String.class, Boolean.TYPE, AspectList.class, String.class);
reg.invoke(null, wrath, "forbidden:textures/misc/wrath.png", false, (new AspectList()).add(Aspect.ENTROPY, 6).add(Aspect.FIRE, 6), "WRATH");
reg.invoke(null, cluster, "forbidden:textures/misc/lucrative.png", false, (new AspectList()).add(Aspect.FIRE, 5).add(Aspect.EARTH, 5).add(Aspect.ORDER, 5), "CLUSTER");
reg.invoke(null, greedy, "forbidden:textures/misc/greedy.png", false, (new AspectList()).add(Aspect.ENTROPY, 50).add(Aspect.EARTH, 30).add(Aspect.ORDER, 20), "GREEDY");
reg.invoke(null, educational, "forbidden:textures/misc/educational.png", false, new AspectList().add(Aspect.AIR, 10).add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 15).add(Aspect.ENTROPY, 15), "EDUCATIONAL");
reg.invoke(null, consuming, "forbidden:textures/misc/consuming.png", false, (new AspectList()).add(Aspect.ENTROPY, 10), "CONSUMING");
reg.invoke(null, corrupting, "forbidden:textures/misc/corrupting.png", false, (new AspectList()).add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 15).add(Aspect.EARTH, 10), "CORRUPTING");
reg.invoke(null, voidtouched, "forbidden:textures/misc/voidtouched.png", false, (new AspectList()).add(Aspect.ENTROPY, 70), "VOIDTOUCHED");
reg.invoke(null, impact, "forbidden:textures/misc/impact.png", false, (new AspectList()).add(Aspect.ENTROPY, 30).add(Aspect.EARTH, 30), "IMPACT");
} catch (Throwable e) {
e.printStackTrace();
}
}
}
@@ -45,6 +45,8 @@ public class ForbiddenItems {
public static Item ridingCrop;
public static Item subCollar;
public static Item ringFood;
public static Item taintFruit;
public static Item taintCoal;
public static Item blinkFocus;
@@ -179,11 +181,18 @@ public class ForbiddenItems {
if(!Config.noLust) {
subCollar = new ItemSubCollar().setUnlocalizedName("SubCollar");
GameRegistry.registerItem(subCollar, "SubCollar");
}
ringFood = new ItemRingNutrition().setUnlocalizedName("RingNutrition");
GameRegistry.registerItem(ringFood, "RingNutrition");
taintFruit = new ItemFruitTainted().setUnlocalizedName("TaintFruit");
GameRegistry.registerItem(taintFruit, "TaintFruit");
taintCoal = new ItemTaintCoal().setUnlocalizedName("TaintCoal");
GameRegistry.registerItem(taintCoal, "TaintCoal");
blinkFocus = new ItemFocusBlink().setUnlocalizedName("BlinkFocus");
GameRegistry.registerItem(blinkFocus, "BlinkFocus");
@@ -0,0 +1,53 @@
package fox.spiteful.forbidden.items;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import fox.spiteful.forbidden.Forbidden;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import thaumcraft.api.potions.PotionFluxTaint;
import thaumcraft.common.Thaumcraft;
import thaumcraft.common.lib.potions.PotionThaumarhia;
public class ItemFruitTainted extends ItemFood {
public ItemFruitTainted(){
super(4, 0.8F, false);
setCreativeTab(Forbidden.tab);
}
public ItemStack onEaten(ItemStack stack, World world, EntityPlayer player) {
if(!world.isRemote && player instanceof EntityPlayerMP) {
Thaumcraft.addStickyWarpToPlayer(player, 1);
player.addPotionEffect(getEffect(PotionFluxTaint.instance.id, 600, false));
player.addPotionEffect(getEffect(Potion.hunger.id, 600, false));
if(world.rand.nextFloat() < 0.4F){
player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("warp.text.15")));
player.addPotionEffect(getEffect(PotionThaumarhia.instance.id, 600, true));
}
}
return super.onEaten(stack, world, player);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon("forbidden:taint_fruit");
}
private PotionEffect getEffect(int id, int duration, boolean ambient){
PotionEffect potion = new PotionEffect(id, duration, 0, ambient);
potion.getCurativeItems().clear();
return potion;
}
}
@@ -0,0 +1,21 @@
package fox.spiteful.forbidden.items;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import fox.spiteful.forbidden.Forbidden;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
public class ItemTaintCoal extends Item {
public ItemTaintCoal(){
super();
setCreativeTab(Forbidden.tab);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
this.itemIcon = iconRegister.registerIcon("forbidden:taint_charcoal");
}
}
@@ -1,6 +1,7 @@
package fox.spiteful.forbidden.items.tools;
import fox.spiteful.forbidden.Forbidden;
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
@@ -55,7 +56,9 @@ public class ItemTaintShovel extends ItemSpade implements IRepairable
@Override
public float getDigSpeed(ItemStack stack, Block block, int meta)
{
if (ForgeHooks.isToolEffective(stack, block, meta) || block.getMaterial() == Config.taintMaterial)
if (ForgeHooks.isToolEffective(stack, block, meta) ||
(block.getMaterial() == Config.taintMaterial && block != ForbiddenBlocks.taintLog && block != ForbiddenBlocks.taintPlanks
&& block != ForbiddenBlocks.taintStone))
{
return efficiencyOnProperMaterial;
}
@@ -21,6 +21,8 @@ import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.subtile.SubTileGenerating;
import java.util.Random;
public class SubTileTainthistle extends SubTileGenerating {
private static final String TAG_BURN_TIME = "burnTime";
@@ -117,7 +119,7 @@ public class SubTileTainthistle extends SubTileGenerating {
@Override
public int getValueForPassiveGeneration() {
return 2;
return 2 + supertile.getWorldObj().rand.nextInt(5);
}
@Override
@@ -46,6 +46,8 @@ item.BloodRapier.name=Rapier of the Strix
item.Boundwell.name=Bound Scribing Tools
item.SubCollar.name=Collar of Pain
item.RingNutrition.name=Ring of Nutrition
item.TaintFruit.name=Tainted Fruit
item.TaintCoal.name=Hexcoal
#
# Wand components
item.Wand.tainted.rod=Tainted
@@ -89,6 +91,12 @@ tile.InkFlower.name=Umbral Rose
tile.WrathCage.name=Wrath Cage
tile.StarBlock.name=Nether Star Block
tile.blackRoseBush.name=Umbral Rose Bush
tile.TaintLog.name=Tainted Log
tile.TaintPlank.name=Tainted Planks
tile.TaintLeaves.name=Tainted Leaves
tile.TaintSapling.name=Tainted Sapling
tile.TaintStone_Smooth.name=Tainted Stone
tile.TaintStone_Brick.name=Tainted Stone Bricks
darkflower.euclidaisy.name=Euclidaisy
darkflower.whisperweed.name=Whisperweed
darkflower.tainthistle.name=Tainthistle
@@ -166,6 +174,14 @@ forbidden.research_name.ROD_tainted=Tainted Wand Core
forbidden.research_text.ROD_tainted=Squiggly vis storage
forbidden.research_page.ROD_tainted.1=Tainted Lands are places of great and terrible power for those Thaumaturges who know how to tap into them.<BR><BR>The Tainted Wand Core can store up to 150 vis of each type and slowly replenishes itself up to 10% in every aspect as long as it is being held inside of a Tainted Land. While the wand is held in your hand, it can also feed off of taint coursing through your veins, randomly restoring vis every time you take damage from flux taint.
#
forbidden.research_name.TAINTTREE=Tainted Tree
forbidden.research_text.TAINTTREE=The root of flux bears gross fruit
forbidden.research_page.TAINTTREE.1=The sick, twisted runoff of magical experiments can take on a strange life of its own. Most plants are unable to survive in Tainted Lands, but you've found a way to grow one that can. By steeping a sapling in taint, you create a tree that can thrive in Tainted Lands.<BR><BR>Its wood can also be turned into planks which are resistant to fibrous taint, allowing you to build structures safe from spreading taint.<BR><BR>The tree also seems to bear fruit, but eating them is not recommended...
#
forbidden.research_name.TAINTSTONE=Tainted Stone
forbidden.research_text.TAINTSTONE=The Taint rocks on
forbidden.research_page.TAINTSTONE.1=Tainted Lands aren't very safe places to be. Fibrous Taint hungrily spreads and crawls over most surfaces, eventually enveloping them and making them unsafe to walk on. The fibers don't appear to be harmful to tainted creatures or materials, however.<BR><BR>By mixing taint in with regular stone, you've created a magical material which is structurally stable, but resistant to the spread of fibrous taint. Tainted Stone can be used to build surfaces in Tainted Lands which are safe to walk on.<BR><BR>Not that building in a Tainted Land is advised...
#
forbidden.research_name.ROD_infernal=Infernal Wand Core
forbidden.research_text.ROD_infernal=Devilish vis storage
forbidden.research_page.ROD_infernal.1=A great and powerful thaumaturge like you deserves a powerful and imposing wand befitting your station. Some hippy silverwood wand just won't cut it. You need a wand that will serve as your scepter of authority.<BR><BR>You've discovered a way to create a wand infused with the power of the Nether. The Infernal Wand Core can hold up to 150 vis and will slowly replenish its supply of Ignis up to 20%. While within the Nether, the wand will also replenish its other aspects to 10%.
@@ -309,7 +325,7 @@ forbidden.research_text.CRYSTALWELL=Arcane Research Grant
forbidden.research_page.CRYSTALWELL.1=Combining elemental shards with your inkwell results in some interesting effects. The Crystal Scribing Tools seem to absorb knowledge as you use them to write. Once the well is empty of ink, you can absorb this knowledge for a small burst of research points by holding the tools in your hand and right clicking. Unfortunately, this burns the tool out and turns it back into a mundane Scribing Tool again.
#
forbidden.research_name.PRIMEWELL=Primal Scribing Tools
forbidden.research_text.PRIMEWELL=The Epitome of Eldritch Research
forbidden.research_text.PRIMEWELL=Bragging Rights
forbidden.research_page.PRIMEWELL.1=You've learned things humans weren't meant to know, seen things humans weren't meant to see, and been places humans weren't meant to go.<BR><BR>What these experiences have taught you is how to refill your inkwell.<BR><BR>By utilizing the strange properties of the Primordial Pearl, you can create a set of scribing tools that will never run out of ink. At the cold, dark end of time when the light of a million stars have died out, the Primal Scribing Tools will still be ready to scribble onwards.
#
forbidden.research_name.RIDINGCROP=Riding Crop
Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 974 B

@@ -0,0 +1,14 @@
{
"animation": {
"frametime": 3,
"frames": [
0,
0,
0,
0,
1,
2,
1
]
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B