mirror of
https://github.com/GTNewHorizons/ForbiddenMagic.git
synced 2026-11-18 03:15:24 +00:00
Apply spotless
This commit is contained in:
1 parent
bc98fa8da6
commit
45139f4730
147 files changed
+6491
-4294
No files matched your search
@@ -2,8 +2,5 @@ package fox.spiteful.forbidden;
|
||||
|
||||
public class CommonProxy {
|
||||
|
||||
public void registerRenderInfo(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public void registerRenderInfo() {}
|
||||
}
|
||||
@@ -3,14 +3,11 @@ package fox.spiteful.forbidden;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
@@ -60,7 +57,7 @@ public class Config {
|
||||
public static boolean special = true;
|
||||
public static boolean twilight = true;
|
||||
public static boolean emc = true;
|
||||
//public static boolean eewand = true;
|
||||
// public static boolean eewand = true;
|
||||
|
||||
public static int bloodvis = 5;
|
||||
public static int manavis = 8;
|
||||
@@ -81,56 +78,133 @@ public class Config {
|
||||
wrathEnchID = conf.get("enchantments", "Wrath", 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();
|
||||
educationalEnchID =
|
||||
conf.get("enchantments", "Educational", enchCount++).getInt();
|
||||
corruptingEnchID =
|
||||
conf.get("enchantments", "Corrupting", enchCount++).getInt();
|
||||
voidEnchID = conf.get("enchantments", "Voidtouched", enchCount++).getInt();
|
||||
impactEnchID = conf.get("enchantments", "Impact", enchCount++).getInt();
|
||||
|
||||
int upgradeCount = 42;
|
||||
hellfireUpgradeID = conf.get("focus upgrades", "Hellfire", upgradeCount).getInt(upgradeCount++);
|
||||
pandemoniumUpgradeID = conf.get("focus upgrades", "Pandemonium", upgradeCount).getInt(upgradeCount++);
|
||||
hellfireUpgradeID =
|
||||
conf.get("focus upgrades", "Hellfire", upgradeCount).getInt(upgradeCount++);
|
||||
pandemoniumUpgradeID =
|
||||
conf.get("focus upgrades", "Pandemonium", upgradeCount).getInt(upgradeCount++);
|
||||
|
||||
noLust = conf.get("general", "No Lust", noLust, "Enable to remove Luxuria aspect and related items.").getBoolean(false);
|
||||
silverfishEmeralds = conf.get("general", "Silverfish Drop Emerald Nuggets", silverfishEmeralds, "Disable to prevent Silverfish from dropping emerald nuggets.").getBoolean(true);
|
||||
greedyEnch = conf.get("general", "Capitalist Enchantment", greedyEnch, "Disable to remove the recipe and effects of the Capitalist enchantment.").getBoolean(true);
|
||||
emeraldTrans = conf.get("general", "Emerald Transmutation", emeraldTrans, "Disable to remove the Emerald Transmutation research and recipe.").getBoolean(true);
|
||||
tagResearch = conf.get("general", "Tag Research Items", tagResearch, "Disable to get rid of the [FM] tags in the Thaumonomicon.").getBoolean(true);
|
||||
wrathCage = conf.get("general", "Wrath Cage Enabled", wrathCage, "Disable if you don't want players using the Wrath Cage.").getBoolean(true);
|
||||
wrathCost = conf.get("general", "Wrath Cage Fuel Cost", wrathCost, "Cost of essentia per round of spawns in the Wrath Cage. Raise to increase essentia costs. Defaults to 5. Set to 0 to remove the need to fuel the Wrath Cage. Setting the cost above 64 is not recommended.").getInt(5);
|
||||
wrathEff = conf.get("general", "Wrath Cage Fuel Efficiency", wrathEff, "Number of spawns a Wrath Cage can get per fuel cost. Defaults to 4. Lower to make the cage less efficient and raise to make it more efficient.").getInt(4);
|
||||
if (wrathEff < 0)
|
||||
wrathEff = 4;
|
||||
wrathCrazy = conf.get("general", "Wrath Cage Cries Havoc", wrathCrazy, "Enable to let the Wrath Cage imprint on ANY non-boss mob. May break your game or make your game Awesome.").getBoolean(false);
|
||||
enchanting = conf.get("general", "Enchantments Enabled", enchanting, "Disable if you don't like enchantments.").getBoolean(true);
|
||||
spork = conf.get("silly", "Spork of Doom", spork, "What is this? I don't even...").getBoolean(false);
|
||||
gluttony = (byte)conf.get("general", "Gluttony", gluttony, "Whether gluttony research is enabled. 0 = Enabled, 1 = Disabled, 2 = Hardcore").getInt(0);
|
||||
if(gluttony < 0 || gluttony > 2)
|
||||
gluttony = 0;
|
||||
noLust = conf.get("general", "No Lust", noLust, "Enable to remove Luxuria aspect and related items.")
|
||||
.getBoolean(false);
|
||||
silverfishEmeralds = conf.get(
|
||||
"general",
|
||||
"Silverfish Drop Emerald Nuggets",
|
||||
silverfishEmeralds,
|
||||
"Disable to prevent Silverfish from dropping emerald nuggets.")
|
||||
.getBoolean(true);
|
||||
greedyEnch = conf.get(
|
||||
"general",
|
||||
"Capitalist Enchantment",
|
||||
greedyEnch,
|
||||
"Disable to remove the recipe and effects of the Capitalist enchantment.")
|
||||
.getBoolean(true);
|
||||
emeraldTrans = conf.get(
|
||||
"general",
|
||||
"Emerald Transmutation",
|
||||
emeraldTrans,
|
||||
"Disable to remove the Emerald Transmutation research and recipe.")
|
||||
.getBoolean(true);
|
||||
tagResearch = conf.get(
|
||||
"general",
|
||||
"Tag Research Items",
|
||||
tagResearch,
|
||||
"Disable to get rid of the [FM] tags in the Thaumonomicon.")
|
||||
.getBoolean(true);
|
||||
wrathCage = conf.get(
|
||||
"general",
|
||||
"Wrath Cage Enabled",
|
||||
wrathCage,
|
||||
"Disable if you don't want players using the Wrath Cage.")
|
||||
.getBoolean(true);
|
||||
wrathCost = conf.get(
|
||||
"general",
|
||||
"Wrath Cage Fuel Cost",
|
||||
wrathCost,
|
||||
"Cost of essentia per round of spawns in the Wrath Cage. Raise to increase essentia costs. Defaults to 5. Set to 0 to remove the need to fuel the Wrath Cage. Setting the cost above 64 is not recommended.")
|
||||
.getInt(5);
|
||||
wrathEff = conf.get(
|
||||
"general",
|
||||
"Wrath Cage Fuel Efficiency",
|
||||
wrathEff,
|
||||
"Number of spawns a Wrath Cage can get per fuel cost. Defaults to 4. Lower to make the cage less efficient and raise to make it more efficient.")
|
||||
.getInt(4);
|
||||
if (wrathEff < 0) wrathEff = 4;
|
||||
wrathCrazy = conf.get(
|
||||
"general",
|
||||
"Wrath Cage Cries Havoc",
|
||||
wrathCrazy,
|
||||
"Enable to let the Wrath Cage imprint on ANY non-boss mob. May break your game or make your game Awesome.")
|
||||
.getBoolean(false);
|
||||
enchanting = conf.get(
|
||||
"general", "Enchantments Enabled", enchanting, "Disable if you don't like enchantments.")
|
||||
.getBoolean(true);
|
||||
spork = conf.get("silly", "Spork of Doom", spork, "What is this? I don't even...")
|
||||
.getBoolean(false);
|
||||
gluttony = (byte) conf.get(
|
||||
"general",
|
||||
"Gluttony",
|
||||
gluttony,
|
||||
"Whether gluttony research is enabled. 0 = Enabled, 1 = Disabled, 2 = Hardcore")
|
||||
.getInt(0);
|
||||
if (gluttony < 0 || gluttony > 2) gluttony = 0;
|
||||
hereticID = conf.get("general", "Heretic Villager ID", hereticID).getInt(hereticID);
|
||||
|
||||
String trashlist = conf.get("general", "Garbage Blocks", "dirt;sand;gravel;cobblestone;netherrack", "List of OreDict names for garbage blocks, separated by semicolons, for the Consuming enchant to eat").getString();
|
||||
String trashlist = conf.get(
|
||||
"general",
|
||||
"Garbage Blocks",
|
||||
"dirt;sand;gravel;cobblestone;netherrack",
|
||||
"List of OreDict names for garbage blocks, separated by semicolons, for the Consuming enchant to eat")
|
||||
.getString();
|
||||
String[] trashpile = trashlist.split(";");
|
||||
for(String garbage : trashpile){
|
||||
for (String garbage : trashpile) {
|
||||
trash.add(garbage);
|
||||
}
|
||||
|
||||
bloodSealPotionID = conf.get("potions", "Blood Seal", bloodSealPotionID).getInt(bloodSealPotionID);
|
||||
dragonwrackPotionID = conf.get("potions", "Dragonwrack", dragonwrackPotionID).getInt(dragonwrackPotionID);
|
||||
bloodSealPotionID =
|
||||
conf.get("potions", "Blood Seal", bloodSealPotionID).getInt(bloodSealPotionID);
|
||||
dragonwrackPotionID =
|
||||
conf.get("potions", "Dragonwrack", dragonwrackPotionID).getInt(dragonwrackPotionID);
|
||||
|
||||
crossMod = conf.get("compatibility", "Cross-Mod Interaction", crossMod, "Disable to keep mods segregated.").getBoolean(true);
|
||||
crossWand = conf.get("compatibility", "Conversion Wands", crossWand, "Disable to remove all conversion wands.").getBoolean(true);
|
||||
crossMod = conf.get("compatibility", "Cross-Mod Interaction", crossMod, "Disable to keep mods segregated.")
|
||||
.getBoolean(true);
|
||||
crossWand = conf.get(
|
||||
"compatibility", "Conversion Wands", crossWand, "Disable to remove all conversion wands.")
|
||||
.getBoolean(true);
|
||||
botan = conf.get("compatibility", "Botania Interaction", botan).getBoolean(true);
|
||||
bloodMagic = conf.get("compatibility", "Blood Magic Interaction", bloodMagic).getBoolean(true);
|
||||
am2 = conf.get("compatibility", "Ars Magica 2 Interaction", am2, "AM2 interaction is unsupported. Enable at your own risk.").getBoolean(true);
|
||||
bloodMagic = conf.get("compatibility", "Blood Magic Interaction", bloodMagic)
|
||||
.getBoolean(true);
|
||||
am2 = conf.get(
|
||||
"compatibility",
|
||||
"Ars Magica 2 Interaction",
|
||||
am2,
|
||||
"AM2 interaction is unsupported. Enable at your own risk.")
|
||||
.getBoolean(true);
|
||||
tt = conf.get("compatibility", "Thaumic Tinkerer Interaction", tt).getBoolean(true);
|
||||
tc = conf.get("compatibility", "Tinkers Construct Interaction", tc).getBoolean(true);
|
||||
special = conf.get("compatibility", "Special Mobs Interaction", special).getBoolean(true);
|
||||
twilight = conf.get("compatibility", "Twilight Forest Interaction", twilight).getBoolean(true);
|
||||
emc = conf.get("compatibility", "Equivalent Exchange 3 EMC", emc, "Disable if you don't want Forbidden Magic to add EMC values to items.").getBoolean(true);
|
||||
//eewand = conf.get("compatibility", "Equivalent Exchange 3 Wand", eewand, "Disable to specifically disable the EMC to Vis wand.").getBoolean(true);
|
||||
special = conf.get("compatibility", "Special Mobs Interaction", special)
|
||||
.getBoolean(true);
|
||||
twilight = conf.get("compatibility", "Twilight Forest Interaction", twilight)
|
||||
.getBoolean(true);
|
||||
emc = conf.get(
|
||||
"compatibility",
|
||||
"Equivalent Exchange 3 EMC",
|
||||
emc,
|
||||
"Disable if you don't want Forbidden Magic to add EMC values to items.")
|
||||
.getBoolean(true);
|
||||
// eewand = conf.get("compatibility", "Equivalent Exchange 3 Wand", eewand, "Disable to specifically disable
|
||||
// the EMC to Vis wand.").getBoolean(true);
|
||||
|
||||
bloodvis = conf.get("power converters", "LP to Vis", bloodvis, "How much LP 0.01 Vis is worth").getInt(bloodvis);
|
||||
manavis = conf.get("power converters", "Mana to Vis", manavis, "How much Mana 0.01 Vis is worth").getInt(manavis);
|
||||
bloodvis = conf.get("power converters", "LP to Vis", bloodvis, "How much LP 0.01 Vis is worth")
|
||||
.getInt(bloodvis);
|
||||
manavis = conf.get("power converters", "Mana to Vis", manavis, "How much Mana 0.01 Vis is worth")
|
||||
.getInt(manavis);
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, e, "Had a problem loading its configuration.");
|
||||
} finally {
|
||||
@@ -142,7 +216,8 @@ public class Config {
|
||||
thaumcraftShard = ItemApi.getItem("itemShard", 0);
|
||||
thaumcraftTaintBlock = ItemApi.getBlock("blockTaint", 0);
|
||||
thaumcraftOre = ItemApi.getBlock("blockCustomOre", 0);
|
||||
taintMaterial = Block.getBlockFromItem(thaumcraftTaintBlock.getItem()).getMaterial();
|
||||
taintMaterial =
|
||||
Block.getBlockFromItem(thaumcraftTaintBlock.getItem()).getMaterial();
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, e, "There was problem when retrieving information from Thaumcraft.");
|
||||
e.printStackTrace();
|
||||
@@ -170,10 +245,8 @@ public class Config {
|
||||
spawnerMobs.put("PigZombie", Aspect.GREED);
|
||||
spawnerMobs.put("Enderman", Aspect.ELDRITCH);
|
||||
spawnerMobs.put("CaveSpider", Aspect.POISON);
|
||||
if (silverfishEmeralds)
|
||||
spawnerMobs.put("Silverfish", Aspect.GREED);
|
||||
else
|
||||
spawnerMobs.put("Silverfish", Aspect.BEAST);
|
||||
if (silverfishEmeralds) spawnerMobs.put("Silverfish", Aspect.GREED);
|
||||
else spawnerMobs.put("Silverfish", Aspect.BEAST);
|
||||
spawnerMobs.put("Blaze", Aspect.FIRE);
|
||||
spawnerMobs.put("LavaSlime", Aspect.FIRE);
|
||||
spawnerMobs.put("Witch", Aspect.MAGIC);
|
||||
@@ -199,4 +272,4 @@ public class Config {
|
||||
// spawnerMobs.put("Taintacle", DarkAspects.LUST);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
package fox.spiteful.forbidden;
|
||||
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -12,9 +13,6 @@ import thaumcraft.api.ThaumcraftApiHelper;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
|
||||
public class DarkAspects {
|
||||
public static Aspect NETHER;
|
||||
public static Aspect WRATH;
|
||||
@@ -26,16 +24,50 @@ public class DarkAspects {
|
||||
|
||||
public static void initAspects() {
|
||||
if (!Config.noLust) {
|
||||
LUST = new Aspect("luxuria", 0xffc1ce, new Aspect[] { Aspect.FLESH, Aspect.HUNGER }, new ResourceLocation("forbidden", "textures/aspects/luxuria.png"), 1);
|
||||
LUST = new Aspect(
|
||||
"luxuria",
|
||||
0xffc1ce,
|
||||
new Aspect[] {Aspect.FLESH, Aspect.HUNGER},
|
||||
new ResourceLocation("forbidden", "textures/aspects/luxuria.png"),
|
||||
1);
|
||||
}
|
||||
|
||||
NETHER = new Aspect("infernus", 0xff0000, new Aspect[] { Aspect.FIRE, Aspect.MAGIC }, new ResourceLocation("forbidden", "textures/aspects/infernus.png"), 771);
|
||||
PRIDE = new Aspect("superbia", 0x9639ff, new Aspect[] { Aspect.FLIGHT, Aspect.VOID }, new ResourceLocation("forbidden", "textures/aspects/superbia.png"), 1);
|
||||
GLUTTONY = new Aspect("gula", 0xd59c46, new Aspect[] { Aspect.HUNGER, Aspect.VOID }, new ResourceLocation("forbidden", "textures/aspects/gula.png"), 1);
|
||||
ENVY = new Aspect("invidia", 0x00ba00, new Aspect[] { Aspect.SENSES, Aspect.HUNGER }, new ResourceLocation("forbidden", "textures/aspects/invidia.png"), 1);
|
||||
SLOTH = new Aspect("desidia", 0x6e6e6e, new Aspect[] { Aspect.TRAP, Aspect.SOUL }, new ResourceLocation("forbidden", "textures/aspects/desidia.png"), 771);
|
||||
WRATH = new Aspect("ira", 0x870404, new Aspect[] { Aspect.WEAPON, Aspect.FIRE }, new ResourceLocation("forbidden", "textures/aspects/ira.png"), 771);
|
||||
|
||||
NETHER = new Aspect(
|
||||
"infernus",
|
||||
0xff0000,
|
||||
new Aspect[] {Aspect.FIRE, Aspect.MAGIC},
|
||||
new ResourceLocation("forbidden", "textures/aspects/infernus.png"),
|
||||
771);
|
||||
PRIDE = new Aspect(
|
||||
"superbia",
|
||||
0x9639ff,
|
||||
new Aspect[] {Aspect.FLIGHT, Aspect.VOID},
|
||||
new ResourceLocation("forbidden", "textures/aspects/superbia.png"),
|
||||
1);
|
||||
GLUTTONY = new Aspect(
|
||||
"gula",
|
||||
0xd59c46,
|
||||
new Aspect[] {Aspect.HUNGER, Aspect.VOID},
|
||||
new ResourceLocation("forbidden", "textures/aspects/gula.png"),
|
||||
1);
|
||||
ENVY = new Aspect(
|
||||
"invidia",
|
||||
0x00ba00,
|
||||
new Aspect[] {Aspect.SENSES, Aspect.HUNGER},
|
||||
new ResourceLocation("forbidden", "textures/aspects/invidia.png"),
|
||||
1);
|
||||
SLOTH = new Aspect(
|
||||
"desidia",
|
||||
0x6e6e6e,
|
||||
new Aspect[] {Aspect.TRAP, Aspect.SOUL},
|
||||
new ResourceLocation("forbidden", "textures/aspects/desidia.png"),
|
||||
771);
|
||||
WRATH = new Aspect(
|
||||
"ira",
|
||||
0x870404,
|
||||
new Aspect[] {Aspect.WEAPON, Aspect.FIRE},
|
||||
new ResourceLocation("forbidden", "textures/aspects/ira.png"),
|
||||
771);
|
||||
}
|
||||
|
||||
private static AspectList getAspectList(ItemStack stack) {
|
||||
@@ -58,7 +90,8 @@ public class DarkAspects {
|
||||
// list.add(NETHER, 2);
|
||||
// ThaumcraftApi.registerObjectTag(Block.oreNetherQuartz.blockID, -1,
|
||||
// list);
|
||||
ThaumcraftApi.registerObjectTag("oreQuartz", (new AspectList()).add(Aspect.CRYSTAL, 3).add(NETHER, 2));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
"oreQuartz", (new AspectList()).add(Aspect.CRYSTAL, 3).add(NETHER, 2));
|
||||
|
||||
list = getAspectList(new ItemStack(Items.nether_star));
|
||||
list.add(NETHER, 8).add(PRIDE, 8);
|
||||
@@ -105,13 +138,15 @@ public class DarkAspects {
|
||||
list = getAspectList(new ItemStack(Items.golden_chestplate));
|
||||
if (list != null) {
|
||||
list.add(PRIDE, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_chestplate, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(Items.golden_chestplate, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
|
||||
list = getAspectList(new ItemStack(Items.golden_leggings));
|
||||
if (list != null) {
|
||||
list.add(PRIDE, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_leggings, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(Items.golden_leggings, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
|
||||
list = getAspectList(new ItemStack(Items.golden_boots));
|
||||
@@ -161,7 +196,12 @@ public class DarkAspects {
|
||||
// -1, (new AspectList()).merge(Aspect.MECHANISM, 2).merge(Aspect.ORDER,
|
||||
// 2).merge(ENVY, 2));
|
||||
|
||||
list = (new AspectList()).add(Aspect.FLESH, 6).add(Aspect.LIFE, 6).add(Aspect.ENERGY, 6).add(Aspect.BEAST, 4).add(GLUTTONY, 6);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.FLESH, 6)
|
||||
.add(Aspect.LIFE, 6)
|
||||
.add(Aspect.ENERGY, 6)
|
||||
.add(Aspect.BEAST, 4)
|
||||
.add(GLUTTONY, 6);
|
||||
ThaumcraftApi.registerObjectTag("itemBacon", list);
|
||||
|
||||
if (!Config.noLust) {
|
||||
@@ -188,10 +228,8 @@ public class DarkAspects {
|
||||
} else if (mobTag.entityName.equals("Skeleton") && mobTag.nbts.length > 0) {
|
||||
mobTag.aspects.add(NETHER, 3);
|
||||
} else if (mobTag.entityName.equals("Creeper")) {
|
||||
if (mobTag.nbts.length > 0)
|
||||
mobTag.aspects.add(WRATH, 4);
|
||||
else
|
||||
mobTag.aspects.add(WRATH, 2);
|
||||
if (mobTag.nbts.length > 0) mobTag.aspects.add(WRATH, 4);
|
||||
else mobTag.aspects.add(WRATH, 2);
|
||||
} else if (mobTag.entityName.equals("WitherBoss")) {
|
||||
mobTag.aspects.add(NETHER, 7).add(WRATH, 7);
|
||||
} else if (mobTag.entityName.equals("Ozelot")) {
|
||||
@@ -229,27 +267,70 @@ public class DarkAspects {
|
||||
}
|
||||
}
|
||||
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 0), (new AspectList()).add(NETHER, 1).add(WRATH, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 1), (new AspectList()).add(NETHER, 1).add(ENVY, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 2), (new AspectList()).add(Aspect.TAINT, 3).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 3), (new AspectList()).add(NETHER, 1).add(PRIDE, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0),
|
||||
(new AspectList()).add(NETHER, 1).add(WRATH, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 1),
|
||||
(new AspectList()).add(NETHER, 1).add(ENVY, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 2),
|
||||
(new AspectList()).add(Aspect.TAINT, 3).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 3),
|
||||
(new AspectList()).add(NETHER, 1).add(PRIDE, 2).add(Aspect.CRYSTAL, 1));
|
||||
if (!Config.noLust)
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), (new AspectList()).add(NETHER, 1).add(LUST, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 4),
|
||||
(new AspectList()).add(NETHER, 1).add(LUST, 2).add(Aspect.CRYSTAL, 1));
|
||||
else
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), (new AspectList()).add(Aspect.VOID, 1));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.gluttonyShard, 1, OreDictionary.WILDCARD_VALUE), (new AspectList()).add(NETHER, 1).add(GLUTTONY, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 5), (new AspectList()).add(NETHER, 1).add(SLOTH, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.deadlyShards, 1, 6), (new AspectList()).add(NETHER, 1).add(Aspect.GREED, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.resource, 1, 0), (new AspectList()).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(ForbiddenItems.resource, 1, 1), (new AspectList()).add(Aspect.DARKNESS, 1));
|
||||
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));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 4), (new AspectList()).add(Aspect.VOID, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.gluttonyShard, 1, OreDictionary.WILDCARD_VALUE),
|
||||
(new AspectList()).add(NETHER, 1).add(GLUTTONY, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 5),
|
||||
(new AspectList()).add(NETHER, 1).add(SLOTH, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 6),
|
||||
(new AspectList()).add(NETHER, 1).add(Aspect.GREED, 2).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.resource, 1, 0), (new AspectList()).add(Aspect.CRYSTAL, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(ForbiddenItems.resource, 1, 1), (new AspectList()).add(Aspect.DARKNESS, 1));
|
||||
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));
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
package fox.spiteful.forbidden;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class DarkResearchItem extends ResearchItem {
|
||||
String inter = null;
|
||||
@@ -23,12 +23,14 @@ public class DarkResearchItem extends ResearchItem {
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
}
|
||||
|
||||
public DarkResearchItem(String par1, String x, String mod, AspectList tags, int y, int z, int par5, ResourceLocation icon) {
|
||||
public DarkResearchItem(
|
||||
String par1, String x, String mod, AspectList tags, int y, int z, int par5, ResourceLocation icon) {
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
inter = mod;
|
||||
}
|
||||
|
||||
public DarkResearchItem(String par1, String x, String mod, AspectList tags, int y, int z, int par5, ItemStack icon) {
|
||||
public DarkResearchItem(
|
||||
String par1, String x, String mod, AspectList tags, int y, int z, int par5, ItemStack icon) {
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
inter = mod;
|
||||
}
|
||||
@@ -41,11 +43,8 @@ public class DarkResearchItem extends ResearchItem {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getText() {
|
||||
if (Config.tagResearch) {
|
||||
if (inter == null)
|
||||
return "[FM] " + StatCollector.translateToLocal("forbidden.research_text." + key);
|
||||
else
|
||||
return "[FM] " + inter + " " + StatCollector.translateToLocal("forbidden.research_text." + key);
|
||||
} else
|
||||
return StatCollector.translateToLocal("forbidden.research_text." + key);
|
||||
if (inter == null) return "[FM] " + StatCollector.translateToLocal("forbidden.research_text." + key);
|
||||
else return "[FM] " + inter + " " + StatCollector.translateToLocal("forbidden.research_text." + key);
|
||||
} else return StatCollector.translateToLocal("forbidden.research_text." + key);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,20 @@
|
||||
package fox.spiteful.forbidden;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import baubles.api.BaublesApi;
|
||||
import com.google.common.collect.Multimap;
|
||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
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.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import fox.spiteful.forbidden.items.baubles.ItemSubCollar;
|
||||
import fox.spiteful.forbidden.items.tools.ItemRidingCrop;
|
||||
import fox.spiteful.forbidden.items.tools.ItemTaintPickaxe;
|
||||
import fox.spiteful.forbidden.potions.DarkPotions;
|
||||
import java.util.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
@@ -34,10 +37,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
@@ -47,28 +50,19 @@ import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed;
|
||||
import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
|
||||
import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent;
|
||||
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.entities.ITaintedMob;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.lib.utils.Utils;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class FMEventHandler {
|
||||
Random randy = new Random();
|
||||
final Aspect[] primals = { Aspect.ENTROPY, Aspect.ORDER, Aspect.FIRE, Aspect.WATER, Aspect.EARTH, Aspect.AIR };
|
||||
final Aspect[] primals = {Aspect.ENTROPY, Aspect.ORDER, Aspect.FIRE, Aspect.WATER, Aspect.EARTH, Aspect.AIR};
|
||||
HashMap<String, Integer> lastLP = new HashMap<String, Integer>();
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerBreaking(BreakSpeed event) {
|
||||
if (event.entityPlayer.getCurrentEquippedItem() != null) {
|
||||
@@ -79,25 +73,19 @@ public class FMEventHandler {
|
||||
int y = event.y;
|
||||
int z = event.z;
|
||||
float hardness = world.getBlock(x, y, z).getBlockHardness(world, x, y, z);
|
||||
if (hardness == 0.0F)
|
||||
event.newSpeed = 0.0F;
|
||||
else if (hardness < 5.0F)
|
||||
event.newSpeed = 0.1F;
|
||||
else if (hardness < 20.0F)
|
||||
event.newSpeed = hardness / 2.0F;
|
||||
else
|
||||
event.newSpeed = 5.0F + hardness;
|
||||
if (hardness == 0.0F) event.newSpeed = 0.0F;
|
||||
else if (hardness < 5.0F) event.newSpeed = 0.1F;
|
||||
else if (hardness < 20.0F) event.newSpeed = hardness / 2.0F;
|
||||
else event.newSpeed = 5.0F + hardness;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingDrops(LivingDropsEvent event) {
|
||||
if (event.source.getDamageType().equals("player") && event.entityLiving instanceof ITaintedMob)
|
||||
{
|
||||
if (event.source.getDamageType().equals("player") && event.entityLiving instanceof ITaintedMob) {
|
||||
PotionEffect effect = event.entityLiving.getActivePotionEffect(Potion.weakness);
|
||||
if (effect != null)
|
||||
{
|
||||
if (effect != null) {
|
||||
if (effect.getAmplifier() >= 2) {
|
||||
double rand = Math.random();
|
||||
if (rand < 0.50d) {
|
||||
@@ -108,50 +96,87 @@ public class FMEventHandler {
|
||||
}
|
||||
|
||||
if (Config.silverfishEmeralds && event.entityLiving instanceof EntitySilverfish) {
|
||||
if (event.entityLiving.worldObj.getBiomeGenForCoords((int) event.entityLiving.posX, (int) event.entityLiving.posZ).biomeID == BiomeGenBase.extremeHills.biomeID) {
|
||||
if (event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer && randy.nextInt(30) <= (2 + event.lootingLevel * 2))
|
||||
if (event.entityLiving.worldObj.getBiomeGenForCoords(
|
||||
(int) event.entityLiving.posX, (int) event.entityLiving.posZ)
|
||||
.biomeID
|
||||
== BiomeGenBase.extremeHills.biomeID) {
|
||||
if (event.recentlyHit
|
||||
&& event.source.getEntity() != null
|
||||
&& event.source.getEntity() instanceof EntityPlayer
|
||||
&& randy.nextInt(30) <= (2 + event.lootingLevel * 2))
|
||||
addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0));
|
||||
} else if (event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer && !(event.source.getEntity() instanceof FakePlayer) && randy.nextInt(70) <= (1 + event.lootingLevel * 3)) {
|
||||
} else if (event.recentlyHit
|
||||
&& event.source.getEntity() != null
|
||||
&& event.source.getEntity() instanceof EntityPlayer
|
||||
&& !(event.source.getEntity() instanceof FakePlayer)
|
||||
&& randy.nextInt(70) <= (1 + event.lootingLevel * 3)) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Config.greedyEnch && (event.entityLiving instanceof EntityVillager || event.entityLiving instanceof IMob) && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
|
||||
if (Config.greedyEnch
|
||||
&& (event.entityLiving instanceof EntityVillager || event.entityLiving instanceof IMob)
|
||||
&& event.recentlyHit
|
||||
&& event.source.getEntity() != null
|
||||
&& event.source.getEntity() instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) event.source.getEntity();
|
||||
ItemStack equip = player.getCurrentEquippedItem();
|
||||
if (equip != null && EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.greedy.effectId, equip) > 0 && event.lootingLevel <= 0) {
|
||||
if (event.entityLiving instanceof EntityVillager)
|
||||
addDrop(event, new ItemStack(Items.emerald, 1));
|
||||
else if (randy.nextInt(35) < 3)
|
||||
addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0));
|
||||
if (equip != null
|
||||
&& EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.greedy.effectId, equip) > 0
|
||||
&& event.lootingLevel <= 0) {
|
||||
if (event.entityLiving instanceof EntityVillager) addDrop(event, new ItemStack(Items.emerald, 1));
|
||||
else if (randy.nextInt(35) < 3) addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0));
|
||||
}
|
||||
}
|
||||
|
||||
if (event.entityLiving.getClass() == EntitySkeleton.class && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
|
||||
if (event.entityLiving.getClass() == EntitySkeleton.class
|
||||
&& event.recentlyHit
|
||||
&& event.source.getEntity() != null
|
||||
&& event.source.getEntity() instanceof EntityPlayer) {
|
||||
ItemStack weap = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
|
||||
if (weap != null && weap.getItem() == ForbiddenItems.skullAxe && randy.nextInt(26) <= (3 + EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) {
|
||||
if (weap != null
|
||||
&& weap.getItem() == ForbiddenItems.skullAxe
|
||||
&& randy.nextInt(26)
|
||||
<= (3 + EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) {
|
||||
addDrop(event, new ItemStack(Items.skull, 1, ((EntitySkeleton) event.entityLiving).getSkeletonType()));
|
||||
}
|
||||
}
|
||||
|
||||
if (event.entityLiving.getClass() == EntityZombie.class && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
|
||||
if (event.entityLiving.getClass() == EntityZombie.class
|
||||
&& event.recentlyHit
|
||||
&& event.source.getEntity() != null
|
||||
&& event.source.getEntity() instanceof EntityPlayer) {
|
||||
ItemStack weap = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
|
||||
if (weap != null && weap.getItem() == ForbiddenItems.skullAxe && randy.nextInt(26) <= (2 + 2 * EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) {
|
||||
if (weap != null
|
||||
&& weap.getItem() == ForbiddenItems.skullAxe
|
||||
&& randy.nextInt(26)
|
||||
<= (2 + 2 * EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) {
|
||||
addDrop(event, new ItemStack(Items.skull, 1, 2));
|
||||
}
|
||||
}
|
||||
|
||||
if (event.entityLiving.getClass() == EntityCreeper.class && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
|
||||
if (event.entityLiving.getClass() == EntityCreeper.class
|
||||
&& event.recentlyHit
|
||||
&& event.source.getEntity() != null
|
||||
&& event.source.getEntity() instanceof EntityPlayer) {
|
||||
ItemStack weap = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
|
||||
if (weap != null && weap.getItem() == ForbiddenItems.skullAxe && randy.nextInt(26) <= (2 + 2 * EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) {
|
||||
if (weap != null
|
||||
&& weap.getItem() == ForbiddenItems.skullAxe
|
||||
&& randy.nextInt(26)
|
||||
<= (2 + 2 * EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) {
|
||||
addDrop(event, new ItemStack(Items.skull, 1, 4));
|
||||
}
|
||||
}
|
||||
|
||||
if (event.entityLiving instanceof EntityPlayer && event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
|
||||
if (event.entityLiving instanceof EntityPlayer
|
||||
&& event.recentlyHit
|
||||
&& event.source.getEntity() != null
|
||||
&& event.source.getEntity() instanceof EntityPlayer) {
|
||||
ItemStack weap = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
|
||||
if (weap != null && weap.getItem() == ForbiddenItems.skullAxe && randy.nextInt(11) <= (1 + EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) {
|
||||
if (weap != null
|
||||
&& weap.getItem() == ForbiddenItems.skullAxe
|
||||
&& randy.nextInt(11)
|
||||
<= (1 + EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, weap))) {
|
||||
ItemStack head = new ItemStack(Items.skull, 1, 3);
|
||||
NBTTagCompound nametag = new NBTTagCompound();
|
||||
nametag.setString("SkullOwner", ((EntityPlayer) event.entityLiving).getCommandSenderName());
|
||||
@@ -160,16 +185,21 @@ public class FMEventHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (event.entityLiving.worldObj.provider.dimensionId != -1)
|
||||
return;
|
||||
if (event.entityLiving.worldObj.provider.dimensionId != -1) return;
|
||||
|
||||
if (!event.recentlyHit || event.source.getEntity() == null || !(event.source.getEntity() instanceof EntityPlayer) || event.source.getEntity() instanceof FakePlayer) {
|
||||
if (!event.recentlyHit
|
||||
|| event.source.getEntity() == null
|
||||
|| !(event.source.getEntity() instanceof EntityPlayer)
|
||||
|| event.source.getEntity() instanceof FakePlayer) {
|
||||
if (randy.nextInt(30) < 4) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1 + randy.nextInt(3), 5));
|
||||
}
|
||||
}
|
||||
|
||||
if (event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer && !(event.source.getEntity() instanceof FakePlayer)) {
|
||||
if (event.recentlyHit
|
||||
&& event.source.getEntity() != null
|
||||
&& event.source.getEntity() instanceof EntityPlayer
|
||||
&& !(event.source.getEntity() instanceof FakePlayer)) {
|
||||
if (event.entityLiving instanceof IMob) {
|
||||
int wrath = 2;
|
||||
int greed = 0;
|
||||
@@ -177,7 +207,8 @@ public class FMEventHandler {
|
||||
if (heldItem != null) {
|
||||
if (heldItem.getItem() instanceof ItemTool) {
|
||||
Multimap map = heldItem.getItem().getAttributeModifiers(heldItem);
|
||||
Collection collect = map.get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName());
|
||||
Collection collect =
|
||||
map.get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName());
|
||||
if (collect instanceof AttributeModifier) {
|
||||
wrath += (int) ((AttributeModifier) collect).getAmount();
|
||||
}
|
||||
@@ -201,9 +232,9 @@ public class FMEventHandler {
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.baneOfArthropods.effectId, heldItem);
|
||||
}
|
||||
|
||||
if(heldItem.getItem() instanceof ItemWandCasting){
|
||||
wrath += ((ItemWandCasting)(heldItem.getItem())).getFocusPotency(heldItem);
|
||||
greed += ((ItemWandCasting)(heldItem.getItem())).getFocusTreasure(heldItem);
|
||||
if (heldItem.getItem() instanceof ItemWandCasting) {
|
||||
wrath += ((ItemWandCasting) (heldItem.getItem())).getFocusPotency(heldItem);
|
||||
greed += ((ItemWandCasting) (heldItem.getItem())).getFocusTreasure(heldItem);
|
||||
}
|
||||
|
||||
greed += EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, heldItem);
|
||||
@@ -214,16 +245,20 @@ public class FMEventHandler {
|
||||
}
|
||||
|
||||
if (event.entityLiving instanceof IBossDisplayData) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 2 + randy.nextInt(1 + event.lootingLevel), 3));
|
||||
addDrop(
|
||||
event,
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 2 + randy.nextInt(1 + event.lootingLevel), 3));
|
||||
}
|
||||
|
||||
if(greed > 0 && randy.nextInt(20) <= greed){
|
||||
if (greed > 0 && randy.nextInt(20) <= greed) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 6));
|
||||
}
|
||||
}
|
||||
|
||||
if (event.entityLiving instanceof EntityPigZombie && !(event.source.getEntity() instanceof FakePlayer)) {
|
||||
if (event.entityLiving.getHeldItem() != null && event.entityLiving.getHeldItem().getItem() == ForbiddenItems.deadlyShards && event.entityLiving.getHeldItem().getItemDamage() == 1) {
|
||||
if (event.entityLiving.getHeldItem() != null
|
||||
&& event.entityLiving.getHeldItem().getItem() == ForbiddenItems.deadlyShards
|
||||
&& event.entityLiving.getHeldItem().getItemDamage() == 1) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 1));
|
||||
}
|
||||
}
|
||||
@@ -231,14 +266,21 @@ public class FMEventHandler {
|
||||
}
|
||||
|
||||
public void addDrop(LivingDropsEvent event, ItemStack drop) {
|
||||
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, drop);
|
||||
EntityItem entityitem = new EntityItem(
|
||||
event.entityLiving.worldObj,
|
||||
event.entityLiving.posX,
|
||||
event.entityLiving.posY,
|
||||
event.entityLiving.posZ,
|
||||
drop);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
event.drops.add(entityitem);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onDeath(LivingDeathEvent event) {
|
||||
if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer && ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem() != null) {
|
||||
if (event.source.getEntity() != null
|
||||
&& event.source.getEntity() instanceof EntityPlayer
|
||||
&& ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem() != null) {
|
||||
ItemStack equip = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
|
||||
if (equip.getItem() == ForbiddenItems.fork) {
|
||||
String name = null;
|
||||
@@ -251,21 +293,30 @@ public class FMEventHandler {
|
||||
return;
|
||||
}
|
||||
} finally {
|
||||
if (name == null)
|
||||
return;
|
||||
if (name == null) return;
|
||||
}
|
||||
|
||||
if (Config.spawnerMobs.containsKey(name) || (Config.wrathCrazy && !(event.entityLiving instanceof IBossDisplayData)))
|
||||
if (Config.spawnerMobs.containsKey(name)
|
||||
|| (Config.wrathCrazy && !(event.entityLiving instanceof IBossDisplayData)))
|
||||
imprintCrystal((EntityPlayer) (event.source.getEntity()), name);
|
||||
}
|
||||
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip) > 0 && event.entityLiving instanceof EntityLiving && EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, equip) == 0) {
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip) > 0
|
||||
&& event.entityLiving instanceof EntityLiving
|
||||
&& EnchantmentHelper.getEnchantmentLevel(Enchantment.looting.effectId, equip) == 0) {
|
||||
try {
|
||||
int learning = 3 * XPReflectionHelper.getXP(((EntityLiving) event.entityLiving)) * EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip);
|
||||
int learning = 3
|
||||
* XPReflectionHelper.getXP(((EntityLiving) event.entityLiving))
|
||||
* EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.educational.effectId, equip);
|
||||
while (learning > 0) {
|
||||
int xp = EntityXPOrb.getXPSplit(learning);
|
||||
learning -= xp;
|
||||
event.entityLiving.worldObj.spawnEntityInWorld(new EntityXPOrb(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, xp));
|
||||
event.entityLiving.worldObj.spawnEntityInWorld(new EntityXPOrb(
|
||||
event.entityLiving.worldObj,
|
||||
event.entityLiving.posX,
|
||||
event.entityLiving.posY,
|
||||
event.entityLiving.posZ,
|
||||
xp));
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
LogHandler.log(Level.ERROR, "Failed to educate!");
|
||||
@@ -277,9 +328,10 @@ public class FMEventHandler {
|
||||
public void imprintCrystal(EntityPlayer player, String mob) {
|
||||
for (int x = 0; x < player.inventory.getSizeInventory(); ++x) {
|
||||
ItemStack item = player.inventory.getStackInSlot(x);
|
||||
if (item != null && item.getItem() == ForbiddenItems.mobCrystal && (!item.hasTagCompound() || !item.getTagCompound().hasKey("mob"))) {
|
||||
if (!item.hasTagCompound())
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
if (item != null
|
||||
&& item.getItem() == ForbiddenItems.mobCrystal
|
||||
&& (!item.hasTagCompound() || !item.getTagCompound().hasKey("mob"))) {
|
||||
if (!item.hasTagCompound()) item.setTagCompound(new NBTTagCompound());
|
||||
item.stackTagCompound.setString("mob", mob);
|
||||
return;
|
||||
}
|
||||
@@ -291,17 +343,20 @@ 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() == thaumcraft.common.config.Config.taintMaterial && event.drops.size() == 0 && event.block != ForbiddenBlocks.taintLeaves) {
|
||||
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 (event.isSilkTouching) chance += 6;
|
||||
|
||||
if (randy.nextInt(31) <= chance) {
|
||||
event.drops.add(new ItemStack(ForbiddenItems.deadlyShards, 1, 2));
|
||||
}
|
||||
}
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.cluster.effectId, equip) > 0 && EnchantmentHelper.getFortuneModifier(player) == 0) {
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.cluster.effectId, equip) > 0
|
||||
&& EnchantmentHelper.getFortuneModifier(player) == 0) {
|
||||
if (event.drops != null && event.drops.size() > 0) {
|
||||
int cluster = EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.cluster.effectId, equip);
|
||||
float chance = 0.2F + (float) cluster * 0.075F;
|
||||
@@ -312,7 +367,13 @@ public class FMEventHandler {
|
||||
if (!is.isItemEqual(smr)) {
|
||||
event.drops.set(a, smr);
|
||||
if (!event.world.isRemote) {
|
||||
event.world.playSoundEffect((double) ((float) event.x + 0.5F), (double) ((float) event.y + 0.5F), (double) ((float) event.z + 0.5F), "random.orb", 0.2F, 0.7F + event.world.rand.nextFloat() * 0.2F);
|
||||
event.world.playSoundEffect(
|
||||
(double) ((float) event.x + 0.5F),
|
||||
(double) ((float) event.y + 0.5F),
|
||||
(double) ((float) event.z + 0.5F),
|
||||
"random.orb",
|
||||
0.2F,
|
||||
0.7F + event.world.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -321,11 +382,12 @@ public class FMEventHandler {
|
||||
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 && isGarbage(drop))
|
||||
event.drops.remove(x);
|
||||
if (drop != null && isGarbage(drop)) event.drops.remove(x);
|
||||
}
|
||||
}
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.corrupting.effectId, equip) > 0 && event.block == Block.getBlockFromItem(Config.thaumcraftOre.getItem()) && randy.nextInt(3) == 1) {
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.corrupting.effectId, equip) > 0
|
||||
&& event.block == Block.getBlockFromItem(Config.thaumcraftOre.getItem())
|
||||
&& randy.nextInt(3) == 1) {
|
||||
ArrayList<ItemStack> moarDrops = new ArrayList<ItemStack>();
|
||||
ArrayList<ItemStack> deadDrops = new ArrayList<ItemStack>();
|
||||
Iterator current = event.drops.iterator();
|
||||
@@ -348,9 +410,9 @@ public class FMEventHandler {
|
||||
event.drops.add((ItemStack) (current.next()));
|
||||
}
|
||||
}
|
||||
if(player.worldObj.provider.dimensionId == -1 && event.block == Blocks.quartz_ore){
|
||||
if (player.worldObj.provider.dimensionId == -1 && event.block == Blocks.quartz_ore) {
|
||||
int fortune = EnchantmentHelper.getFortuneModifier(player);
|
||||
if(fortune > 0 && randy.nextInt(60) <= fortune){
|
||||
if (fortune > 0 && randy.nextInt(60) <= fortune) {
|
||||
event.drops.add(new ItemStack(ForbiddenItems.deadlyShards, 1, 6));
|
||||
}
|
||||
}
|
||||
@@ -358,30 +420,31 @@ public class FMEventHandler {
|
||||
}
|
||||
|
||||
private boolean isGarbage(ItemStack drop) {
|
||||
for(int id : OreDictionary.getOreIDs(drop)) {
|
||||
for(String ore : Config.trash) {
|
||||
if(OreDictionary.getOreName(id).equals(ore))
|
||||
return true;
|
||||
for (int id : OreDictionary.getOreIDs(drop)) {
|
||||
for (String ore : Config.trash) {
|
||||
if (OreDictionary.getOreName(id).equals(ore)) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEat(PlayerUseItemEvent.Finish event){
|
||||
if(event.entityPlayer.worldObj.isRemote)
|
||||
return;
|
||||
if(event.item.getItem() instanceof ItemFood){
|
||||
if(event.entityPlayer.worldObj.provider.dimensionId == -1 && event.item.getItem() != ForbiddenItems.gluttonyShard
|
||||
&& randy.nextInt(10) < 2){
|
||||
EntityItem ent = event.entityPlayer.entityDropItem(new ItemStack(ForbiddenItems.gluttonyShard, 1), 1.0F);
|
||||
public void onEat(PlayerUseItemEvent.Finish event) {
|
||||
if (event.entityPlayer.worldObj.isRemote) return;
|
||||
if (event.item.getItem() instanceof ItemFood) {
|
||||
if (event.entityPlayer.worldObj.provider.dimensionId == -1
|
||||
&& event.item.getItem() != ForbiddenItems.gluttonyShard
|
||||
&& randy.nextInt(10) < 2) {
|
||||
EntityItem ent =
|
||||
event.entityPlayer.entityDropItem(new ItemStack(ForbiddenItems.gluttonyShard, 1), 1.0F);
|
||||
ent.motionY += randy.nextFloat() * 0.05F;
|
||||
ent.motionX += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
ent.motionZ += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
}
|
||||
ItemStack ring = BaublesApi.getBaubles(event.entityPlayer).getStackInSlot(1);
|
||||
ItemStack ring2 = BaublesApi.getBaubles(event.entityPlayer).getStackInSlot(2);
|
||||
if((ring != null && ring.getItem() == ForbiddenItems.ringFood) || (ring2 != null && ring2.getItem() == ForbiddenItems.ringFood)){
|
||||
if ((ring != null && ring.getItem() == ForbiddenItems.ringFood)
|
||||
|| (ring2 != null && ring2.getItem() == ForbiddenItems.ringFood)) {
|
||||
event.entityPlayer.getFoodStats().addStats(2, 2.0F);
|
||||
}
|
||||
}
|
||||
@@ -390,43 +453,46 @@ public class FMEventHandler {
|
||||
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);
|
||||
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;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onSpawn(LivingSpawnEvent event) {
|
||||
if (event.entityLiving.worldObj.provider.dimensionId == -1 && event.entityLiving instanceof EntityPigZombie && randy.nextInt(175) == 1)
|
||||
if (event.entityLiving.worldObj.provider.dimensionId == -1
|
||||
&& event.entityLiving instanceof EntityPigZombie
|
||||
&& randy.nextInt(175) == 1)
|
||||
event.entityLiving.setCurrentItemOrArmor(0, new ItemStack(ForbiddenItems.deadlyShards, 1, 1));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onGetHurt(LivingHurtEvent event) {
|
||||
if (event.entityLiving instanceof EntityPlayer && ((EntityPlayer) event.entityLiving).getCurrentEquippedItem() != null && ((EntityPlayer) event.entityLiving).getCurrentEquippedItem().getItem() instanceof ItemWandCasting) {
|
||||
if (event.entityLiving instanceof EntityPlayer
|
||||
&& ((EntityPlayer) event.entityLiving).getCurrentEquippedItem() != null
|
||||
&& ((EntityPlayer) event.entityLiving).getCurrentEquippedItem().getItem() instanceof ItemWandCasting) {
|
||||
|
||||
ItemStack wand = ((EntityPlayer) event.entityLiving).getCurrentEquippedItem();
|
||||
if (event.source.getDamageType().equals("taint") && ((ItemWandCasting) wand.getItem()).getRod(wand).getTag().equals("tainted")) {
|
||||
if (event.source.getDamageType().equals("taint")
|
||||
&& ((ItemWandCasting) wand.getItem()).getRod(wand).getTag().equals("tainted")) {
|
||||
|
||||
for (int x = 0; x < 3; x++) {
|
||||
((ItemWandCasting) wand.getItem()).addVis(wand, primals[randy.nextInt(6)], 1, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ((event.source.getDamageType().equals("wither") || event.source.isFireDamage()) && ((ItemWandCasting) wand.getItem()).getRod(wand).getTag().equals("infernal")) {
|
||||
if ((event.source.getDamageType().equals("wither") || event.source.isFireDamage())
|
||||
&& ((ItemWandCasting) wand.getItem()).getRod(wand).getTag().equals("infernal")) {
|
||||
|
||||
event.setCanceled(true);
|
||||
}
|
||||
@@ -435,7 +501,11 @@ public class FMEventHandler {
|
||||
if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
|
||||
ItemStack equip = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
|
||||
if (equip != null && equip.getItem() instanceof ItemWandCasting) {
|
||||
if (((ItemWandCasting) equip.getItem()).getCap(equip).getTag().equals("alchemical") && ((ItemWandCasting) equip.getItem()).getRod(equip).getTag().startsWith("blood")) {
|
||||
if (((ItemWandCasting) equip.getItem()).getCap(equip).getTag().equals("alchemical")
|
||||
&& ((ItemWandCasting) equip.getItem())
|
||||
.getRod(equip)
|
||||
.getTag()
|
||||
.startsWith("blood")) {
|
||||
event.entityLiving.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
|
||||
}
|
||||
}
|
||||
@@ -443,28 +513,28 @@ public class FMEventHandler {
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onFeelPain(LivingHurtEvent event){
|
||||
if(!Config.noLust && event.ammount > 0 && event.entityLiving instanceof EntityPlayer){
|
||||
EntityPlayer player = (EntityPlayer)event.entityLiving;
|
||||
public void onFeelPain(LivingHurtEvent event) {
|
||||
if (!Config.noLust && event.ammount > 0 && event.entityLiving instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
ItemStack amulet = BaublesApi.getBaubles(player).getStackInSlot(0);
|
||||
if(amulet != null && amulet.getItem() == ForbiddenItems.subCollar){
|
||||
int doses = 3 * (int)event.ammount;
|
||||
if(event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer){
|
||||
EntityPlayer dom = (EntityPlayer)event.source.getEntity();
|
||||
if (amulet != null && amulet.getItem() == ForbiddenItems.subCollar) {
|
||||
int doses = 3 * (int) event.ammount;
|
||||
if (event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
|
||||
EntityPlayer dom = (EntityPlayer) event.source.getEntity();
|
||||
int chance = 1;
|
||||
if(dom.getHeldItem() != null && dom.getHeldItem().getItem() instanceof ItemRidingCrop) {
|
||||
if (dom.getHeldItem() != null && dom.getHeldItem().getItem() instanceof ItemRidingCrop) {
|
||||
doses += 3;
|
||||
chance += 3;
|
||||
}
|
||||
if(player.worldObj.provider.dimensionId == -1 && randy.nextInt(30) < chance){
|
||||
if (player.worldObj.provider.dimensionId == -1 && randy.nextInt(30) < chance) {
|
||||
EntityItem ent = player.entityDropItem(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), 1.0F);
|
||||
ent.motionY += player.worldObj.rand.nextFloat() * 0.05F;
|
||||
ent.motionX += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F;
|
||||
ent.motionZ += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F;
|
||||
}
|
||||
}
|
||||
for(int x = 0;x < doses; x++){
|
||||
((ItemSubCollar)ForbiddenItems.subCollar).addVis(amulet, primals[randy.nextInt(6)], 1, true);
|
||||
for (int x = 0; x < doses; x++) {
|
||||
((ItemSubCollar) ForbiddenItems.subCollar).addVis(amulet, primals[randy.nextInt(6)], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -473,58 +543,66 @@ public class FMEventHandler {
|
||||
@SubscribeEvent
|
||||
public void onTooltip(ItemTooltipEvent event) {
|
||||
if (event.itemStack.getItem() instanceof ItemWandCasting) {
|
||||
if (((ItemWandCasting) event.itemStack.getItem()).getRod(event.itemStack).getTag().startsWith("blood") && !event.itemStack.stackTagCompound.getString("ownerName").equals("")) {
|
||||
event.toolTip.add(StatCollector.translateToLocal("tooltip.currentowner") + " " + event.itemStack.stackTagCompound.getString("ownerName"));
|
||||
} else if (((ItemWandCasting) event.itemStack.getItem()).getRod(event.itemStack).getTag().startsWith("neutronium")) {
|
||||
if (((ItemWandCasting) event.itemStack.getItem())
|
||||
.getRod(event.itemStack)
|
||||
.getTag()
|
||||
.startsWith("blood")
|
||||
&& !event.itemStack.stackTagCompound.getString("ownerName").equals("")) {
|
||||
event.toolTip.add(StatCollector.translateToLocal("tooltip.currentowner") + " "
|
||||
+ event.itemStack.stackTagCompound.getString("ownerName"));
|
||||
} else if (((ItemWandCasting) event.itemStack.getItem())
|
||||
.getRod(event.itemStack)
|
||||
.getTag()
|
||||
.startsWith("neutronium")) {
|
||||
event.toolTip.add(StatCollector.translateToLocal("tooltip.creativeonly"));
|
||||
} else if (((ItemWandCasting) event.itemStack.getItem()).getRod(event.itemStack).getTag().startsWith("profane")) {
|
||||
event.toolTip.add("Contract: " + event.itemStack.getTagCompound().getInteger("contract"));
|
||||
} else if (((ItemWandCasting) event.itemStack.getItem())
|
||||
.getRod(event.itemStack)
|
||||
.getTag()
|
||||
.startsWith("profane")) {
|
||||
event.toolTip.add(
|
||||
"Contract: " + event.itemStack.getTagCompound().getInteger("contract"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityUpdate(LivingUpdateEvent event){
|
||||
if(Compat.bm && event.entityLiving != null && event.entityLiving instanceof EntityPlayer && !event.entityLiving.worldObj.isRemote){
|
||||
EntityPlayer player = (EntityPlayer)event.entityLiving;
|
||||
public void onEntityUpdate(LivingUpdateEvent event) {
|
||||
if (Compat.bm
|
||||
&& event.entityLiving != null
|
||||
&& event.entityLiving instanceof EntityPlayer
|
||||
&& !event.entityLiving.worldObj.isRemote) {
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
String name = player.getDisplayName();
|
||||
if(player.isPotionActive(DarkPotions.bloodSeal)){
|
||||
if (player.isPotionActive(DarkPotions.bloodSeal)) {
|
||||
try {
|
||||
if (lastLP.containsKey(name)) {
|
||||
if (SoulNetworkHandler.getCurrentEssence(name) > lastLP.get(name))
|
||||
SoulNetworkHandler.setCurrentEssence(name, lastLP.get(name));
|
||||
else
|
||||
lastLP.put(name, SoulNetworkHandler.getCurrentEssence(name));
|
||||
}
|
||||
else
|
||||
lastLP.put(name, SoulNetworkHandler.getCurrentEssence(name));
|
||||
}
|
||||
catch(Throwable e){
|
||||
else lastLP.put(name, SoulNetworkHandler.getCurrentEssence(name));
|
||||
} else lastLP.put(name, SoulNetworkHandler.getCurrentEssence(name));
|
||||
} catch (Throwable e) {
|
||||
Compat.bm = false;
|
||||
}
|
||||
}
|
||||
else if(lastLP.containsKey(name))
|
||||
lastLP.remove(name);
|
||||
} else if (lastLP.containsKey(name)) lastLP.remove(name);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onCrafting(ItemCraftedEvent event) {
|
||||
if(event.crafting.getItem() == ForbiddenItems.primewell) {
|
||||
for(int x = 0; x < 9; ++x) {
|
||||
if (event.crafting.getItem() == ForbiddenItems.primewell) {
|
||||
for (int x = 0; x < 9; ++x) {
|
||||
ItemStack item = event.craftMatrix.getStackInSlot(x);
|
||||
if(item != null && item.getItem() == ConfigItems.itemEldritchObject) {
|
||||
if (item != null && item.getItem() == ConfigItems.itemEldritchObject) {
|
||||
++item.stackSize;
|
||||
event.craftMatrix.setInventorySlotContents(x, item);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Compat.bm && event.crafting.getItem() == ForbiddenItems.bloodOrb){
|
||||
if (Compat.bm && event.crafting.getItem() == ForbiddenItems.bloodOrb) {
|
||||
EntityItem ent = event.player.entityDropItem(new ItemStack(ConfigItems.itemEldritchObject, 1, 3), 0);
|
||||
ent.motionY += randy.nextFloat() * 0.05F;
|
||||
ent.motionX += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
ent.motionZ += (randy.nextFloat() - randy.nextFloat()) * 0.1F;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,20 +1,6 @@
|
||||
package fox.spiteful.forbidden;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry;
|
||||
import fox.spiteful.forbidden.potions.DarkPotions;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import thaumcraft.api.wands.WandTriggerRegistry;
|
||||
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
@@ -22,22 +8,40 @@ import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry;
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import fox.spiteful.forbidden.potions.DarkPotions;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import thaumcraft.api.wands.WandTriggerRegistry;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@Mod(modid = "ForbiddenMagic", name = "Forbidden Magic", version = "GRADLETOKEN_VERSION", dependencies = "required-after:Thaumcraft@[4.2.2.0,);after:ThaumicTinkerer;after:AWWayofTime;after:Botania")
|
||||
@Mod(
|
||||
modid = "ForbiddenMagic",
|
||||
name = "Forbidden Magic",
|
||||
version = "GRADLETOKEN_VERSION",
|
||||
dependencies = "required-after:Thaumcraft@[4.2.2.0,);after:ThaumicTinkerer;after:AWWayofTime;after:Botania")
|
||||
public class Forbidden {
|
||||
@Instance("ForbiddenMagic")
|
||||
public static Forbidden instance;
|
||||
public static CreativeTabs tab = new CreativeTabs("forbidden"){
|
||||
|
||||
public static CreativeTabs tab = new CreativeTabs("forbidden") {
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return ForbiddenItems.fork;
|
||||
}
|
||||
};
|
||||
public static CreativeTabs crysTab;
|
||||
@SidedProxy(clientSide = "fox.spiteful.forbidden.client.ClientProxy", serverSide = "fox.spiteful.forbidden.CommonProxy")
|
||||
|
||||
@SidedProxy(
|
||||
clientSide = "fox.spiteful.forbidden.client.ClientProxy",
|
||||
serverSide = "fox.spiteful.forbidden.CommonProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
public static WandOverlord wandLord;
|
||||
public static FMEventHandler events;
|
||||
|
||||
@@ -46,7 +50,7 @@ public class Forbidden {
|
||||
instance = this;
|
||||
Config.configurate(event.getSuggestedConfigurationFile());
|
||||
if (Config.wrathCage)
|
||||
crysTab = new CreativeTabs("mobcrystal"){
|
||||
crysTab = new CreativeTabs("mobcrystal") {
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return ForbiddenItems.mobCrystal;
|
||||
@@ -58,8 +62,7 @@ public class Forbidden {
|
||||
ForbiddenItems.addItems();
|
||||
ForbiddenBlocks.addBlocks();
|
||||
DarkEnchantments.hex();
|
||||
if(Compat.bm)
|
||||
DarkPotions.alchemize();
|
||||
if (Compat.bm) DarkPotions.alchemize();
|
||||
proxy.registerRenderInfo();
|
||||
}
|
||||
|
||||
@@ -83,4 +86,4 @@ public class Forbidden {
|
||||
WandTriggerRegistry.registerWandBlockTrigger(wandLord, 1, Blocks.obsidian, 0);
|
||||
WandTriggerRegistry.registerWandBlockTrigger(wandLord, 1, Blocks.netherrack, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
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 fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import java.util.Random;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -15,97 +15,615 @@ import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.crafting.InfusionEnchantmentRecipe;
|
||||
import thaumcraft.api.wands.WandCap;
|
||||
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
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), new ItemStack(ConfigItems.itemResource, 1, 6), 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), new ItemStack(ForbiddenItems.deadlyShards, 1, 2), 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("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)}));
|
||||
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),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 6),
|
||||
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),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 2),
|
||||
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(
|
||||
"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(
|
||||
"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)
|
||||
ForbiddenResearch.recipes.put("SubCollar", ThaumcraftApi.addInfusionCraftingRecipe("SUBCOLLAR", new ItemStack(ForbiddenItems.subCollar), 1, (new AspectList()).add(DarkAspects.LUST, 8).add(Aspect.TRAP, 8).add(DarkAspects.NETHER, 4).add(Aspect.FLESH, 4), new ItemStack(ConfigItems.itemAmuletVis, 1, 1), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 4), new ItemStack(ForbiddenItems.deadlyShards, 1, 4), new ItemStack(ForbiddenItems.deadlyShards, 1, 4), new ItemStack(Items.lead, 1), new ItemStack(ConfigItems.itemBaubleBlanks, 1, 2) }));
|
||||
if(Config.gluttony == 0) {
|
||||
ForbiddenResearch.recipes.put("ArcaneCake", ThaumcraftApi.addInfusionCraftingRecipe("ARCANECAKE", new ItemStack(ForbiddenItems.arcaneCakeItem), 3, (new AspectList()).add(DarkAspects.GLUTTONY, 12).add(Aspect.HUNGER, 24).add(Aspect.CRAFT, 24), new ItemStack(Items.cake), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(Items.egg), new ItemStack(Items.milk_bucket), new ItemStack(Items.egg), new ItemStack(ForbiddenItems.gluttonyShard), new ItemStack(ForbiddenItems.gluttonyShard)}));
|
||||
ForbiddenResearch.recipes.put("RingFood", ThaumcraftApi.addArcaneCraftingRecipe("RINGFOOD", new ItemStack(ForbiddenItems.ringFood), (new AspectList()).add(Aspect.ENTROPY, 10).add(Aspect.WATER, 20).add(Aspect.EARTH, 20), new Object[]{" D ", "SXS", " S ", Character.valueOf('S'), new ItemStack(ForbiddenItems.gluttonyShard, 1), Character.valueOf('X'), new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), Character.valueOf('D'), new ItemStack(Items.diamond)}));
|
||||
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)
|
||||
ForbiddenResearch.recipes.put(
|
||||
"SubCollar",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"SUBCOLLAR",
|
||||
new ItemStack(ForbiddenItems.subCollar),
|
||||
1,
|
||||
(new AspectList())
|
||||
.add(DarkAspects.LUST, 8)
|
||||
.add(Aspect.TRAP, 8)
|
||||
.add(DarkAspects.NETHER, 4)
|
||||
.add(Aspect.FLESH, 4),
|
||||
new ItemStack(ConfigItems.itemAmuletVis, 1, 1),
|
||||
new ItemStack[] {
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 4),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 4),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 4),
|
||||
new ItemStack(Items.lead, 1),
|
||||
new ItemStack(ConfigItems.itemBaubleBlanks, 1, 2)
|
||||
}));
|
||||
if (Config.gluttony == 0) {
|
||||
ForbiddenResearch.recipes.put(
|
||||
"ArcaneCake",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"ARCANECAKE",
|
||||
new ItemStack(ForbiddenItems.arcaneCakeItem),
|
||||
3,
|
||||
(new AspectList())
|
||||
.add(DarkAspects.GLUTTONY, 12)
|
||||
.add(Aspect.HUNGER, 24)
|
||||
.add(Aspect.CRAFT, 24),
|
||||
new ItemStack(Items.cake),
|
||||
new ItemStack[] {
|
||||
ItemApi.getItem("itemResource", 14),
|
||||
new ItemStack(Items.egg),
|
||||
new ItemStack(Items.milk_bucket),
|
||||
new ItemStack(Items.egg),
|
||||
new ItemStack(ForbiddenItems.gluttonyShard),
|
||||
new ItemStack(ForbiddenItems.gluttonyShard)
|
||||
}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"RingFood",
|
||||
ThaumcraftApi.addArcaneCraftingRecipe(
|
||||
"RINGFOOD",
|
||||
new ItemStack(ForbiddenItems.ringFood),
|
||||
(new AspectList())
|
||||
.add(Aspect.ENTROPY, 10)
|
||||
.add(Aspect.WATER, 20)
|
||||
.add(Aspect.EARTH, 20),
|
||||
new Object[] {
|
||||
" D ",
|
||||
"SXS",
|
||||
" S ",
|
||||
Character.valueOf('S'),
|
||||
new ItemStack(ForbiddenItems.gluttonyShard, 1),
|
||||
Character.valueOf('X'),
|
||||
new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1),
|
||||
Character.valueOf('D'),
|
||||
new ItemStack(Items.diamond)
|
||||
}));
|
||||
} else if (Config.gluttony == 2) {
|
||||
ForbiddenResearch.recipes.put(
|
||||
"ArcaneCake",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"ARCANECAKE",
|
||||
new ItemStack(ForbiddenItems.arcaneCakeItem),
|
||||
3,
|
||||
(new AspectList())
|
||||
.add(DarkAspects.GLUTTONY, 12)
|
||||
.add(Aspect.HUNGER, 24)
|
||||
.add(Aspect.CRAFT, 24),
|
||||
new ItemStack(Items.cake),
|
||||
new ItemStack[] {
|
||||
ItemApi.getItem("itemResource", 14),
|
||||
new ItemStack(ForbiddenBlocks.starBlock),
|
||||
new ItemStack(ForbiddenBlocks.starBlock),
|
||||
new ItemStack(Items.egg),
|
||||
new ItemStack(ForbiddenItems.gluttonyShard),
|
||||
new ItemStack(ForbiddenItems.gluttonyShard)
|
||||
}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"RingFood",
|
||||
ThaumcraftApi.addArcaneCraftingRecipe(
|
||||
"RINGFOOD",
|
||||
new ItemStack(ForbiddenItems.ringFood),
|
||||
(new AspectList())
|
||||
.add(Aspect.ENTROPY, 10)
|
||||
.add(Aspect.WATER, 20)
|
||||
.add(Aspect.EARTH, 20),
|
||||
new Object[] {
|
||||
" D ",
|
||||
"SXS",
|
||||
" S ",
|
||||
Character.valueOf('S'),
|
||||
new ItemStack(ForbiddenItems.gluttonyShard, 1),
|
||||
Character.valueOf('X'),
|
||||
new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1),
|
||||
Character.valueOf('D'),
|
||||
new ItemStack(ForbiddenBlocks.starBlock)
|
||||
}));
|
||||
}
|
||||
else if(Config.gluttony == 2){
|
||||
ForbiddenResearch.recipes.put("ArcaneCake", ThaumcraftApi.addInfusionCraftingRecipe("ARCANECAKE", new ItemStack(ForbiddenItems.arcaneCakeItem), 3, (new AspectList()).add(DarkAspects.GLUTTONY, 12).add(Aspect.HUNGER, 24).add(Aspect.CRAFT, 24), new ItemStack(Items.cake), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenBlocks.starBlock), new ItemStack(ForbiddenBlocks.starBlock), new ItemStack(Items.egg), new ItemStack(ForbiddenItems.gluttonyShard), new ItemStack(ForbiddenItems.gluttonyShard)}));
|
||||
ForbiddenResearch.recipes.put("RingFood", ThaumcraftApi.addArcaneCraftingRecipe("RINGFOOD", new ItemStack(ForbiddenItems.ringFood), (new AspectList()).add(Aspect.ENTROPY, 10).add(Aspect.WATER, 20).add(Aspect.EARTH, 20), new Object[]{" D ", "SXS", " S ", Character.valueOf('S'), new ItemStack(ForbiddenItems.gluttonyShard, 1), Character.valueOf('X'), new ItemStack(ConfigItems.itemBaubleBlanks, 1, 1), Character.valueOf('D'), new ItemStack(ForbiddenBlocks.starBlock)}));
|
||||
}
|
||||
ForbiddenResearch.recipes.put("FocusBlink", ThaumcraftApi.addInfusionCraftingRecipe("FOCUSBLINK", new ItemStack(ForbiddenItems.blinkFocus), 3, (new AspectList()).add(Aspect.TRAVEL, 25).add(DarkAspects.NETHER, 10).add(DarkAspects.SLOTH, 10).add(Aspect.ENTROPY, 25), new ItemStack(Items.ender_pearl), new ItemStack[]{new ItemStack(Items.quartz), new ItemStack(ForbiddenItems.deadlyShards, 1, 5), new ItemStack(Items.quartz), new ItemStack(ForbiddenItems.deadlyShards, 1, 5), new ItemStack(Items.quartz), new ItemStack(ForbiddenItems.deadlyShards, 1, 5)}));
|
||||
ForbiddenResearch.recipes.put("MorphPick", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphPickaxe), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemPickThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) }));
|
||||
ForbiddenResearch.recipes.put("MorphSword", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphSword), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.WEAPON, 16), ItemApi.getItem("itemSwordThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) }));
|
||||
ForbiddenResearch.recipes.put("MorphShovel", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphShovel), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemShovelThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) }));
|
||||
ForbiddenResearch.recipes.put("MorphAxe", ThaumcraftApi.addInfusionCraftingRecipe("MORPHTOOLS", new ItemStack(ForbiddenItems.morphAxe), 6, (new AspectList()).add(Aspect.EXCHANGE, 32).add(DarkAspects.ENVY, 16).add(Aspect.TOOL, 16), ItemApi.getItem("itemAxeThaumium", 0), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(ForbiddenItems.deadlyShards, 1, 1), new ItemStack(Items.diamond), ItemApi.getItem("itemResource", 3), ItemApi.getBlock("blockMagicalLog", 1) }));
|
||||
ForbiddenResearch.recipes.put("WandRodInfernal", ThaumcraftApi.addInfusionCraftingRecipe("ROD_infernal", new ItemStack(ForbiddenItems.wandCore, 1, 1), 5, (new AspectList()).add(DarkAspects.NETHER, 32).add(Aspect.MAGIC, 12).add(DarkAspects.PRIDE, 12), new ItemStack(Items.blaze_rod), new ItemStack[] { ItemApi.getItem("itemResource", 14), new ItemStack(ForbiddenItems.deadlyShards, 1, 3), new ItemStack(ForbiddenItems.deadlyShards, 1, 3), new ItemStack(Blocks.soul_sand), new ItemStack(Items.skull, 1, 1), new ItemStack(Items.quartz), new ItemStack(Items.blaze_powder) }));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"FocusBlink",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"FOCUSBLINK",
|
||||
new ItemStack(ForbiddenItems.blinkFocus),
|
||||
3,
|
||||
(new AspectList())
|
||||
.add(Aspect.TRAVEL, 25)
|
||||
.add(DarkAspects.NETHER, 10)
|
||||
.add(DarkAspects.SLOTH, 10)
|
||||
.add(Aspect.ENTROPY, 25),
|
||||
new ItemStack(Items.ender_pearl),
|
||||
new ItemStack[] {
|
||||
new ItemStack(Items.quartz),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 5),
|
||||
new ItemStack(Items.quartz),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 5),
|
||||
new ItemStack(Items.quartz),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 5)
|
||||
}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"MorphPick",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"MORPHTOOLS",
|
||||
new ItemStack(ForbiddenItems.morphPickaxe),
|
||||
6,
|
||||
(new AspectList())
|
||||
.add(Aspect.EXCHANGE, 32)
|
||||
.add(DarkAspects.ENVY, 16)
|
||||
.add(Aspect.TOOL, 16),
|
||||
ItemApi.getItem("itemPickThaumium", 0),
|
||||
new ItemStack[] {
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 1),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 1),
|
||||
new ItemStack(Items.diamond),
|
||||
ItemApi.getItem("itemResource", 3),
|
||||
ItemApi.getBlock("blockMagicalLog", 1)
|
||||
}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"MorphSword",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"MORPHTOOLS",
|
||||
new ItemStack(ForbiddenItems.morphSword),
|
||||
6,
|
||||
(new AspectList())
|
||||
.add(Aspect.EXCHANGE, 32)
|
||||
.add(DarkAspects.ENVY, 16)
|
||||
.add(Aspect.WEAPON, 16),
|
||||
ItemApi.getItem("itemSwordThaumium", 0),
|
||||
new ItemStack[] {
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 1),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 1),
|
||||
new ItemStack(Items.diamond),
|
||||
ItemApi.getItem("itemResource", 3),
|
||||
ItemApi.getBlock("blockMagicalLog", 1)
|
||||
}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"MorphShovel",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"MORPHTOOLS",
|
||||
new ItemStack(ForbiddenItems.morphShovel),
|
||||
6,
|
||||
(new AspectList())
|
||||
.add(Aspect.EXCHANGE, 32)
|
||||
.add(DarkAspects.ENVY, 16)
|
||||
.add(Aspect.TOOL, 16),
|
||||
ItemApi.getItem("itemShovelThaumium", 0),
|
||||
new ItemStack[] {
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 1),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 1),
|
||||
new ItemStack(Items.diamond),
|
||||
ItemApi.getItem("itemResource", 3),
|
||||
ItemApi.getBlock("blockMagicalLog", 1)
|
||||
}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"MorphAxe",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"MORPHTOOLS",
|
||||
new ItemStack(ForbiddenItems.morphAxe),
|
||||
6,
|
||||
(new AspectList())
|
||||
.add(Aspect.EXCHANGE, 32)
|
||||
.add(DarkAspects.ENVY, 16)
|
||||
.add(Aspect.TOOL, 16),
|
||||
ItemApi.getItem("itemAxeThaumium", 0),
|
||||
new ItemStack[] {
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 1),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 1),
|
||||
new ItemStack(Items.diamond),
|
||||
ItemApi.getItem("itemResource", 3),
|
||||
ItemApi.getBlock("blockMagicalLog", 1)
|
||||
}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"WandRodInfernal",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"ROD_infernal",
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 1),
|
||||
5,
|
||||
(new AspectList())
|
||||
.add(DarkAspects.NETHER, 32)
|
||||
.add(Aspect.MAGIC, 12)
|
||||
.add(DarkAspects.PRIDE, 12),
|
||||
new ItemStack(Items.blaze_rod),
|
||||
new ItemStack[] {
|
||||
ItemApi.getItem("itemResource", 14),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 3),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 3),
|
||||
new ItemStack(Blocks.soul_sand),
|
||||
new ItemStack(Items.skull, 1, 1),
|
||||
new ItemStack(Items.quartz),
|
||||
new ItemStack(Items.blaze_powder)
|
||||
}));
|
||||
if (Config.wrathCage) {
|
||||
ForbiddenResearch.recipes.put("WrathCage", ThaumcraftApi.addInfusionCraftingRecipe("WRATHCAGE", new ItemStack(ForbiddenBlocks.wrathCage, 1, 0), 10, (new AspectList()).add(DarkAspects.WRATH, 32).add(Aspect.MAGIC, 32).add(Aspect.BEAST, 32).add(Aspect.MECHANISM, 16), ItemApi.getBlock("blockCosmeticSolid", 4), new ItemStack[] { new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(Items.diamond, 1, 0), new ItemStack(Items.diamond, 1, 0), new ItemStack(Items.diamond, 1, 0), new ItemStack(Items.diamond, 1, 0), ItemApi.getBlock("blockJar", 0), ItemApi.getBlock("blockJar", 0), ItemApi.getBlock("blockJar", 0) }));
|
||||
ForbiddenResearch.recipes.put("MobCrystal", ThaumcraftApi.addCrucibleRecipe("WRATHCAGE", new ItemStack(ForbiddenItems.mobCrystal, 1, 0), new ItemStack(Items.diamond, 1), (new AspectList()).merge(Aspect.MIND, 10).merge(Aspect.ENERGY, 10)));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"WrathCage",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"WRATHCAGE",
|
||||
new ItemStack(ForbiddenBlocks.wrathCage, 1, 0),
|
||||
10,
|
||||
(new AspectList())
|
||||
.add(DarkAspects.WRATH, 32)
|
||||
.add(Aspect.MAGIC, 32)
|
||||
.add(Aspect.BEAST, 32)
|
||||
.add(Aspect.MECHANISM, 16),
|
||||
ItemApi.getBlock("blockCosmeticSolid", 4),
|
||||
new ItemStack[] {
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0),
|
||||
new ItemStack(Items.diamond, 1, 0),
|
||||
new ItemStack(Items.diamond, 1, 0),
|
||||
new ItemStack(Items.diamond, 1, 0),
|
||||
new ItemStack(Items.diamond, 1, 0),
|
||||
ItemApi.getBlock("blockJar", 0),
|
||||
ItemApi.getBlock("blockJar", 0),
|
||||
ItemApi.getBlock("blockJar", 0)
|
||||
}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"MobCrystal",
|
||||
ThaumcraftApi.addCrucibleRecipe(
|
||||
"WRATHCAGE",
|
||||
new ItemStack(ForbiddenItems.mobCrystal, 1, 0),
|
||||
new ItemStack(Items.diamond, 1),
|
||||
(new AspectList()).merge(Aspect.MIND, 10).merge(Aspect.ENERGY, 10)));
|
||||
}
|
||||
|
||||
ForbiddenResearch.recipes.put("Fork", ThaumcraftApi.addInfusionCraftingRecipe("FORK", new ItemStack(ForbiddenItems.fork, 1, 0), 1, (new AspectList()).add(DarkAspects.NETHER, 8).add(Aspect.MECHANISM, 8).add(Aspect.ENERGY, 8), ItemApi.getItem("itemSwordThaumium", 0), new ItemStack[] { new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.quartz), new ItemStack(Items.redstone) }));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"Fork",
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"FORK",
|
||||
new ItemStack(ForbiddenItems.fork, 1, 0),
|
||||
1,
|
||||
(new AspectList())
|
||||
.add(DarkAspects.NETHER, 8)
|
||||
.add(Aspect.MECHANISM, 8)
|
||||
.add(Aspect.ENERGY, 8),
|
||||
ItemApi.getItem("itemSwordThaumium", 0),
|
||||
new ItemStack[] {
|
||||
new ItemStack(Items.quartz),
|
||||
new ItemStack(Items.quartz),
|
||||
new ItemStack(Items.quartz),
|
||||
new ItemStack(Items.redstone)
|
||||
}));
|
||||
|
||||
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(
|
||||
"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)
|
||||
}));
|
||||
|
||||
if(thaumcraft.common.config.Config.researchDifficulty == -1)
|
||||
ForbiddenResearch.recipes.put("Crystalwell", ThaumcraftApi.addShapelessArcaneCraftingRecipe("CRYSTALWELL", new ItemStack(ForbiddenItems.crystalwell, 1, 0), (new AspectList()).add(Aspect.WATER, 1).add(Aspect.ORDER, 1), new Object[] { new ItemStack(ConfigItems.itemInkwell, 1, 32767), "dyeBlack", new ItemStack(ConfigItems.itemShard, 1, 6), new ItemStack(ConfigItems.itemShard, 1, 6) }));
|
||||
if (thaumcraft.common.config.Config.researchDifficulty == -1)
|
||||
ForbiddenResearch.recipes.put(
|
||||
"Crystalwell",
|
||||
ThaumcraftApi.addShapelessArcaneCraftingRecipe(
|
||||
"CRYSTALWELL",
|
||||
new ItemStack(ForbiddenItems.crystalwell, 1, 0),
|
||||
(new AspectList()).add(Aspect.WATER, 1).add(Aspect.ORDER, 1),
|
||||
new Object[] {
|
||||
new ItemStack(ConfigItems.itemInkwell, 1, 32767),
|
||||
"dyeBlack",
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6)
|
||||
}));
|
||||
else
|
||||
ForbiddenResearch.recipes.put("Crystalwell", ThaumcraftApi.addShapelessArcaneCraftingRecipe("CRYSTALWELL", new ItemStack(ForbiddenItems.crystalwell, 1, 0), (new AspectList()).add(Aspect.WATER, 1).add(Aspect.ORDER, 1), new Object[] { new ItemStack(ConfigItems.itemInkwell, 1, 32767), "dyeBlack", new ItemStack(ConfigBlocks.blockCrystal, 1, 6), new ItemStack(ConfigItems.itemShard, 1, 6), new ItemStack(ConfigItems.itemShard, 1, 6), new ItemStack(ConfigItems.itemShard, 1, 6) }));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"Crystalwell",
|
||||
ThaumcraftApi.addShapelessArcaneCraftingRecipe(
|
||||
"CRYSTALWELL",
|
||||
new ItemStack(ForbiddenItems.crystalwell, 1, 0),
|
||||
(new AspectList()).add(Aspect.WATER, 1).add(Aspect.ORDER, 1),
|
||||
new Object[] {
|
||||
new ItemStack(ConfigItems.itemInkwell, 1, 32767),
|
||||
"dyeBlack",
|
||||
new ItemStack(ConfigBlocks.blockCrystal, 1, 6),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6)
|
||||
}));
|
||||
|
||||
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) }));
|
||||
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)
|
||||
}));
|
||||
|
||||
if(Config.enchanting) {
|
||||
if (Config.enchanting) {
|
||||
if (Config.greedyEnch)
|
||||
ForbiddenResearch.recipes.put("Greedy", ThaumcraftApi.addInfusionEnchantmentRecipe("GREEDY", DarkEnchantments.greedy, 4, (new AspectList()).add(DarkAspects.NETHER, 16).add(Aspect.WEAPON, 8).add(Aspect.GREED, 16), new ItemStack[]{new ItemStack(Items.golden_sword), new ItemStack(Items.diamond), new ItemStack(ForbiddenItems.deadlyShards, 1, 6), new ItemStack(ForbiddenItems.deadlyShards, 1, 6), new ItemStack(ConfigItems.itemResource, 1, 14)}));
|
||||
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(Items.iron_pickaxe), new ItemStack(Items.lava_bucket), ItemApi.getItem("itemResource", 14)}));
|
||||
ForbiddenResearch.recipes.put("Wrath", ThaumcraftApi.addInfusionEnchantmentRecipe("WRATH", DarkEnchantments.wrath, 8, (new AspectList()).add(DarkAspects.WRATH, 16).add(Aspect.WEAPON, 16).add(DarkAspects.NETHER, 8), new ItemStack[]{ItemApi.getItem("itemResource", 14), new ItemStack(Items.diamond_sword, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.deadlyShards, 1, 0)}));
|
||||
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("itemZombieBrain", 0), new ItemStack(Items.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(Items.nether_wart), new ItemStack(Blocks.soul_sand), ItemApi.getItem("itemResource", 14)}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"Greedy",
|
||||
ThaumcraftApi.addInfusionEnchantmentRecipe(
|
||||
"GREEDY",
|
||||
DarkEnchantments.greedy,
|
||||
4,
|
||||
(new AspectList())
|
||||
.add(DarkAspects.NETHER, 16)
|
||||
.add(Aspect.WEAPON, 8)
|
||||
.add(Aspect.GREED, 16),
|
||||
new ItemStack[] {
|
||||
new ItemStack(Items.golden_sword),
|
||||
new ItemStack(Items.diamond),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 6),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 6),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 14)
|
||||
}));
|
||||
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(Items.iron_pickaxe),
|
||||
new ItemStack(Items.lava_bucket),
|
||||
ItemApi.getItem("itemResource", 14)
|
||||
}));
|
||||
ForbiddenResearch.recipes.put(
|
||||
"Wrath",
|
||||
ThaumcraftApi.addInfusionEnchantmentRecipe(
|
||||
"WRATH",
|
||||
DarkEnchantments.wrath,
|
||||
8,
|
||||
(new AspectList())
|
||||
.add(DarkAspects.WRATH, 16)
|
||||
.add(Aspect.WEAPON, 16)
|
||||
.add(DarkAspects.NETHER, 8),
|
||||
new ItemStack[] {
|
||||
ItemApi.getItem("itemResource", 14),
|
||||
new ItemStack(Items.diamond_sword, 1, 0),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0)
|
||||
}));
|
||||
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("itemZombieBrain", 0),
|
||||
new ItemStack(Items.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(Items.nether_wart),
|
||||
new ItemStack(Blocks.soul_sand),
|
||||
ItemApi.getItem("itemResource", 14)
|
||||
}));
|
||||
|
||||
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(
|
||||
"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)
|
||||
}));
|
||||
}
|
||||
|
||||
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.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
|
||||
}));
|
||||
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) {
|
||||
if (fuel.getItem() == ForbiddenItems.taintCoal) {
|
||||
return 1 + randy.nextInt(2400);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
|
||||
OreDictionary.registerOre("logWood", new ItemStack(ConfigBlocks.blockMagicalLog, 1, OreDictionary.WILDCARD_VALUE));
|
||||
|
||||
OreDictionary.registerOre(
|
||||
"logWood", new ItemStack(ConfigBlocks.blockMagicalLog, 1, OreDictionary.WILDCARD_VALUE));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
package fox.spiteful.forbidden;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import java.util.HashMap;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
@@ -18,95 +18,678 @@ import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
|
||||
public class ForbiddenResearch {
|
||||
public static HashMap recipes = new HashMap();
|
||||
|
||||
public static void addResearch() {
|
||||
ResearchCategories.registerCategory("FORBIDDEN", new ResourceLocation("forbidden", "textures/misc/forbidden.png"), new ResourceLocation("forbidden", "textures/misc/runecircle.png"));
|
||||
ResearchCategories.registerCategory(
|
||||
"FORBIDDEN",
|
||||
new ResourceLocation("forbidden", "textures/misc/forbidden.png"),
|
||||
new ResourceLocation("forbidden", "textures/misc/runecircle.png"));
|
||||
|
||||
addInfernalism();
|
||||
addTaint();
|
||||
|
||||
if(thaumcraft.common.config.Config.researchDifficulty != -1)
|
||||
(new DarkResearchItem("CRYSTALWELL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 3).add(Aspect.CRYSTAL, 2).add(Aspect.MAGIC, 1), -2, -8, 1, new ItemStack(ForbiddenItems.crystalwell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CRYSTALWELL.1"), new ResearchPage((IArcaneRecipe) recipes.get("Crystalwell")) }).setParents(new String[] { "RESEARCH" }).registerResearchItem();
|
||||
if (thaumcraft.common.config.Config.researchDifficulty != -1)
|
||||
(new DarkResearchItem(
|
||||
"CRYSTALWELL",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.MIND, 3)
|
||||
.add(Aspect.CRYSTAL, 2)
|
||||
.add(Aspect.MAGIC, 1),
|
||||
-2,
|
||||
-8,
|
||||
1,
|
||||
new ItemStack(ForbiddenItems.crystalwell, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.CRYSTALWELL.1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("Crystalwell"))
|
||||
})
|
||||
.setParents(new String[] {"RESEARCH"})
|
||||
.registerResearchItem();
|
||||
else
|
||||
(new DarkResearchItem("CRYSTALWELL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 3).add(Aspect.CRYSTAL, 2).add(Aspect.MAGIC, 1), -2, -8, 1, new ItemStack(ForbiddenItems.crystalwell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CRYSTALWELL.1b"), new ResearchPage((IArcaneRecipe) recipes.get("Crystalwell")) }).setParents(new String[] { "RESEARCH" }).registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"CRYSTALWELL",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.MIND, 3)
|
||||
.add(Aspect.CRYSTAL, 2)
|
||||
.add(Aspect.MAGIC, 1),
|
||||
-2,
|
||||
-8,
|
||||
1,
|
||||
new ItemStack(ForbiddenItems.crystalwell, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.CRYSTALWELL.1b"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("Crystalwell"))
|
||||
})
|
||||
.setParents(new String[] {"RESEARCH"})
|
||||
.registerResearchItem();
|
||||
|
||||
(new DarkResearchItem("PRIMEWELL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 3).add(Aspect.ELDRITCH, 6).add(Aspect.CRAFT, 1), 2, -8, 1, new ItemStack(ForbiddenItems.primewell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.PRIMEWELL.1"), new ResearchPage((IArcaneRecipe) recipes.get("Primewell")) }).setParents(new String[] { "PRIMPEARL" }).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"PRIMEWELL",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.MIND, 3)
|
||||
.add(Aspect.ELDRITCH, 6)
|
||||
.add(Aspect.CRAFT, 1),
|
||||
2,
|
||||
-8,
|
||||
1,
|
||||
new ItemStack(ForbiddenItems.primewell, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.PRIMEWELL.1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("Primewell"))
|
||||
})
|
||||
.setParents(new String[] {"PRIMPEARL"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
if (Config.emeraldTrans)
|
||||
(new DarkResearchItem("TRANSEMERALD", "FORBIDDEN", (new AspectList()).add(Aspect.CRYSTAL, 2).add(Aspect.EXCHANGE, 5).add(Aspect.GREED, 4), 0, -6, 3, new ItemStack(ForbiddenItems.resource, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TRANSEMERALD.1"), new ResearchPage((CrucibleRecipe) recipes.get("TransEmerald")) }).setSecondary().setConcealed().setParents(new String[] { "TRANSGOLD" }).registerResearchItem();
|
||||
(new DarkResearchItem("BLACKFLOWER", "FORBIDDEN", (new AspectList()).add(Aspect.PLANT, 3).add(Aspect.SENSES, 2).add(Aspect.DARKNESS, 4), -2, -6, 1, new ItemStack(ForbiddenBlocks.blackFlower, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.BLACKFLOWER.1"), new ResearchPage((CrucibleRecipe) recipes.get("BlackFlower")), new ResearchPage((IRecipe) recipes.get("BlackInk")) }).setAspectTriggers(new Aspect[] { Aspect.SENSES }).registerResearchItem();
|
||||
(new DarkResearchItem("RIDINGCROP", "FORBIDDEN", new AspectList(), 0, -8, 0, new ItemStack(ForbiddenItems.ridingCrop))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.RIDINGCROP.1"), new ResearchPage((IRecipe) recipes.get("RidingCrop")) }).setStub().setRound().setAutoUnlock().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"TRANSEMERALD",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.CRYSTAL, 2)
|
||||
.add(Aspect.EXCHANGE, 5)
|
||||
.add(Aspect.GREED, 4),
|
||||
0,
|
||||
-6,
|
||||
3,
|
||||
new ItemStack(ForbiddenItems.resource, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.TRANSEMERALD.1"),
|
||||
new ResearchPage((CrucibleRecipe) recipes.get("TransEmerald"))
|
||||
})
|
||||
.setSecondary()
|
||||
.setConcealed()
|
||||
.setParents(new String[] {"TRANSGOLD"})
|
||||
.registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"BLACKFLOWER",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.PLANT, 3)
|
||||
.add(Aspect.SENSES, 2)
|
||||
.add(Aspect.DARKNESS, 4),
|
||||
-2,
|
||||
-6,
|
||||
1,
|
||||
new ItemStack(ForbiddenBlocks.blackFlower, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.BLACKFLOWER.1"),
|
||||
new ResearchPage((CrucibleRecipe) recipes.get("BlackFlower")),
|
||||
new ResearchPage((IRecipe) recipes.get("BlackInk"))
|
||||
})
|
||||
.setAspectTriggers(new Aspect[] {Aspect.SENSES})
|
||||
.registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"RIDINGCROP",
|
||||
"FORBIDDEN",
|
||||
new AspectList(),
|
||||
0,
|
||||
-8,
|
||||
0,
|
||||
new ItemStack(ForbiddenItems.ridingCrop)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.RIDINGCROP.1"),
|
||||
new ResearchPage((IRecipe) recipes.get("RidingCrop"))
|
||||
})
|
||||
.setStub()
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem();
|
||||
|
||||
|
||||
if(Config.enchanting) {
|
||||
(new DarkResearchItem("CONSUMING", "FORBIDDEN", (new AspectList()).add(Aspect.VOID, 4).add(Aspect.ENTROPY, 3).add(Aspect.MAGIC, 2), -4, -8, 1, new ResourceLocation("forbidden", "textures/misc/consuming.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CONSUMING.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Consuming"))}).setParents(new String[]{"INFUSIONENCHANTMENT"}).setSecondary().setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem("EDUCATIONAL", "FORBIDDEN", (new AspectList()).add(Aspect.MIND, 5).add(Aspect.WEAPON, 1).add(Aspect.MAGIC, 3), -4, -7, 2, new ResourceLocation("forbidden", "textures/misc/educational.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.EDUCATIONAL.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Educational"))}).setParents(new String[]{"INFUSIONENCHANTMENT"}).setSecondary().setConcealed().registerResearchItem();
|
||||
if (Config.enchanting) {
|
||||
(new DarkResearchItem(
|
||||
"CONSUMING",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.VOID, 4)
|
||||
.add(Aspect.ENTROPY, 3)
|
||||
.add(Aspect.MAGIC, 2),
|
||||
-4,
|
||||
-8,
|
||||
1,
|
||||
new ResourceLocation("forbidden", "textures/misc/consuming.png")))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.CONSUMING.1"),
|
||||
new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Consuming"))
|
||||
})
|
||||
.setParents(new String[] {"INFUSIONENCHANTMENT"})
|
||||
.setSecondary()
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"EDUCATIONAL",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.MIND, 5)
|
||||
.add(Aspect.WEAPON, 1)
|
||||
.add(Aspect.MAGIC, 3),
|
||||
-4,
|
||||
-7,
|
||||
2,
|
||||
new ResourceLocation("forbidden", "textures/misc/educational.png")))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.EDUCATIONAL.1"),
|
||||
new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Educational"))
|
||||
})
|
||||
.setParents(new String[] {"INFUSIONENCHANTMENT"})
|
||||
.setSecondary()
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
}
|
||||
|
||||
if(Compat.botan || Compat.bm || Compat.am2)
|
||||
(new DarkResearchItem("SCHOOLS", "FORBIDDEN", new AspectList(), -1, 1, 0, new ItemStack(Blocks.enchanting_table))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.SCHOOLS.1") }).setRound().setStub().setAutoUnlock().registerResearchItem();
|
||||
|
||||
if (Compat.botan || Compat.bm || Compat.am2)
|
||||
(new DarkResearchItem(
|
||||
"SCHOOLS", "FORBIDDEN", new AspectList(), -1, 1, 0, new ItemStack(Blocks.enchanting_table)))
|
||||
.setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.SCHOOLS.1")})
|
||||
.setRound()
|
||||
.setStub()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem();
|
||||
}
|
||||
|
||||
public static void addInfernalism() {
|
||||
if (!Config.noLust)
|
||||
(new DarkResearchItem("NETHERSHARDS", "FORBIDDEN", new AspectList(), -8, -5, 0, new ItemStack(ForbiddenItems.deadlyShards, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.NETHERSHARDS.1"), new ResearchPage("forbidden.research_page.NETHERSHARDS.2"), new ResearchPage("forbidden.research_page.NETHERSHARDS.3") }).setStub().setRound().setAutoUnlock().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"NETHERSHARDS",
|
||||
"FORBIDDEN",
|
||||
new AspectList(),
|
||||
-8,
|
||||
-5,
|
||||
0,
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.NETHERSHARDS.1"),
|
||||
new ResearchPage("forbidden.research_page.NETHERSHARDS.2"),
|
||||
new ResearchPage("forbidden.research_page.NETHERSHARDS.3")
|
||||
})
|
||||
.setStub()
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem();
|
||||
else
|
||||
(new DarkResearchItem("NETHERSHARDS", "FORBIDDEN", new AspectList(), -8, -5, 0, new ItemStack(ForbiddenItems.deadlyShards, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.NETHERSHARDS.1"), new ResearchPage("forbidden.research_page.NETHERSHARDS.2b"), new ResearchPage("forbidden.research_page.NETHERSHARDS.3") }).setStub().setRound().setAutoUnlock().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"NETHERSHARDS",
|
||||
"FORBIDDEN",
|
||||
new AspectList(),
|
||||
-8,
|
||||
-5,
|
||||
0,
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.NETHERSHARDS.1"),
|
||||
new ResearchPage("forbidden.research_page.NETHERSHARDS.2b"),
|
||||
new ResearchPage("forbidden.research_page.NETHERSHARDS.3")
|
||||
})
|
||||
.setStub()
|
||||
.setRound()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem();
|
||||
|
||||
(new DarkResearchItem("HELLFIRE", "FORBIDDEN", (new AspectList()).add(Aspect.FIRE, 3).add(DarkAspects.NETHER, 4).add(Aspect.TRAVEL, 2), -8, -8, 1, new ItemStack(Blocks.fire))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.HELLFIRE.1") }).setRound().registerResearchItem().setHidden().setAspectTriggers(new Aspect[]{DarkAspects.NETHER}).setParents(new String[] { "NETHERSHARDS" });
|
||||
(new DarkResearchItem("ROD_profane", "FORBIDDEN", (new AspectList()), -9, -8, 0, new ItemStack(ForbiddenItems.wandCore, 1, 5))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_profane.1") }).setRound().registerResearchItem().setHidden().setParents(new String[] { "NETHERSHARDS" }).setStub();
|
||||
if(!Config.noLust)
|
||||
(new DarkResearchItem("SUBCOLLAR", "FORBIDDEN", (new AspectList().add(Aspect.AURA, 3).add(DarkAspects.LUST, 8).add(Aspect.MAGIC, 3).add(Aspect.TRAP, 6).add(Aspect.FLESH, 4)), -11, -5, 2, new ItemStack(ForbiddenItems.subCollar))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.SUBCOLLAR.1"), new ResearchPage((InfusionRecipe) recipes.get("SubCollar")) }).setParents(new String[] { "NETHERSHARDS", "VISAMULET", "INFUSION" }).setHidden().setAspectTriggers(new Aspect[]{DarkAspects.LUST}).registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"HELLFIRE",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.FIRE, 3)
|
||||
.add(DarkAspects.NETHER, 4)
|
||||
.add(Aspect.TRAVEL, 2),
|
||||
-8,
|
||||
-8,
|
||||
1,
|
||||
new ItemStack(Blocks.fire)))
|
||||
.setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.HELLFIRE.1")})
|
||||
.setRound()
|
||||
.registerResearchItem()
|
||||
.setHidden()
|
||||
.setAspectTriggers(new Aspect[] {DarkAspects.NETHER})
|
||||
.setParents(new String[] {"NETHERSHARDS"});
|
||||
(new DarkResearchItem(
|
||||
"ROD_profane",
|
||||
"FORBIDDEN",
|
||||
(new AspectList()),
|
||||
-9,
|
||||
-8,
|
||||
0,
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 5)))
|
||||
.setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.ROD_profane.1")})
|
||||
.setRound()
|
||||
.registerResearchItem()
|
||||
.setHidden()
|
||||
.setParents(new String[] {"NETHERSHARDS"})
|
||||
.setStub();
|
||||
if (!Config.noLust)
|
||||
(new DarkResearchItem(
|
||||
"SUBCOLLAR",
|
||||
"FORBIDDEN",
|
||||
(new AspectList()
|
||||
.add(Aspect.AURA, 3)
|
||||
.add(DarkAspects.LUST, 8)
|
||||
.add(Aspect.MAGIC, 3)
|
||||
.add(Aspect.TRAP, 6)
|
||||
.add(Aspect.FLESH, 4)),
|
||||
-11,
|
||||
-5,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.subCollar)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.SUBCOLLAR.1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("SubCollar"))
|
||||
})
|
||||
.setParents(new String[] {"NETHERSHARDS", "VISAMULET", "INFUSION"})
|
||||
.setHidden()
|
||||
.setAspectTriggers(new Aspect[] {DarkAspects.LUST})
|
||||
.registerResearchItem();
|
||||
|
||||
(new DarkResearchItem("SKULLAXE", "FORBIDDEN", (new AspectList()).add(Aspect.WEAPON, 3).add(DarkAspects.WRATH, 4).add(DarkAspects.NETHER, 1), -11, -7, 2, new ItemStack(ForbiddenItems.skullAxe))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.SKULLAXE.1"), new ResearchPage((InfusionRecipe) recipes.get("SkullAxe")) }).setParents(new String[] { "NETHERSHARDS", "THAUMIUM", "INFUSION" }).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"SKULLAXE",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.WEAPON, 3)
|
||||
.add(DarkAspects.WRATH, 4)
|
||||
.add(DarkAspects.NETHER, 1),
|
||||
-11,
|
||||
-7,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.skullAxe)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.SKULLAXE.1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("SkullAxe"))
|
||||
})
|
||||
.setParents(new String[] {"NETHERSHARDS", "THAUMIUM", "INFUSION"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("SKULLAXE", 1);
|
||||
if(Config.gluttony != 1) {
|
||||
(new DarkResearchItem("RINGFOOD", "FORBIDDEN", (new AspectList()).add(DarkAspects.GLUTTONY, 4).add(Aspect.HUNGER, 3).add(Aspect.LIFE, 2), -11, -6, 2, new ItemStack(ForbiddenItems.ringFood))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.RINGFOOD.1"), new ResearchPage((IArcaneRecipe) recipes.get("RingFood"))}).setParents(new String[]{"NETHERSHARDS"}).registerResearchItem();
|
||||
(new DarkResearchItem("ARCANECAKE", "FORBIDDEN", (new AspectList()).add(DarkAspects.GLUTTONY, 6).add(Aspect.HUNGER, 3).add(Aspect.CRAFT, 2), -12, -6, 2, new ItemStack(ForbiddenItems.arcaneCakeItem))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ARCANECAKE.1"), new ResearchPage((InfusionRecipe) recipes.get("ArcaneCake"))}).setParents(new String[]{"NETHERSHARDS", "INFUSION"}).setAspectTriggers(new Aspect[]{DarkAspects.GLUTTONY}).setConcealed().registerResearchItem();
|
||||
if (Config.gluttony != 1) {
|
||||
(new DarkResearchItem(
|
||||
"RINGFOOD",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(DarkAspects.GLUTTONY, 4)
|
||||
.add(Aspect.HUNGER, 3)
|
||||
.add(Aspect.LIFE, 2),
|
||||
-11,
|
||||
-6,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.ringFood)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.RINGFOOD.1"),
|
||||
new ResearchPage((IArcaneRecipe) recipes.get("RingFood"))
|
||||
})
|
||||
.setParents(new String[] {"NETHERSHARDS"})
|
||||
.registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"ARCANECAKE",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(DarkAspects.GLUTTONY, 6)
|
||||
.add(Aspect.HUNGER, 3)
|
||||
.add(Aspect.CRAFT, 2),
|
||||
-12,
|
||||
-6,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.arcaneCakeItem)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.ARCANECAKE.1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("ArcaneCake"))
|
||||
})
|
||||
.setParents(new String[] {"NETHERSHARDS", "INFUSION"})
|
||||
.setAspectTriggers(new Aspect[] {DarkAspects.GLUTTONY})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
}
|
||||
(new DarkResearchItem("FOCUSBLINK", "FORBIDDEN", (new AspectList()).add(Aspect.TRAVEL, 3).add(Aspect.ENTROPY, 3).add(DarkAspects.NETHER, 3).add(DarkAspects.SLOTH, 6), -11, -3, 2, new ItemStack(ForbiddenItems.blinkFocus))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.FOCUSBLINK.1"), new ResearchPage((InfusionRecipe) recipes.get("FocusBlink"))}).setConcealed().setParents(new String[]{"NETHERSHARDS", "INFUSION"}).registerResearchItem();
|
||||
(new DarkResearchItem("MORPHTOOLS", "FORBIDDEN", (new AspectList()).add(Aspect.TOOL, 2).add(DarkAspects.ENVY, 3).add(Aspect.EXCHANGE, 2), -9, -3, 4, new ItemStack(ForbiddenItems.morphPickaxe))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.MORPHTOOLS.1"), new ResearchPage((InfusionRecipe) recipes.get("MorphPick")), new ResearchPage((InfusionRecipe) recipes.get("MorphSword")), new ResearchPage((InfusionRecipe) recipes.get("MorphShovel")), new ResearchPage((InfusionRecipe) recipes.get("MorphAxe")) }).setParentsHidden(new String[] { "THAUMIUM", "INFUSIONENCHANTMENT" }).setParents(new String[] { "NETHERSHARDS" }).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"FOCUSBLINK",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.TRAVEL, 3)
|
||||
.add(Aspect.ENTROPY, 3)
|
||||
.add(DarkAspects.NETHER, 3)
|
||||
.add(DarkAspects.SLOTH, 6),
|
||||
-11,
|
||||
-3,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.blinkFocus)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.FOCUSBLINK.1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("FocusBlink"))
|
||||
})
|
||||
.setConcealed()
|
||||
.setParents(new String[] {"NETHERSHARDS", "INFUSION"})
|
||||
.registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"MORPHTOOLS",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.TOOL, 2)
|
||||
.add(DarkAspects.ENVY, 3)
|
||||
.add(Aspect.EXCHANGE, 2),
|
||||
-9,
|
||||
-3,
|
||||
4,
|
||||
new ItemStack(ForbiddenItems.morphPickaxe)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.MORPHTOOLS.1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("MorphPick")),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("MorphSword")),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("MorphShovel")),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("MorphAxe"))
|
||||
})
|
||||
.setParentsHidden(new String[] {"THAUMIUM", "INFUSIONENCHANTMENT"})
|
||||
.setParents(new String[] {"NETHERSHARDS"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("MORPHTOOLS", 4);
|
||||
(new DarkResearchItem("ROD_infernal", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 4).add(Aspect.FIRE, 3).add(Aspect.TOOL, 1), -11, -4, 3, new ItemStack(ForbiddenItems.wandCore, 1, 1))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ROD_infernal.1"), new ResearchPage((InfusionRecipe) recipes.get("WandRodInfernal")), new ResearchPage("forbidden.research_page.ROD_infernal.2") }).setParents(new String[] { "ROD_silverwood", "INFUSION", "NETHERSHARDS" }).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"ROD_infernal",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(DarkAspects.NETHER, 4)
|
||||
.add(Aspect.FIRE, 3)
|
||||
.add(Aspect.TOOL, 1),
|
||||
-11,
|
||||
-4,
|
||||
3,
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 1)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.ROD_infernal.1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("WandRodInfernal")),
|
||||
new ResearchPage("forbidden.research_page.ROD_infernal.2")
|
||||
})
|
||||
.setParents(new String[] {"ROD_silverwood", "INFUSION", "NETHERSHARDS"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("ROD_infernal", 2);
|
||||
|
||||
if(Config.enchanting) {
|
||||
(new DarkResearchItem("WRATH", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 16).add(Aspect.WEAPON, 20).add(Aspect.MAGIC, 10), -6, -3, 4, new ResourceLocation("forbidden", "textures/misc/wrath.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.WRATH.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Wrath"))}).setParents(new String[]{"NETHERSHARDS", "INFUSIONENCHANTMENT"}).setConcealed().registerResearchItem();
|
||||
if (Config.enchanting) {
|
||||
(new DarkResearchItem(
|
||||
"WRATH",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(DarkAspects.WRATH, 16)
|
||||
.add(Aspect.WEAPON, 20)
|
||||
.add(Aspect.MAGIC, 10),
|
||||
-6,
|
||||
-3,
|
||||
4,
|
||||
new ResourceLocation("forbidden", "textures/misc/wrath.png")))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.WRATH.1"),
|
||||
new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Wrath"))
|
||||
})
|
||||
.setParents(new String[] {"NETHERSHARDS", "INFUSIONENCHANTMENT"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("WRATH", 3);
|
||||
if (Config.greedyEnch)
|
||||
(new DarkResearchItem("GREEDY", "FORBIDDEN", (new AspectList()).add(Aspect.MAGIC, 2).add(Aspect.WEAPON, 1).add(Aspect.GREED, 3), -6, -5, 2, 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[]{"NETHERSHARDS", "INFUSIONENCHANTMENT"}).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem("CORRUPTING", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 5).add(Aspect.CRYSTAL, 2).add(Aspect.EXCHANGE, 1), -6, -4, 1, 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[]{"NETHERSHARDS", "INFUSIONENCHANTMENT"}).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"GREEDY",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.MAGIC, 2)
|
||||
.add(Aspect.WEAPON, 1)
|
||||
.add(Aspect.GREED, 3),
|
||||
-6,
|
||||
-5,
|
||||
2,
|
||||
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[] {"NETHERSHARDS", "INFUSIONENCHANTMENT"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"CORRUPTING",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(DarkAspects.NETHER, 5)
|
||||
.add(Aspect.CRYSTAL, 2)
|
||||
.add(Aspect.EXCHANGE, 1),
|
||||
-6,
|
||||
-4,
|
||||
1,
|
||||
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[] {"NETHERSHARDS", "INFUSIONENCHANTMENT"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
(new DarkResearchItem("CLUSTER", "FORBIDDEN", (new AspectList()).add(Aspect.METAL, 1).add(Aspect.FIRE, 4).add(DarkAspects.ENVY, 3), -10, -1, 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"}).setSecondary().setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem("IMPACT", "FORBIDDEN", (new AspectList()).add(Aspect.ENTROPY, 8).add(Aspect.TOOL, 10).add(Aspect.MINE, 16).add(DarkAspects.ENVY, 10), -9, -1, 3, new ResourceLocation("forbidden", "textures/misc/impact.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.IMPACT.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Impact"))}).setParents(new String[]{"MORPHTOOLS", "ELEMENTALSHOVEL"}).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem("VOIDTOUCHED", "FORBIDDEN", (new AspectList()).add(Aspect.ELDRITCH, 16).add(Aspect.TOOL, 10).add(Aspect.CRAFT, 8).add(DarkAspects.ENVY, 32), -8, -1, 4, new ResourceLocation("forbidden", "textures/misc/voidtouched.png"))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.VOIDTOUCHED.1"), new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Voidtouched"))}).setParents(new String[]{"MORPHTOOLS", "VOIDMETAL"}).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"CLUSTER",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.METAL, 1)
|
||||
.add(Aspect.FIRE, 4)
|
||||
.add(DarkAspects.ENVY, 3),
|
||||
-10,
|
||||
-1,
|
||||
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"})
|
||||
.setSecondary()
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"IMPACT",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.ENTROPY, 8)
|
||||
.add(Aspect.TOOL, 10)
|
||||
.add(Aspect.MINE, 16)
|
||||
.add(DarkAspects.ENVY, 10),
|
||||
-9,
|
||||
-1,
|
||||
3,
|
||||
new ResourceLocation("forbidden", "textures/misc/impact.png")))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.IMPACT.1"),
|
||||
new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Impact"))
|
||||
})
|
||||
.setParents(new String[] {"MORPHTOOLS", "ELEMENTALSHOVEL"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"VOIDTOUCHED",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(Aspect.ELDRITCH, 16)
|
||||
.add(Aspect.TOOL, 10)
|
||||
.add(Aspect.CRAFT, 8)
|
||||
.add(DarkAspects.ENVY, 32),
|
||||
-8,
|
||||
-1,
|
||||
4,
|
||||
new ResourceLocation("forbidden", "textures/misc/voidtouched.png")))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.VOIDTOUCHED.1"),
|
||||
new ResearchPage((InfusionEnchantmentRecipe) recipes.get("Voidtouched"))
|
||||
})
|
||||
.setParents(new String[] {"MORPHTOOLS", "VOIDMETAL"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("VOIDTOUCHED", 3);
|
||||
}
|
||||
|
||||
if (Config.wrathCage) {
|
||||
(new DarkResearchItem("FORK", "FORBIDDEN", (new AspectList()).add(DarkAspects.NETHER, 3).add(Aspect.MECHANISM, 1).add(Aspect.TOOL, 1), -6, -7, 0, new ItemStack(ForbiddenItems.fork))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.FORK.1"), new ResearchPage((InfusionRecipe) recipes.get("Fork")), new ResearchPage("WRATHCAGE", "forbidden.research_page.FORK.wc") }).setParents(new String[] {"INFUSION", "NETHERSHARDS", "THAUMIUM"}).setSecondary().setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"FORK",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(DarkAspects.NETHER, 3)
|
||||
.add(Aspect.MECHANISM, 1)
|
||||
.add(Aspect.TOOL, 1),
|
||||
-6,
|
||||
-7,
|
||||
0,
|
||||
new ItemStack(ForbiddenItems.fork)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.FORK.1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("Fork")),
|
||||
new ResearchPage("WRATHCAGE", "forbidden.research_page.FORK.wc")
|
||||
})
|
||||
.setParents(new String[] {"INFUSION", "NETHERSHARDS", "THAUMIUM"})
|
||||
.setSecondary()
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
if (Config.wrathCost > 0)
|
||||
(new DarkResearchItem("WRATHCAGE", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 5).add(Aspect.MECHANISM, 3).add(Aspect.BEAST, 2), -6, -9, 4, new ItemStack(ForbiddenBlocks.wrathCage))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.WRATHCAGE.1"), new ResearchPage((InfusionRecipe) recipes.get("WrathCage")), new ResearchPage("forbidden.research_page.WRATHCAGE.2"), new ResearchPage("forbidden.research_page.WRATHCAGE.3"), new ResearchPage((CrucibleRecipe) recipes.get("MobCrystal"))}).setParents(new String[]{"FORK"}).setParentsHidden(new String[]{"INFUSION", "THAUMIUM", "DISTILESSENTIA"}).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"WRATHCAGE",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(DarkAspects.WRATH, 5)
|
||||
.add(Aspect.MECHANISM, 3)
|
||||
.add(Aspect.BEAST, 2),
|
||||
-6,
|
||||
-9,
|
||||
4,
|
||||
new ItemStack(ForbiddenBlocks.wrathCage)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.WRATHCAGE.1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("WrathCage")),
|
||||
new ResearchPage("forbidden.research_page.WRATHCAGE.2"),
|
||||
new ResearchPage("forbidden.research_page.WRATHCAGE.3"),
|
||||
new ResearchPage((CrucibleRecipe) recipes.get("MobCrystal"))
|
||||
})
|
||||
.setParents(new String[] {"FORK"})
|
||||
.setParentsHidden(new String[] {"INFUSION", "THAUMIUM", "DISTILESSENTIA"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
else
|
||||
(new DarkResearchItem("WRATHCAGE", "FORBIDDEN", (new AspectList()).add(DarkAspects.WRATH, 5).add(Aspect.MECHANISM, 3).add(Aspect.BEAST, 2), -6, -9, 4, new ItemStack(ForbiddenBlocks.wrathCage))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.WRATHCAGE.1"), new ResearchPage((InfusionRecipe) recipes.get("WrathCage")), new ResearchPage("forbidden.research_page.WRATHCAGE.3"), new ResearchPage((CrucibleRecipe) recipes.get("MobCrystal"))}).setParents(new String[]{"FORK"}).setParentsHidden(new String[]{"INFUSION", "THAUMIUM", "DISTILESSENTIA"}).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"WRATHCAGE",
|
||||
"FORBIDDEN",
|
||||
(new AspectList())
|
||||
.add(DarkAspects.WRATH, 5)
|
||||
.add(Aspect.MECHANISM, 3)
|
||||
.add(Aspect.BEAST, 2),
|
||||
-6,
|
||||
-9,
|
||||
4,
|
||||
new ItemStack(ForbiddenBlocks.wrathCage)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.WRATHCAGE.1"),
|
||||
new ResearchPage((InfusionRecipe) recipes.get("WrathCage")),
|
||||
new ResearchPage("forbidden.research_page.WRATHCAGE.3"),
|
||||
new ResearchPage((CrucibleRecipe) recipes.get("MobCrystal"))
|
||||
})
|
||||
.setParents(new String[] {"FORK"})
|
||||
.setParentsHidden(new String[] {"INFUSION", "THAUMIUM", "DISTILESSENTIA"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("WRATHCAGE", 3);
|
||||
ThaumcraftApi.addWarpToItem(new ItemStack(ForbiddenBlocks.wrathCage, 1), 5);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void addTaint() {
|
||||
(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)) }).setParents(new String[]{"THAUMIUM", "INFUSION", "ETHEREALBLOOM"}).setConcealed().registerResearchItem();
|
||||
(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))
|
||||
})
|
||||
.setParents(new String[] {"THAUMIUM", "INFUSION", "ETHEREALBLOOM"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("TAINTTREE", 1);
|
||||
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"))}).setParents(new String[]{"THAUMIUM", "INFUSION", "ETHEREALBLOOM"}).setConcealed().registerResearchItem();
|
||||
(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"))
|
||||
})
|
||||
.setParents(new String[] {"THAUMIUM", "INFUSION", "ETHEREALBLOOM"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("ROD_tainted", 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package fox.spiteful.forbidden;
|
||||
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry.IVillageTradeHandler;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import java.util.Random;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -14,12 +15,10 @@ import thaumcraft.api.wands.WandRod;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class VillagerHereticManager implements IVillageTradeHandler {
|
||||
|
||||
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) {
|
||||
if(villager.getProfession() == Config.hereticID) {
|
||||
if (villager.getProfession() == Config.hereticID) {
|
||||
/*recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemResource, 20 + random.nextInt(3), 18), new ItemStack(Items.emerald)));
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemResource, 1, 9)));
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemResource, 4 + random.nextInt(3), 3), new ItemStack(Items.emerald)));
|
||||
@@ -36,26 +35,49 @@ public class VillagerHereticManager implements IVillageTradeHandler {
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemAmuletVis, 1, 0)));
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemBaubleBlanks, 1, 3 + random.nextInt(6))));
|
||||
*/
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1 + random.nextInt(2)), new ItemStack(ForbiddenItems.deadlyShards, 3 + random.nextInt(2), 6)));
|
||||
if(!Config.noLust)
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(ForbiddenItems.deadlyShards, 2 + random.nextInt(4), 4), new ItemStack(Items.emerald)));
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(ForbiddenItems.deadlyShards, 4 + random.nextInt(6), 0), new ItemStack(Items.emerald)));
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(ForbiddenItems.gluttonyShard, 4 + random.nextInt(6), 0), new ItemStack(Items.emerald)));
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1 + random.nextInt(3)), new ItemStack(Items.skull, 1, 0)));
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 4 + random.nextInt(4)), new ItemStack(Items.ghast_tear, 1)));
|
||||
recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1), new ItemStack(Items.glowstone_dust, 8 + random.nextInt(9))));
|
||||
recipeList.add(new MerchantRecipe(
|
||||
new ItemStack(Items.emerald, 1 + random.nextInt(2)),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 3 + random.nextInt(2), 6)));
|
||||
if (!Config.noLust)
|
||||
recipeList.add(new MerchantRecipe(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 2 + random.nextInt(4), 4),
|
||||
new ItemStack(Items.emerald)));
|
||||
recipeList.add(new MerchantRecipe(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 4 + random.nextInt(6), 0),
|
||||
new ItemStack(Items.emerald)));
|
||||
recipeList.add(new MerchantRecipe(
|
||||
new ItemStack(ForbiddenItems.gluttonyShard, 4 + random.nextInt(6), 0),
|
||||
new ItemStack(Items.emerald)));
|
||||
recipeList.add(new MerchantRecipe(
|
||||
new ItemStack(Items.emerald, 1 + random.nextInt(3)), new ItemStack(Items.skull, 1, 0)));
|
||||
recipeList.add(new MerchantRecipe(
|
||||
new ItemStack(Items.emerald, 4 + random.nextInt(4)), new ItemStack(Items.ghast_tear, 1)));
|
||||
recipeList.add(new MerchantRecipe(
|
||||
new ItemStack(Items.emerald, 1), new ItemStack(Items.glowstone_dust, 8 + random.nextInt(9))));
|
||||
|
||||
ItemStack wand = new ItemStack(ConfigItems.itemWandCasting, 1, 36);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("iron"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("profane"));
|
||||
((ItemWandCasting) wand.getItem()).storeAllVis(wand, new AspectList().add(Aspect.FIRE, 5000).add(Aspect.WATER, 5000).add(Aspect.EARTH, 5000).add(Aspect.AIR, 5000).add(Aspect.ORDER, 5000).add(Aspect.ENTROPY, 5000));
|
||||
MerchantRecipe profane = new MerchantRecipe(new ItemStack(Items.emerald, 8 + random.nextInt(5)), new ItemStack(Items.stick), wand);
|
||||
((ItemWandCasting) wand.getItem())
|
||||
.storeAllVis(
|
||||
wand,
|
||||
new AspectList()
|
||||
.add(Aspect.FIRE, 5000)
|
||||
.add(Aspect.WATER, 5000)
|
||||
.add(Aspect.EARTH, 5000)
|
||||
.add(Aspect.AIR, 5000)
|
||||
.add(Aspect.ORDER, 5000)
|
||||
.add(Aspect.ENTROPY, 5000));
|
||||
MerchantRecipe profane = new MerchantRecipe(
|
||||
new ItemStack(Items.emerald, 8 + random.nextInt(5)), new ItemStack(Items.stick), wand);
|
||||
profane.func_82783_a(-6);
|
||||
recipeList.add(profane);
|
||||
MerchantRecipe fire = new MerchantRecipe(new ItemStack(Items.emerald, 4 + random.nextInt(5)), new ItemStack(Items.diamond, 1), new ItemStack(ConfigItems.itemFocusFire, 1));
|
||||
MerchantRecipe fire = new MerchantRecipe(
|
||||
new ItemStack(Items.emerald, 4 + random.nextInt(5)),
|
||||
new ItemStack(Items.diamond, 1),
|
||||
new ItemStack(ConfigItems.itemFocusFire, 1));
|
||||
fire.func_82783_a(-6);
|
||||
recipeList.add(fire);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -12,22 +12,32 @@ import thaumcraft.common.lib.research.ResearchManager;
|
||||
|
||||
public class WandOverlord implements IWandTriggerManager {
|
||||
@Override
|
||||
public boolean performTrigger(World world, ItemStack wand, EntityPlayer player, int x, int y, int z, int side, int event) {
|
||||
if (event == 1 && side == 1)
|
||||
return hellfire(world, wand, player, x, y, z, side);
|
||||
public boolean performTrigger(
|
||||
World world, ItemStack wand, EntityPlayer player, int x, int y, int z, int side, int event) {
|
||||
if (event == 1 && side == 1) return hellfire(world, wand, player, x, y, z, side);
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hellfire(World world, ItemStack wand, EntityPlayer player, int x, int y, int z, int side) {
|
||||
if (world.isRemote || wand == null || !(wand.getItem() instanceof ItemWandCasting) || ((ItemWandCasting) wand.getItem()).getFocusItem(wand) != null || !ResearchManager.isResearchComplete(player.getCommandSenderName(), "HELLFIRE") || !player.canPlayerEdit(x, y, z, side, new ItemStack(Items.fire_charge)))
|
||||
return false;
|
||||
if (world.isRemote
|
||||
|| wand == null
|
||||
|| !(wand.getItem() instanceof ItemWandCasting)
|
||||
|| ((ItemWandCasting) wand.getItem()).getFocusItem(wand) != null
|
||||
|| !ResearchManager.isResearchComplete(player.getCommandSenderName(), "HELLFIRE")
|
||||
|| !player.canPlayerEdit(x, y, z, side, new ItemStack(Items.fire_charge))) return false;
|
||||
|
||||
if (world.isAirBlock(x, y + 1, z) && ((ItemWandCasting) wand.getItem()).consumeVis(wand, player, Aspect.FIRE, 2, false)) {
|
||||
world.playSoundEffect((double) x + 0.5D, (double) y + 1.5D, (double) z + 0.5D, "fire.ignite", 1.0F, world.rand.nextFloat() * 0.4F + 0.8F);
|
||||
if (world.isAirBlock(x, y + 1, z)
|
||||
&& ((ItemWandCasting) wand.getItem()).consumeVis(wand, player, Aspect.FIRE, 2, false)) {
|
||||
world.playSoundEffect(
|
||||
(double) x + 0.5D,
|
||||
(double) y + 1.5D,
|
||||
(double) z + 0.5D,
|
||||
"fire.ignite",
|
||||
1.0F,
|
||||
world.rand.nextFloat() * 0.4F + 0.8F);
|
||||
world.setBlock(x, y + 1, z, Blocks.fire);
|
||||
player.swingItem();
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
} else return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,90 +1,73 @@
|
||||
package fox.spiteful.forbidden;
|
||||
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import java.util.Random;
|
||||
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
|
||||
{
|
||||
public class WorldGenTaintedTree extends WorldGenAbstractTree {
|
||||
/** The minimum height of a generated tree. */
|
||||
private final int minTreeHeight;
|
||||
|
||||
public WorldGenTaintedTree(boolean p_i2027_1_)
|
||||
{
|
||||
public WorldGenTaintedTree(boolean p_i2027_1_) {
|
||||
this(p_i2027_1_, 4);
|
||||
}
|
||||
|
||||
public WorldGenTaintedTree(boolean p_i2028_1_, int p_i2028_2_)
|
||||
{
|
||||
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_)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
for (int i1 = p_76484_4_; i1 <= p_76484_4_ + 1 + l; ++i1) {
|
||||
b0 = 1;
|
||||
|
||||
if (i1 == p_76484_4_)
|
||||
{
|
||||
if (i1 == p_76484_4_) {
|
||||
b0 = 0;
|
||||
}
|
||||
|
||||
if (i1 >= p_76484_4_ + 1 + l - 2)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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))
|
||||
{
|
||||
if (!this.isReplaceable(p_76484_1_, j1, i1, k1)) {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!flag)
|
||||
{
|
||||
if (!flag) {
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
} 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_);
|
||||
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;
|
||||
@@ -92,53 +75,45 @@ public class WorldGenTaintedTree extends WorldGenAbstractTree
|
||||
int j2;
|
||||
int i3;
|
||||
|
||||
for (k1 = p_76484_4_ - b0 + l; k1 <= p_76484_4_ + l; ++k1)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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);
|
||||
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)
|
||||
{
|
||||
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);
|
||||
|
||||
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
|
||||
{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -146,17 +121,17 @@ public class WorldGenTaintedTree extends WorldGenAbstractTree
|
||||
/**
|
||||
* 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_)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -164,4 +139,4 @@ public class WorldGenTaintedTree extends WorldGenAbstractTree
|
||||
--i1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
package fox.spiteful.forbidden;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import java.lang.reflect.Field;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
@@ -11,10 +10,10 @@ public class XPReflectionHelper {
|
||||
|
||||
static {
|
||||
try {
|
||||
stupidMojangProtectedVariable = ReflectionHelper.findField(EntityLiving.class, "experienceValue", "field_70728_aV");
|
||||
stupidMojangProtectedVariable =
|
||||
ReflectionHelper.findField(EntityLiving.class, "experienceValue", "field_70728_aV");
|
||||
stupidMojangProtectedVariable.setAccessible(true);
|
||||
}
|
||||
catch(Exception e){
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, e.toString());
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package fox.spiteful.forbidden.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -15,8 +16,6 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import squeek.applecore.api.food.FoodValues;
|
||||
import squeek.applecore.api.food.IEdibleBlock;
|
||||
import squeek.applecore.api.food.ItemFoodProxy;
|
||||
@@ -24,10 +23,13 @@ import squeek.applecore.api.food.ItemFoodProxy;
|
||||
@Optional.Interface(iface = "squeek.applecore.api.food.IEdibleBlock", modid = "AppleCore")
|
||||
public class BlockArcaneCake extends Block implements IEdibleBlock {
|
||||
private boolean isEdibleAtMaxHunger = false;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon cakeTopIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon cakeBottomIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon cakeInsideIcon;
|
||||
|
||||
@@ -59,8 +61,15 @@ public class BlockArcaneCake extends Block implements IEdibleBlock {
|
||||
float f = 0.0625F;
|
||||
float f1 = (float) (1 + l) / 12.0F;
|
||||
float f2 = 0.5F;
|
||||
//return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + f1), (double) y, (double) ((float) z + f), (double) ((float) (x + 1) - f), (double) ((float) y + f2 - f), (double) ((float) (z + 1) - f));
|
||||
return AxisAlignedBB.getBoundingBox((double)((float)x + f1), (double)y, (double)((float)z + f), (double)((float)(x + 1) - f), (double)((float)y + f2 - f), (double)((float)(z + 1) - f));
|
||||
// return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + f1), (double) y, (double) ((float) z + f),
|
||||
// (double) ((float) (x + 1) - f), (double) ((float) y + f2 - f), (double) ((float) (z + 1) - f));
|
||||
return AxisAlignedBB.getBoundingBox(
|
||||
(double) ((float) x + f1),
|
||||
(double) y,
|
||||
(double) ((float) z + f),
|
||||
(double) ((float) (x + 1) - f),
|
||||
(double) ((float) y + f2 - f),
|
||||
(double) ((float) (z + 1) - f));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -75,14 +84,23 @@ public class BlockArcaneCake extends Block implements IEdibleBlock {
|
||||
float f = 0.0625F;
|
||||
float f1 = (float) (1 + l) / 12.0F;
|
||||
float f2 = 0.5F;
|
||||
//return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + f1), (double) y, (double) ((float) z + f), (double) ((float) (x + 1) - f), (double) ((float) y + f2), (double) ((float) (z + 1) - f));
|
||||
return AxisAlignedBB.getBoundingBox((double)((float)x + f1), (double)y, (double)((float)z + f), (double)((float)(x + 1) - f), (double)((float)y + f2), (double)((float)(z + 1) - f));
|
||||
// return AxisAlignedBB.getAABBPool().getAABB((double) ((float) x + f1), (double) y, (double) ((float) z + f),
|
||||
// (double) ((float) (x + 1) - f), (double) ((float) y + f2), (double) ((float) (z + 1) - f));
|
||||
return AxisAlignedBB.getBoundingBox(
|
||||
(double) ((float) x + f1),
|
||||
(double) y,
|
||||
(double) ((float) z + f),
|
||||
(double) ((float) (x + 1) - f),
|
||||
(double) ((float) y + f2),
|
||||
(double) ((float) (z + 1) - f));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(int par1, int x) {
|
||||
return par1 == 1 ? this.cakeTopIcon : (par1 == 0 ? this.cakeBottomIcon : (x > 0 && par1 == 4 ? this.cakeInsideIcon : this.blockIcon));
|
||||
return par1 == 1
|
||||
? this.cakeTopIcon
|
||||
: (par1 == 0 ? this.cakeBottomIcon : (x > 0 && par1 == 4 ? this.cakeInsideIcon : this.blockIcon));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -100,7 +118,8 @@ public class BlockArcaneCake extends Block implements IEdibleBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
this.eatCakeSlice(world, x, y, z, player);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
package fox.spiteful.forbidden.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockBlackFlower extends BlockFlower {
|
||||
protected BlockBlackFlower() {
|
||||
super(1);
|
||||
|
||||
@@ -5,6 +5,8 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLeaves;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -17,19 +19,16 @@ 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
|
||||
{
|
||||
public class BlockLeavesTainted extends BlockLeaves {
|
||||
int[] decayThingy;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon opaqueIcon;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon transparentIcon;
|
||||
|
||||
public BlockLeavesTainted()
|
||||
{
|
||||
public BlockLeavesTainted() {
|
||||
super();
|
||||
setCreativeTab(Forbidden.tab);
|
||||
setLightOpacity(0);
|
||||
@@ -38,60 +37,55 @@ public class BlockLeavesTainted extends BlockLeaves
|
||||
try {
|
||||
Field mat = ReflectionHelper.findField(Block.class, "blockMaterial", "field_149764_J");
|
||||
mat.set(this, Config.taintMaterial);
|
||||
} catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int i, Random random, int j)
|
||||
{
|
||||
public Item getItemDropped(int i, Random random, int j) {
|
||||
return Item.getItemFromBlock(ForbiddenBlocks.taintSapling);
|
||||
}
|
||||
|
||||
/**
|
||||
* Chance of sapling dropping
|
||||
* Chance of sapling dropping
|
||||
*/
|
||||
@Override
|
||||
protected int func_150123_b(int p_150123_1_)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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()
|
||||
{
|
||||
public boolean isOpaqueCube() {
|
||||
return Blocks.leaves.isOpaqueCube();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return !Blocks.leaves.isOpaqueCube() ? transparentIcon : opaqueIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] func_150125_e()
|
||||
{
|
||||
public String[] func_150125_e() {
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
@@ -99,96 +93,71 @@ public class BlockLeavesTainted extends BlockLeaves
|
||||
/**
|
||||
* Ticks the block if it's been scheduled
|
||||
*/
|
||||
public void updateTick(World world, int x, int y, int z, Random rand)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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))
|
||||
{
|
||||
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)
|
||||
{
|
||||
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))
|
||||
{
|
||||
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
|
||||
{
|
||||
} else {
|
||||
this.decayThingy[(l1 + k1) * j1 + (i2 + k1) * b1 + j2 + k1] = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} 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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -200,27 +169,22 @@ public class BlockLeavesTainted extends BlockLeaves
|
||||
|
||||
l1 = this.decayThingy[k1 * j1 + k1 * b1 + k1];
|
||||
|
||||
if (l1 >= 0)
|
||||
{
|
||||
if (l1 >= 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, l & -9, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
this.removeLeaves(world, x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void removeLeaves(World world, int x, int y, int 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()
|
||||
{
|
||||
public int getBlockColor() {
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
@@ -229,8 +193,7 @@ public class BlockLeavesTainted extends BlockLeaves
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getRenderColor(int metadata)
|
||||
{
|
||||
public int getRenderColor(int metadata) {
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
@@ -239,14 +202,12 @@ public class BlockLeavesTainted extends BlockLeaves
|
||||
* 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_)
|
||||
{
|
||||
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)
|
||||
{
|
||||
public boolean isLeaves(IBlockAccess world, int x, int y, int z) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +1,53 @@
|
||||
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 java.lang.reflect.Field;
|
||||
import java.util.Random;
|
||||
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
|
||||
{
|
||||
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()
|
||||
{
|
||||
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){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
this.setHarvestLevel("axe", 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int p_149692_1_)
|
||||
{
|
||||
public int damageDropped(int p_149692_1_) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
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");
|
||||
@@ -64,41 +56,40 @@ public class BlockLogTainted extends BlockLog
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
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));
|
||||
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)
|
||||
{
|
||||
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;
|
||||
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));
|
||||
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)
|
||||
{
|
||||
protected IIcon getSideIcon(int meta) {
|
||||
return sides;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon getTopIcon(int meta)
|
||||
{
|
||||
protected IIcon getTopIcon(int meta) {
|
||||
return ends;
|
||||
}
|
||||
|
||||
public boolean canSustainLeaves(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
public boolean canSustainLeaves(IBlockAccess world, int x, int y, int z) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,9 @@ import fox.spiteful.forbidden.Forbidden;
|
||||
import net.minecraft.block.Block;
|
||||
import thaumcraft.common.config.Config;
|
||||
|
||||
public class BlockPlanksTainted extends Block{
|
||||
public class BlockPlanksTainted extends Block {
|
||||
|
||||
public BlockPlanksTainted(){
|
||||
public BlockPlanksTainted() {
|
||||
super(Config.taintMaterial);
|
||||
setCreativeTab(Forbidden.tab);
|
||||
setStepSound(Block.soundTypeWood);
|
||||
@@ -15,5 +15,4 @@ public class BlockPlanksTainted extends Block{
|
||||
setBlockTextureName("forbidden:taint_planks");
|
||||
this.setHarvestLevel("axe", 0);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,5 +20,4 @@ public class BlockResource extends Block {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package fox.spiteful.forbidden.blocks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBush;
|
||||
import net.minecraft.block.IGrowable;
|
||||
@@ -16,18 +17,15 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockRoseBush extends BlockBush implements IGrowable
|
||||
{
|
||||
public class BlockRoseBush extends BlockBush implements IGrowable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon top;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon bottom;
|
||||
|
||||
public BlockRoseBush()
|
||||
{
|
||||
public BlockRoseBush() {
|
||||
super(Material.plants);
|
||||
this.setHardness(0.0F);
|
||||
this.setStepSound(soundTypeGrass);
|
||||
@@ -39,40 +37,36 @@ public class BlockRoseBush extends BlockBush implements IGrowable
|
||||
/**
|
||||
* The type of render function that is called for this block
|
||||
*/
|
||||
public int getRenderType()
|
||||
{
|
||||
public int getRenderType() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the blocks bounds based on its current state. Args: world, x, y, z
|
||||
*/
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
|
||||
{
|
||||
public void setBlockBoundsBasedOnState(
|
||||
IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z
|
||||
*/
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z)
|
||||
{
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return super.canPlaceBlockAt(world, x, y, z) && world.isAirBlock(x, y + 1, z);
|
||||
}
|
||||
|
||||
/**
|
||||
* checks if the block can stay, if not drop as item
|
||||
*/
|
||||
protected void checkAndDropBlock(World world, int x, int y, int z)
|
||||
{
|
||||
protected void checkAndDropBlock(World world, int x, int y, int z) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(meta == 0){
|
||||
if(world.getBlock(x, y - 1, z) != this){
|
||||
if (meta == 0) {
|
||||
if (world.getBlock(x, y - 1, z) != this) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
}
|
||||
else if(meta == 1){
|
||||
if(world.getBlock(x, y + 1, z) != this){
|
||||
} else if (meta == 1) {
|
||||
if (world.getBlock(x, y + 1, z) != this) {
|
||||
dropBlockAsItem(world, x, y, z, new ItemStack(this, 1));
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
@@ -82,23 +76,21 @@ public class BlockRoseBush extends BlockBush implements IGrowable
|
||||
/**
|
||||
* Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.
|
||||
*/
|
||||
public boolean canBlockStay(World world, int x, int y, int z)
|
||||
{
|
||||
if (world.getBlock(x, y, z) != this) return super.canBlockStay(world, x, y, z); //Forge: This function is called during world gen and placement, before this block is set, so if we are not 'here' then assume it's the pre-check.
|
||||
if(world.getBlockMetadata(x, y, z) == 0)
|
||||
return world.getBlock(x, y - 1, z) == this;
|
||||
public boolean canBlockStay(World world, int x, int y, int z) {
|
||||
if (world.getBlock(x, y, z) != this)
|
||||
return super.canBlockStay(
|
||||
world, x, y,
|
||||
z); // Forge: This function is called during world gen and placement, before this block is set, so
|
||||
// if we are not 'here' then assume it's the pre-check.
|
||||
if (world.getBlockMetadata(x, y, z) == 0) return world.getBlock(x, y - 1, z) == this;
|
||||
Block block = world.getBlock(x, y - 1, z);
|
||||
return block.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this);
|
||||
}
|
||||
|
||||
public Item getItemDropped(int metadata, Random rand, int fortune)
|
||||
{
|
||||
if (metadata != 1)
|
||||
{
|
||||
public Item getItemDropped(int metadata, Random rand, int fortune) {
|
||||
if (metadata != 1) {
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
}
|
||||
@@ -107,55 +99,47 @@ public class BlockRoseBush extends BlockBush implements IGrowable
|
||||
* Gets the block's texture. Args: side, meta
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
if(meta == 1)
|
||||
return bottom;
|
||||
else
|
||||
return top;
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (meta == 1) return bottom;
|
||||
else return top;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the block is placed in the world.
|
||||
*/
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack)
|
||||
{
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
world.setBlock(x, y, z, this, 1, 2);
|
||||
world.setBlock(x, y + 1, z, this, 0, 2);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
this.top = register.registerIcon("forbidden:umbral_rose_top");
|
||||
this.bottom = register.registerIcon("forbidden:umbral_rose_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
/* Whether the plant isn't fully grown? Who knows? Aside from Mojang. */
|
||||
public boolean func_149851_a(World world, int p_149851_2_, int p_149851_3_, int p_149851_4_, boolean p_149851_5_)
|
||||
{
|
||||
public boolean func_149851_a(World world, int p_149851_2_, int p_149851_3_, int p_149851_4_, boolean p_149851_5_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
/* Whether it can accept bonemeal? Who knows? Aside from Mojang. */
|
||||
public boolean func_149852_a(World p_149852_1_, Random p_149852_2_, int p_149852_3_, int p_149852_4_, int p_149852_5_)
|
||||
{
|
||||
public boolean func_149852_a(
|
||||
World p_149852_1_, Random p_149852_2_, int p_149852_3_, int p_149852_4_, int p_149852_5_) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
/* What happens when the block is bonemealed? Maybe? Fuck Obfuscation. */
|
||||
public void func_149853_b(World world, Random rand, int x, int y, int z)
|
||||
{
|
||||
public void func_149853_b(World world, Random rand, int x, int y, int z) {
|
||||
spreadFlowers(world, x, y, z, rand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
if (!world.isRemote && rand.nextInt(10) <= 2)
|
||||
spreadFlowers(world, x, y, z, rand);
|
||||
if (!world.isRemote && rand.nextInt(10) <= 2) spreadFlowers(world, x, y, z, rand);
|
||||
}
|
||||
|
||||
public void spreadFlowers(World world, int x, int y, int z, Random rand) {
|
||||
@@ -183,5 +167,4 @@ public class BlockRoseBush extends BlockBush implements IGrowable
|
||||
world.setBlock(i1, j1, k1, ForbiddenBlocks.blackFlower, 0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
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 java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSapling;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -14,28 +16,21 @@ 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
|
||||
{
|
||||
public class BlockSaplingTainted extends BlockSapling {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon icon;
|
||||
|
||||
public BlockSaplingTainted()
|
||||
{
|
||||
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){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@@ -44,16 +39,13 @@ public class BlockSaplingTainted extends BlockSapling
|
||||
* Grow the tree
|
||||
*/
|
||||
@Override
|
||||
public void func_149878_d(World world, int x, int y, int z, Random rand)
|
||||
{
|
||||
if(!world.isRemote)
|
||||
{
|
||||
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))
|
||||
{
|
||||
if (!tree.generate(world, rand, x, y, z)) {
|
||||
world.setBlock(x, y, z, this, meta, 2);
|
||||
}
|
||||
}
|
||||
@@ -61,28 +53,24 @@ public class BlockSaplingTainted extends BlockSapling
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list)
|
||||
{
|
||||
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)
|
||||
{
|
||||
public Item getItemDropped(int wut, Random random, int yeah) {
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
icon = register.registerIcon("forbidden:sapling_taint");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ package fox.spiteful.forbidden.blocks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -10,16 +11,13 @@ 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(){
|
||||
public BlockStoneTainted() {
|
||||
super(Config.taintMaterial);
|
||||
setHardness(2.0F);
|
||||
setResistance(10.0F);
|
||||
@@ -30,31 +28,25 @@ public class BlockStoneTainted extends Block {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
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;
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if (metadata == 0) return smooth;
|
||||
else return brick;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metadata)
|
||||
{
|
||||
public int damageDropped(int metadata) {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list)
|
||||
{
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
list.add(new ItemStack(item, 1, 1));
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package fox.spiteful.forbidden.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import fox.spiteful.forbidden.tiles.TileEntityWrathCage;
|
||||
import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -17,12 +20,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWrathCage extends BlockContainer {
|
||||
protected BlockWrathCage() {
|
||||
super(Material.iron);
|
||||
@@ -49,14 +46,13 @@ public class BlockWrathCage extends BlockContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(
|
||||
World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
ItemStack held = player.getCurrentEquippedItem();
|
||||
if (held != null && held.getItem() == ForbiddenItems.mobCrystal) {
|
||||
NBTTagCompound nbttagcompound = held.getTagCompound();
|
||||
if (nbttagcompound == null)
|
||||
return false;
|
||||
if(!nbttagcompound.hasKey("mob"))
|
||||
return false;
|
||||
if (nbttagcompound == null) return false;
|
||||
if (!nbttagcompound.hasKey("mob")) return false;
|
||||
String string = nbttagcompound.getString("mob");
|
||||
if (string != null) {
|
||||
if (!world.isRemote) {
|
||||
@@ -80,8 +76,7 @@ public class BlockWrathCage extends BlockContainer {
|
||||
}
|
||||
} else if (held != null && held.getItem() == ForbiddenItems.fork && Config.wrathCost > 0) {
|
||||
TileEntityWrathCage spawner = (TileEntityWrathCage) world.getTileEntity(x, y, z);
|
||||
if (++spawner.mode > 2)
|
||||
spawner.mode = 0;
|
||||
if (++spawner.mode > 2) spawner.mode = 0;
|
||||
player.swingItem();
|
||||
}
|
||||
return false;
|
||||
@@ -101,13 +96,13 @@ public class BlockWrathCage extends BlockContainer {
|
||||
String mob = spawner.getSpawnerLogic().getEntityNameToSpawn();
|
||||
crystal.stackTagCompound.setString("mob", mob);
|
||||
|
||||
EntityItem entityitem = new EntityItem(world, (double) ((float) x + f), (double) ((float) y + f1), (double) ((float) z + f2), crystal);
|
||||
EntityItem entityitem = new EntityItem(
|
||||
world, (double) ((float) x + f), (double) ((float) y + f1), (double) ((float) z + f2), crystal);
|
||||
|
||||
entityitem.motionX = (double) ((float) world.rand.nextGaussian() * 0.05F);
|
||||
entityitem.motionY = (double) ((float) world.rand.nextGaussian() * 0.05F + 0.2F);
|
||||
entityitem.motionZ = (double) ((float) world.rand.nextGaussian() * 0.05F);
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
|
||||
}
|
||||
|
||||
super.onBlockPreDestroy(world, x, y, z, side);
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package fox.spiteful.forbidden.blocks;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import fox.spiteful.forbidden.tiles.TileEntityWrathCage;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ForbiddenBlocks {
|
||||
public static Block arcaneCake;
|
||||
public static Block blackFlower;
|
||||
@@ -35,8 +34,9 @@ public class ForbiddenBlocks {
|
||||
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");
|
||||
taintSapling =
|
||||
GameRegistry.registerBlock(new BlockSaplingTainted().setBlockName("TaintSapling"), "TaintSapling");
|
||||
|
||||
taintStone = GameRegistry.registerBlock(new BlockStoneTainted(), ItemBlockStoneTainted.class, "TaintBlock");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,19 +5,18 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBlockStoneTainted extends ItemBlock {
|
||||
public ItemBlockStoneTainted(Block block){
|
||||
public ItemBlockStoneTainted(Block block) {
|
||||
super(block);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int meta)
|
||||
{
|
||||
public int getMetadata(int meta) {
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
return "tile.TaintStone_" + (itemStack.getItemDamage() == 0 ? "Smooth" : "Brick");
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
package fox.spiteful.forbidden.client;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry;
|
||||
import fox.spiteful.forbidden.CommonProxy;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.tiles.TileEntityWrathCage;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class ClientProxy extends CommonProxy {
|
||||
@@ -13,7 +12,8 @@ public class ClientProxy extends CommonProxy {
|
||||
@Override
|
||||
public void registerRenderInfo() {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWrathCage.class, new TileEntityWrathCageRenderer());
|
||||
VillagerRegistry.instance().registerVillagerSkin(Config.hereticID, new ResourceLocation("forbidden", "textures/models/heretic.png"));
|
||||
VillagerRegistry.instance()
|
||||
.registerVillagerSkin(
|
||||
Config.hereticID, new ResourceLocation("forbidden", "textures/models/heretic.png"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,19 @@
|
||||
package fox.spiteful.forbidden.client;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.tiles.TileEntityWrathCage;
|
||||
import fox.spiteful.forbidden.tiles.WrathSpawnerLogic;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityWrathCageRenderer extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityWrathCage(TileEntityWrathCage wrathCage, double x, double z, double par6, float par8) {
|
||||
if (!wrathCage.getSpawnerLogic().isMobSet())
|
||||
return;
|
||||
if (!wrathCage.getSpawnerLogic().isMobSet()) return;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) z, (float) par6 + 0.5F);
|
||||
renderMob(wrathCage.getSpawnerLogic(), x, z, par6, par8);
|
||||
@@ -29,15 +26,22 @@ public class TileEntityWrathCageRenderer extends TileEntitySpecialRenderer {
|
||||
if (entity != null) {
|
||||
entity.setWorld(spawnLogic.getSpawnerWorld());
|
||||
float f1 = 0.4375F;
|
||||
if (spawnLogic.getEntityNameToSpawn().equals("Ghast"))
|
||||
f1 = 0.1F;
|
||||
else if (spawnLogic.getEntityNameToSpawn().equals("Slime") || spawnLogic.getEntityNameToSpawn().equals("ThaumSlime"))
|
||||
f1 = 0.4F;
|
||||
else if (spawnLogic.getEntityNameToSpawn().equals("Enderman"))
|
||||
f1 = 0.3F;
|
||||
if (spawnLogic.getEntityNameToSpawn().equals("Ghast")) f1 = 0.1F;
|
||||
else if (spawnLogic.getEntityNameToSpawn().equals("Slime")
|
||||
|| spawnLogic.getEntityNameToSpawn().equals("ThaumSlime")) f1 = 0.4F;
|
||||
else if (spawnLogic.getEntityNameToSpawn().equals("Enderman")) f1 = 0.3F;
|
||||
GL11.glTranslatef(0.0F, 0.4F, 0.0F);
|
||||
if (!spawnLogic.getSpawnerWorld().isBlockIndirectlyGettingPowered(spawnLogic.getSpawnerX(), spawnLogic.getSpawnerY(), spawnLogic.getSpawnerZ()))
|
||||
GL11.glRotatef((float) (spawnLogic.field_98284_d + (spawnLogic.field_98287_c - spawnLogic.field_98284_d) * (double) par7) * 10.0F, 0.0F, 1.0F, 0.0F);
|
||||
if (!spawnLogic
|
||||
.getSpawnerWorld()
|
||||
.isBlockIndirectlyGettingPowered(
|
||||
spawnLogic.getSpawnerX(), spawnLogic.getSpawnerY(), spawnLogic.getSpawnerZ()))
|
||||
GL11.glRotatef(
|
||||
(float) (spawnLogic.field_98284_d
|
||||
+ (spawnLogic.field_98287_c - spawnLogic.field_98284_d) * (double) par7)
|
||||
* 10.0F,
|
||||
0.0F,
|
||||
1.0F,
|
||||
0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
|
||||
GL11.glScalef(f1, f1, f1);
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
package fox.spiteful.forbidden.compat;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemicalPotionCreationHandler;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.bindingRegistry.BindingRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.DarkAspects;
|
||||
import fox.spiteful.forbidden.DarkResearchItem;
|
||||
import fox.spiteful.forbidden.LogHandler;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import fox.spiteful.forbidden.potions.DarkPotions;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
@@ -23,12 +25,6 @@ import thaumcraft.api.crafting.IArcaneRecipe;
|
||||
import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.potions.PotionFluxTaint;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
|
||||
import fox.spiteful.forbidden.DarkResearchItem;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class BloodMagic {
|
||||
@@ -50,40 +46,260 @@ public class BloodMagic {
|
||||
Item bloodBucket = Compat.getItem("AWWayofTime", "bucketLife");
|
||||
Item kamiOrb = Compat.getItem("AWWayofTime", "transcendentBloodOrb");
|
||||
|
||||
(new DarkResearchItem("BLOODMAGIC", "FORBIDDEN", "[BM]", new AspectList(), -1, -1, 0, new ResourceLocation("alchemicalwizardry", "textures/items/SacrificialDagger.png"))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.BLOODMAGIC.1")}).setParents(new String [] {"SCHOOLS"}).setRound().setStub().setAutoUnlock().registerResearchItem();
|
||||
(new DarkResearchItem(
|
||||
"BLOODMAGIC",
|
||||
"FORBIDDEN",
|
||||
"[BM]",
|
||||
new AspectList(),
|
||||
-1,
|
||||
-1,
|
||||
0,
|
||||
new ResourceLocation("alchemicalwizardry", "textures/items/SacrificialDagger.png")))
|
||||
.setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.BLOODMAGIC.1")})
|
||||
.setParents(new String[] {"SCHOOLS"})
|
||||
.setRound()
|
||||
.setStub()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem();
|
||||
|
||||
if(Config.crossWand) {
|
||||
if (Config.crossWand) {
|
||||
|
||||
AltarRecipeRegistry.registerAltarRecipe(new ItemStack(ForbiddenItems.wandCore, 1, 3), new ItemStack(ForbiddenItems.wandCore, 1, 6), 4, 20000, 15, 20, false);
|
||||
AltarRecipeRegistry.registerAltarRecipe(
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 3),
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 6),
|
||||
4,
|
||||
20000,
|
||||
15,
|
||||
20,
|
||||
false);
|
||||
|
||||
InfusionRecipe blood_recipe = ThaumcraftApi.addInfusionCraftingRecipe("ROD_blood", new ItemStack(ForbiddenItems.wandCore, 1, 6), 2, (new AspectList()).add(Aspect.LIFE, 32).add(Aspect.MAGIC, 12).add(Aspect.WATER, 16), new ItemStack(masterOrb), new ItemStack[]{new ItemStack(magicales), new ItemStack(imbuedSlate), new ItemStack(imbuedSlate), new ItemStack(tennebrae), new ItemStack(sanctus), new ItemStack(aquasalus), new ItemStack(incendium), new ItemStack(terrae), new ItemStack(aether)});
|
||||
(new DarkResearchItem("ROD_blood", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 5).add(Aspect.WATER, 4).add(Aspect.WEAPON, 3), -1, -3, 3, new ItemStack(ForbiddenItems.wandCore, 1, 3))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_blood.1"), new ResearchPage(blood_recipe), new ResearchPage("forbidden.research_page.ROD_blood.2")}).setParents(new String[]{"ROD_silverwood", "INFUSION", "BLOODMAGIC"}).setConcealed().registerResearchItem();
|
||||
InfusionRecipe blood_recipe = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"ROD_blood",
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 6),
|
||||
2,
|
||||
(new AspectList())
|
||||
.add(Aspect.LIFE, 32)
|
||||
.add(Aspect.MAGIC, 12)
|
||||
.add(Aspect.WATER, 16),
|
||||
new ItemStack(masterOrb),
|
||||
new ItemStack[] {
|
||||
new ItemStack(magicales),
|
||||
new ItemStack(imbuedSlate),
|
||||
new ItemStack(imbuedSlate),
|
||||
new ItemStack(tennebrae),
|
||||
new ItemStack(sanctus),
|
||||
new ItemStack(aquasalus),
|
||||
new ItemStack(incendium),
|
||||
new ItemStack(terrae),
|
||||
new ItemStack(aether)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"ROD_blood",
|
||||
"FORBIDDEN",
|
||||
"[BM]",
|
||||
(new AspectList())
|
||||
.add(Aspect.LIFE, 5)
|
||||
.add(Aspect.WATER, 4)
|
||||
.add(Aspect.WEAPON, 3),
|
||||
-1,
|
||||
-3,
|
||||
3,
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 3)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.ROD_blood.1"),
|
||||
new ResearchPage(blood_recipe),
|
||||
new ResearchPage("forbidden.research_page.ROD_blood.2")
|
||||
})
|
||||
.setParents(new String[] {"ROD_silverwood", "INFUSION", "BLOODMAGIC"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("ROD_blood", 2);
|
||||
|
||||
IArcaneRecipe blood_staff = ThaumcraftApi.addArcaneCraftingRecipe("ROD_blood_staff", new ItemStack(ForbiddenItems.wandCore, 1, 9), (new AspectList()).add(Aspect.ENTROPY, 26).add(Aspect.FIRE, 26).add(Aspect.WATER, 26).add(Aspect.AIR, 26).add(Aspect.EARTH, 26).add(Aspect.ORDER, 26), new Object[]{"__D", "_B_", "B__", Character.valueOf('B'), new ItemStack(ForbiddenItems.wandCore, 1, 3), Character.valueOf('D'), new ItemStack(demonShard)});
|
||||
(new DarkResearchItem("ROD_blood_staff", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 8).add(Aspect.WATER, 7).add(Aspect.WEAPON, 6), -3, -2, 2, new ItemStack(ForbiddenItems.wandCore, 1, 9))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_blood_staff.1"), new ResearchPage(blood_staff)}).setParents(new String[]{"ROD_silverwood_staff", "ROD_blood"}).setSpecial().setConcealed().registerResearchItem();
|
||||
|
||||
InfusionRecipe alchemical_recipe = ThaumcraftApi.addInfusionCraftingRecipe("CAP_alchemical", new ItemStack(ForbiddenItems.wandCap, 1, 0), 3, (new AspectList()).add(Aspect.LIFE, 12).add(Aspect.WATER, 6), ItemApi.getItem("itemWandCap", 1), new ItemStack[] { new ItemStack(magicales), new ItemStack(magicales), new ItemStack(magicales) });
|
||||
(new DarkResearchItem("CAP_alchemical", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 4).add(Aspect.TOOL, 1).add(Aspect.WATER, 3), -3, -3, 2, new ItemStack(ForbiddenItems.wandCap, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.CAP_alchemical.1"), new ResearchPage(alchemical_recipe) }).setParents(new String[] { "ROD_blood", "CAP_gold" }).setSecondary().setConcealed().registerResearchItem();
|
||||
IArcaneRecipe blood_staff = ThaumcraftApi.addArcaneCraftingRecipe(
|
||||
"ROD_blood_staff",
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 9),
|
||||
(new AspectList())
|
||||
.add(Aspect.ENTROPY, 26)
|
||||
.add(Aspect.FIRE, 26)
|
||||
.add(Aspect.WATER, 26)
|
||||
.add(Aspect.AIR, 26)
|
||||
.add(Aspect.EARTH, 26)
|
||||
.add(Aspect.ORDER, 26),
|
||||
new Object[] {
|
||||
"__D",
|
||||
"_B_",
|
||||
"B__",
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 3),
|
||||
Character.valueOf('D'),
|
||||
new ItemStack(demonShard)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"ROD_blood_staff",
|
||||
"FORBIDDEN",
|
||||
"[BM]",
|
||||
(new AspectList())
|
||||
.add(Aspect.LIFE, 8)
|
||||
.add(Aspect.WATER, 7)
|
||||
.add(Aspect.WEAPON, 6),
|
||||
-3,
|
||||
-2,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 9)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.ROD_blood_staff.1"), new ResearchPage(blood_staff)
|
||||
})
|
||||
.setParents(new String[] {"ROD_silverwood_staff", "ROD_blood"})
|
||||
.setSpecial()
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
InfusionRecipe alchemical_recipe = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"CAP_alchemical",
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 0),
|
||||
3,
|
||||
(new AspectList()).add(Aspect.LIFE, 12).add(Aspect.WATER, 6),
|
||||
ItemApi.getItem("itemWandCap", 1),
|
||||
new ItemStack[] {new ItemStack(magicales), new ItemStack(magicales), new ItemStack(magicales)});
|
||||
(new DarkResearchItem(
|
||||
"CAP_alchemical",
|
||||
"FORBIDDEN",
|
||||
"[BM]",
|
||||
(new AspectList())
|
||||
.add(Aspect.LIFE, 4)
|
||||
.add(Aspect.TOOL, 1)
|
||||
.add(Aspect.WATER, 3),
|
||||
-3,
|
||||
-3,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.CAP_alchemical.1"),
|
||||
new ResearchPage(alchemical_recipe)
|
||||
})
|
||||
.setParents(new String[] {"ROD_blood", "CAP_gold"})
|
||||
.setSecondary()
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
}
|
||||
|
||||
IArcaneRecipe bloodwell_recipe = ThaumcraftApi.addShapelessArcaneCraftingRecipe("BLOODWELL", new ItemStack(ForbiddenItems.bloodwell, 1, 0), (new AspectList()).add(Aspect.WATER, 10).add(Aspect.EARTH, 10), new Object[] { new ItemStack(Items.feather, 1, 0), new ItemStack(bloodBucket, 1, 0), new ItemStack(Items.glass_bottle, 1, 0), new ItemStack(crapOrb, 1, 0) });
|
||||
(new DarkResearchItem("BLOODWELL", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 5).add(Aspect.MIND, 4).add(Aspect.SENSES, 3), 1, -1, 1, new ItemStack(ForbiddenItems.bloodwell, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.BLOODWELL.1"), new ResearchPage(bloodwell_recipe) }).setParents(new String[] { "BLOODMAGIC" }).registerResearchItem();
|
||||
IArcaneRecipe bloodwell_recipe = ThaumcraftApi.addShapelessArcaneCraftingRecipe(
|
||||
"BLOODWELL",
|
||||
new ItemStack(ForbiddenItems.bloodwell, 1, 0),
|
||||
(new AspectList()).add(Aspect.WATER, 10).add(Aspect.EARTH, 10),
|
||||
new Object[] {
|
||||
new ItemStack(Items.feather, 1, 0),
|
||||
new ItemStack(bloodBucket, 1, 0),
|
||||
new ItemStack(Items.glass_bottle, 1, 0),
|
||||
new ItemStack(crapOrb, 1, 0)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"BLOODWELL",
|
||||
"FORBIDDEN",
|
||||
"[BM]",
|
||||
(new AspectList())
|
||||
.add(Aspect.LIFE, 5)
|
||||
.add(Aspect.MIND, 4)
|
||||
.add(Aspect.SENSES, 3),
|
||||
1,
|
||||
-1,
|
||||
1,
|
||||
new ItemStack(ForbiddenItems.bloodwell, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.BLOODWELL.1"), new ResearchPage(bloodwell_recipe)
|
||||
})
|
||||
.setParents(new String[] {"BLOODMAGIC"})
|
||||
.registerResearchItem();
|
||||
|
||||
InfusionRecipe blood_rapier = ThaumcraftApi.addInfusionCraftingRecipe("BLOODRAPIER", new ItemStack(ForbiddenItems.bloodRapier, 1, 0), 8, (new AspectList()).add(Aspect.LIFE, 18).add(Aspect.HUNGER, 32).add(Aspect.WEAPON, 8), ItemApi.getItem("itemSwordVoid", 0), new ItemStack[] { new ItemStack(ConfigItems.itemResource, 1, 12), new ItemStack(ForbiddenItems.deadlyShards, 1, 0), new ItemStack(ForbiddenItems.gluttonyShard, 1, 0), new ItemStack(Items.feather), new ItemStack(ConfigItems.itemResource, 1, 6) });
|
||||
(new DarkResearchItem("BLOODRAPIER", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 16).add(Aspect.HUNGER, 12).add(Aspect.WEAPON, 12).add(Aspect.MAGIC, 12), 1, -2, 3, new ItemStack(ForbiddenItems.bloodRapier, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.BLOODRAPIER.1"), new ResearchPage(blood_rapier) }).setParents(new String[] { "BLOODMAGIC", "INFUSION", "VOIDMETAL" }).setConcealed().registerResearchItem();
|
||||
InfusionRecipe blood_rapier = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"BLOODRAPIER",
|
||||
new ItemStack(ForbiddenItems.bloodRapier, 1, 0),
|
||||
8,
|
||||
(new AspectList())
|
||||
.add(Aspect.LIFE, 18)
|
||||
.add(Aspect.HUNGER, 32)
|
||||
.add(Aspect.WEAPON, 8),
|
||||
ItemApi.getItem("itemSwordVoid", 0),
|
||||
new ItemStack[] {
|
||||
new ItemStack(ConfigItems.itemResource, 1, 12),
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, 0),
|
||||
new ItemStack(ForbiddenItems.gluttonyShard, 1, 0),
|
||||
new ItemStack(Items.feather),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 6)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"BLOODRAPIER",
|
||||
"FORBIDDEN",
|
||||
"[BM]",
|
||||
(new AspectList())
|
||||
.add(Aspect.LIFE, 16)
|
||||
.add(Aspect.HUNGER, 12)
|
||||
.add(Aspect.WEAPON, 12)
|
||||
.add(Aspect.MAGIC, 12),
|
||||
1,
|
||||
-2,
|
||||
3,
|
||||
new ItemStack(ForbiddenItems.bloodRapier, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.BLOODRAPIER.1"), new ResearchPage(blood_rapier)
|
||||
})
|
||||
.setParents(new String[] {"BLOODMAGIC", "INFUSION", "VOIDMETAL"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("BLOODRAPIER", 2);
|
||||
ThaumcraftApi.addWarpToItem(new ItemStack(ForbiddenItems.bloodRapier), 2);
|
||||
|
||||
InfusionRecipe eldritch_orb = ThaumcraftApi.addInfusionCraftingRecipe("ELDRITCHORB", new ItemStack(ForbiddenItems.bloodOrb, 1, 0), 2, (new AspectList()).add(Aspect.LIFE, 64).add(Aspect.ELDRITCH, 48).add(Aspect.DARKNESS, 32).add(Aspect.VOID, 64), new ItemStack(kamiOrb), new ItemStack[] { new ItemStack(ConfigItems.itemEldritchObject, 1, 3), new ItemStack(ConfigItems.itemEldritchObject, 1, 0), new ItemStack(ConfigItems.itemShard, 1, 6), new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(Items.nether_star), new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(ConfigItems.itemResource, 1, 16), new ItemStack(ConfigItems.itemShard, 1, 6), new ItemStack(ConfigItems.itemEldritchObject, 1, 0) });
|
||||
(new DarkResearchItem("ELDRITCHORB", "FORBIDDEN", "[BM]", (new AspectList()).add(Aspect.LIFE, 24).add(Aspect.VOID, 32).add(Aspect.CRYSTAL, 24).add(Aspect.ELDRITCH, 12), 1, -3, 4, new ItemStack(ForbiddenItems.bloodOrb, 1, 0))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.ELDRITCHORB.1"), new ResearchPage(eldritch_orb) }).setParents(new String[] { "BLOODMAGIC", "INFUSION", "PRIMPEARL", "VOIDMETAL" }).setConcealed().setSpecial().registerResearchItem();
|
||||
InfusionRecipe eldritch_orb = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"ELDRITCHORB",
|
||||
new ItemStack(ForbiddenItems.bloodOrb, 1, 0),
|
||||
2,
|
||||
(new AspectList())
|
||||
.add(Aspect.LIFE, 64)
|
||||
.add(Aspect.ELDRITCH, 48)
|
||||
.add(Aspect.DARKNESS, 32)
|
||||
.add(Aspect.VOID, 64),
|
||||
new ItemStack(kamiOrb),
|
||||
new ItemStack[] {
|
||||
new ItemStack(ConfigItems.itemEldritchObject, 1, 3),
|
||||
new ItemStack(ConfigItems.itemEldritchObject, 1, 0),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 16),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 16),
|
||||
new ItemStack(Items.nether_star),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 16),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 16),
|
||||
new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
new ItemStack(ConfigItems.itemEldritchObject, 1, 0)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"ELDRITCHORB",
|
||||
"FORBIDDEN",
|
||||
"[BM]",
|
||||
(new AspectList())
|
||||
.add(Aspect.LIFE, 24)
|
||||
.add(Aspect.VOID, 32)
|
||||
.add(Aspect.CRYSTAL, 24)
|
||||
.add(Aspect.ELDRITCH, 12),
|
||||
1,
|
||||
-3,
|
||||
4,
|
||||
new ItemStack(ForbiddenItems.bloodOrb, 1, 0)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.ELDRITCHORB.1"), new ResearchPage(eldritch_orb)
|
||||
})
|
||||
.setParents(new String[] {"BLOODMAGIC", "INFUSION", "PRIMPEARL", "VOIDMETAL"})
|
||||
.setConcealed()
|
||||
.setSpecial()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("ELDRITCHORB", 3);
|
||||
ThaumcraftApi.addWarpToItem(new ItemStack(ForbiddenItems.bloodOrb), 5);
|
||||
|
||||
BindingRegistry.registerRecipe(new ItemStack(ForbiddenItems.boundwell, 1, 0), new ItemStack(ForbiddenItems.crystalwell, 1, 0));
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ConfigItems.itemResource, 1, 11), PotionFluxTaint.instance.getId(), 450);
|
||||
AlchemicalPotionCreationHandler.addPotion(new ItemStack(ForbiddenItems.resource, 1, 3), DarkPotions.bloodSeal.getId(), 1200);
|
||||
BindingRegistry.registerRecipe(
|
||||
new ItemStack(ForbiddenItems.boundwell, 1, 0), new ItemStack(ForbiddenItems.crystalwell, 1, 0));
|
||||
AlchemicalPotionCreationHandler.addPotion(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 11), PotionFluxTaint.instance.getId(), 450);
|
||||
AlchemicalPotionCreationHandler.addPotion(
|
||||
new ItemStack(ForbiddenItems.resource, 1, 3), DarkPotions.bloodSeal.getId(), 1200);
|
||||
|
||||
Rituals.registerRitual("SpiteSanity", 1, 20000, new RitualSanity(), "Plea of Delayed Insanity");
|
||||
|
||||
@@ -99,28 +315,65 @@ public class BloodMagic {
|
||||
list = (new AspectList()).add(Aspect.LIFE, 16).add(Aspect.MAGIC, 8).add(Aspect.CRYSTAL, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(masterOrb, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
list = (new AspectList()).add(Aspect.LIFE, 16).add(DarkAspects.NETHER, 8).add(Aspect.CRYSTAL, 4).add(Aspect.FIRE, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1).add(Aspect.EARTH, 1).add(Aspect.LIGHT, 1).add(Aspect.DARKNESS, 1);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.LIFE, 16)
|
||||
.add(DarkAspects.NETHER, 8)
|
||||
.add(Aspect.CRYSTAL, 4)
|
||||
.add(Aspect.FIRE, 1)
|
||||
.add(Aspect.WATER, 1)
|
||||
.add(Aspect.AIR, 1)
|
||||
.add(Aspect.EARTH, 1)
|
||||
.add(Aspect.LIGHT, 1)
|
||||
.add(Aspect.DARKNESS, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(demonShard, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
list = (new AspectList()).add(Aspect.LIFE, 32).add(DarkAspects.NETHER, 4).add(Aspect.MAGIC, 8).add(Aspect.CRYSTAL, 4);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.LIFE, 32)
|
||||
.add(DarkAspects.NETHER, 4)
|
||||
.add(Aspect.MAGIC, 8)
|
||||
.add(Aspect.CRYSTAL, 4);
|
||||
aspectBloodItem("archmageBloodOrb", OreDictionary.WILDCARD_VALUE, list);
|
||||
|
||||
list = (new AspectList()).add(Aspect.LIFE, 32).add(DarkAspects.NETHER, 16).add(Aspect.MAGIC, 16).add(Aspect.CRYSTAL, 16);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.LIFE, 32)
|
||||
.add(DarkAspects.NETHER, 16)
|
||||
.add(Aspect.MAGIC, 16)
|
||||
.add(Aspect.CRYSTAL, 16);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(kamiOrb, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
list = (new AspectList()).add(Aspect.ELDRITCH, 5).add(Aspect.WEAPON, 5).add(DarkAspects.WRATH, 5).add(Aspect.POISON, 1);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.ELDRITCH, 5)
|
||||
.add(Aspect.WEAPON, 5)
|
||||
.add(DarkAspects.WRATH, 5)
|
||||
.add(Aspect.POISON, 1);
|
||||
aspectBloodItem("energySword", OreDictionary.WILDCARD_VALUE, list);
|
||||
|
||||
list = (new AspectList()).add(Aspect.ELDRITCH, 5).add(Aspect.WEAPON, 6).add(DarkAspects.WRATH, 6).add(Aspect.POISON, 1);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.ELDRITCH, 5)
|
||||
.add(Aspect.WEAPON, 6)
|
||||
.add(DarkAspects.WRATH, 6)
|
||||
.add(Aspect.POISON, 1);
|
||||
aspectBloodItem("energyBlaster", OreDictionary.WILDCARD_VALUE, list);
|
||||
|
||||
list = (new AspectList()).add(Aspect.ELDRITCH, 6).add(Aspect.MINE, 5).add(DarkAspects.WRATH, 4).add(Aspect.TRAP, 4);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.ELDRITCH, 6)
|
||||
.add(Aspect.MINE, 5)
|
||||
.add(DarkAspects.WRATH, 4)
|
||||
.add(Aspect.TRAP, 4);
|
||||
aspectBloodItem("boundPickaxe", OreDictionary.WILDCARD_VALUE, list);
|
||||
|
||||
list = (new AspectList()).add(Aspect.ELDRITCH, 4).add(Aspect.TOOL, 5).add(DarkAspects.WRATH, 2).add(Aspect.TRAP, 2);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.ELDRITCH, 4)
|
||||
.add(Aspect.TOOL, 5)
|
||||
.add(DarkAspects.WRATH, 2)
|
||||
.add(Aspect.TRAP, 2);
|
||||
aspectBloodItem("boundShovel", OreDictionary.WILDCARD_VALUE, list);
|
||||
|
||||
list = (new AspectList()).add(Aspect.ELDRITCH, 6).add(Aspect.TOOL, 5).add(DarkAspects.WRATH, 4).add(Aspect.TRAP, 4);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.ELDRITCH, 6)
|
||||
.add(Aspect.TOOL, 5)
|
||||
.add(DarkAspects.WRATH, 4)
|
||||
.add(Aspect.TRAP, 4);
|
||||
aspectBloodItem("boundAxe", OreDictionary.WILDCARD_VALUE, list);
|
||||
|
||||
list = (new AspectList()).add(Aspect.METAL, 8).add(Aspect.VOID, 1).add(Aspect.LIFE, 4);
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package fox.spiteful.forbidden.compat;
|
||||
|
||||
import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import fox.spiteful.forbidden.*;
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -17,10 +20,6 @@ import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
|
||||
public class Compat {
|
||||
public static boolean tt = false;
|
||||
@@ -34,8 +33,7 @@ public class Compat {
|
||||
public static boolean ee3 = false;
|
||||
|
||||
public static void initiate() {
|
||||
if(!Config.crossMod)
|
||||
return;
|
||||
if (!Config.crossMod) return;
|
||||
tt = Config.tt && Loader.isModLoaded("ThaumicTinkerer");
|
||||
kami = tt && Loader.isModLoaded("ThaumicTinkererKami");
|
||||
natura = Loader.isModLoaded("Natura");
|
||||
@@ -54,7 +52,9 @@ public class Compat {
|
||||
if (tt) {
|
||||
if (!kami) {
|
||||
try {
|
||||
kami = Class.forName("thaumic.tinkerer.common.core.handler.ConfigHandler").getField("enableKami").getBoolean(null);
|
||||
kami = Class.forName("thaumic.tinkerer.common.core.handler.ConfigHandler")
|
||||
.getField("enableKami")
|
||||
.getBoolean(null);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
@@ -62,30 +62,48 @@ public class Compat {
|
||||
if (kami) {
|
||||
try {
|
||||
Item kamiResource = getItem("ThaumicTinkerer", "kamiResource");
|
||||
list = new AspectList().add(DarkAspects.NETHER, 2).add(Aspect.MAGIC, 1).add(Aspect.CRYSTAL, 1);
|
||||
list = new AspectList()
|
||||
.add(DarkAspects.NETHER, 2)
|
||||
.add(Aspect.MAGIC, 1)
|
||||
.add(Aspect.CRYSTAL, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(kamiResource, 1, 6), list);
|
||||
list = new AspectList().add(Aspect.ELDRITCH, 2).add(Aspect.MAGIC, 1).add(Aspect.CRYSTAL, 1);
|
||||
list = new AspectList()
|
||||
.add(Aspect.ELDRITCH, 2)
|
||||
.add(Aspect.MAGIC, 1)
|
||||
.add(Aspect.CRYSTAL, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(kamiResource, 1, 7), list);
|
||||
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.INFO, e, "Forbidden Magic doesn't have Thaumic Tinkerer's nose.");
|
||||
kami = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (natura) {
|
||||
try {
|
||||
list = (new AspectList()).add(Aspect.BEAST, 2).add(DarkAspects.NETHER, 4).add(DarkAspects.SLOTH, 2);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.BEAST, 2)
|
||||
.add(DarkAspects.NETHER, 4)
|
||||
.add(DarkAspects.SLOTH, 2);
|
||||
ThaumcraftApi.registerEntityTag("Natura.Imp", list);
|
||||
list = (new AspectList()).add(Aspect.BEAST, 3).add(Aspect.FIRE, 3).add(DarkAspects.NETHER, 2);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.BEAST, 3)
|
||||
.add(Aspect.FIRE, 3)
|
||||
.add(DarkAspects.NETHER, 2);
|
||||
ThaumcraftApi.registerEntityTag("Natura.HeatscarSpider", list);
|
||||
ThaumcraftApi.registerEntityTag("Natura.FlameSpider", list);
|
||||
list = (new AspectList()).add(Aspect.BEAST, 1).add(Aspect.FIRE, 2).add(DarkAspects.NETHER, 1);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.BEAST, 1)
|
||||
.add(Aspect.FIRE, 2)
|
||||
.add(DarkAspects.NETHER, 1);
|
||||
ThaumcraftApi.registerEntityTag("Natura.BabyHeatscarSpider", list);
|
||||
ThaumcraftApi.registerEntityTag("Natura.FlameSpiderBaby", list);
|
||||
list = (new AspectList()).add(Aspect.BEAST, 2).add(Aspect.FIRE, 4).add(DarkAspects.NETHER, 2).add(Aspect.ENTROPY, 4);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.BEAST, 2)
|
||||
.add(Aspect.FIRE, 4)
|
||||
.add(DarkAspects.NETHER, 2)
|
||||
.add(Aspect.ENTROPY, 4);
|
||||
ThaumcraftApi.registerEntityTag("Natura.NitroCreeper", list);
|
||||
|
||||
i = GameRegistry.findItemStack("Natura", "Dark Tree", 1);
|
||||
@@ -98,7 +116,7 @@ public class Compat {
|
||||
|
||||
i = GameRegistry.findItemStack("Natura", "soil.tainted", 1);
|
||||
if (i != null) {
|
||||
//list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(i.getItem(), 1, 0));
|
||||
// list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(i.getItem(), 1, 0));
|
||||
list = new AspectList().add(Aspect.EARTH, 1);
|
||||
list.add(DarkAspects.NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
@@ -106,7 +124,7 @@ public class Compat {
|
||||
|
||||
i = GameRegistry.findItemStack("Natura", "heatsand", 1);
|
||||
if (i != null) {
|
||||
//list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(i.getItem(), 1, 0));
|
||||
// list = ThaumcraftApiHelper.getObjectAspects(new ItemStack(i.getItem(), 1, 0));
|
||||
list = new AspectList().add(Aspect.FIRE, 1).add(Aspect.EARTH, 1);
|
||||
list.add(DarkAspects.NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
@@ -114,9 +132,16 @@ public class Compat {
|
||||
|
||||
i = GameRegistry.findItemStack("Natura", "rawImphide", 1);
|
||||
if (i != null) {
|
||||
list = (new AspectList()).add(Aspect.FLESH, 4).add(Aspect.HUNGER, 1).add(DarkAspects.NETHER, 1);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.FLESH, 4)
|
||||
.add(Aspect.HUNGER, 1)
|
||||
.add(DarkAspects.NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, 0), list);
|
||||
list = (new AspectList()).add(Aspect.FLESH, 4).add(Aspect.POISON, 2).add(Aspect.FIRE, 2).add(DarkAspects.NETHER, 1);
|
||||
list = (new AspectList())
|
||||
.add(Aspect.FLESH, 4)
|
||||
.add(Aspect.POISON, 2)
|
||||
.add(Aspect.FIRE, 2)
|
||||
.add(DarkAspects.NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(i.getItem(), 1, 1), list);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -137,19 +162,121 @@ public class Compat {
|
||||
try {
|
||||
Class amItems = Class.forName("am2.items.ItemsCommonProxy");
|
||||
Class amBlocks = Class.forName("am2.blocks.BlocksCommonProxy");
|
||||
Item essence = (Item)(amItems.getField("essence").get(null));
|
||||
Item amOre = (Item)(amItems.getField("itemOre").get(null));
|
||||
Block witchwood = (Block)(amBlocks.getField("witchwoodLog").get(null));
|
||||
Item essence = (Item) (amItems.getField("essence").get(null));
|
||||
Item amOre = (Item) (amItems.getField("itemOre").get(null));
|
||||
Block witchwood = (Block) (amBlocks.getField("witchwoodLog").get(null));
|
||||
|
||||
InfusionRecipe witchwood_recipe = ThaumcraftApi.addInfusionCraftingRecipe("ROD_witchwood", new ItemStack(ForbiddenItems.wandCore, 1, 4), 5, (new AspectList()).add(Aspect.MAGIC, 16).add(Aspect.EARTH, 9).add(Aspect.WATER, 9).add(Aspect.FIRE, 9).add(Aspect.AIR, 9), new ItemStack(witchwood), new ItemStack[]{new ItemStack(essence, 1, 0), new ItemStack(amOre, 1, 3), new ItemStack(essence, 1, 1), new ItemStack(essence, 1, 2), new ItemStack(essence, 1, 3), new ItemStack(essence, 1, 4), new ItemStack(amOre, 1, 6), new ItemStack(amOre, 1, 7), new ItemStack(amOre, 1, 2)});
|
||||
(new DarkResearchItem("ROD_witchwood", "FORBIDDEN", "[AM2]", (new AspectList()).add(Aspect.MAGIC, 6).add(Aspect.TREE, 5).add(Aspect.MIND, 4), -3, 1, 3, new ItemStack(ForbiddenItems.wandCore, 1, 4))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_witchwood.1"), new ResearchPage(witchwood_recipe)}).setParents(new String[]{ "SCHOOLS", "ROD_silverwood", "INFUSION" }).setConcealed().registerResearchItem();
|
||||
InfusionRecipe witchwood_recipe = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"ROD_witchwood",
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 4),
|
||||
5,
|
||||
(new AspectList())
|
||||
.add(Aspect.MAGIC, 16)
|
||||
.add(Aspect.EARTH, 9)
|
||||
.add(Aspect.WATER, 9)
|
||||
.add(Aspect.FIRE, 9)
|
||||
.add(Aspect.AIR, 9),
|
||||
new ItemStack(witchwood),
|
||||
new ItemStack[] {
|
||||
new ItemStack(essence, 1, 0),
|
||||
new ItemStack(amOre, 1, 3),
|
||||
new ItemStack(essence, 1, 1),
|
||||
new ItemStack(essence, 1, 2),
|
||||
new ItemStack(essence, 1, 3),
|
||||
new ItemStack(essence, 1, 4),
|
||||
new ItemStack(amOre, 1, 6),
|
||||
new ItemStack(amOre, 1, 7),
|
||||
new ItemStack(amOre, 1, 2)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"ROD_witchwood",
|
||||
"FORBIDDEN",
|
||||
"[AM2]",
|
||||
(new AspectList())
|
||||
.add(Aspect.MAGIC, 6)
|
||||
.add(Aspect.TREE, 5)
|
||||
.add(Aspect.MIND, 4),
|
||||
-3,
|
||||
1,
|
||||
3,
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 4)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.ROD_witchwood.1"),
|
||||
new ResearchPage(witchwood_recipe)
|
||||
})
|
||||
.setParents(new String[] {"SCHOOLS", "ROD_silverwood", "INFUSION"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("ROD_witchwood", 2);
|
||||
|
||||
InfusionRecipe vinteum_recipe = ThaumcraftApi.addInfusionCraftingRecipe("CAP_vinteum", new ItemStack(ForbiddenItems.wandCap, 1, 1), 5, (new AspectList()).add(Aspect.ENERGY, 12).add(Aspect.MAGIC, 6), ItemApi.getItem("itemWandCap", 6), new ItemStack[]{new ItemStack(amOre, 1, 0), new ItemStack(amOre, 1, 0), new ItemStack(amOre, 1, 0)});
|
||||
(new DarkResearchItem("CAP_vinteum", "FORBIDDEN", "[AM2]", (new AspectList()).add(Aspect.MAGIC, 4).add(Aspect.TOOL, 1).add(Aspect.ENERGY, 2), -4, -1, 1, new ItemStack(ForbiddenItems.wandCap, 1, 1))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CAP_vinteum.1"), new ResearchPage(vinteum_recipe)}).setParents(new String[]{"ROD_witchwood", "CAP_thaumium"}).setSecondary().setConcealed().registerResearchItem();
|
||||
InfusionRecipe vinteum_recipe = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"CAP_vinteum",
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 1),
|
||||
5,
|
||||
(new AspectList()).add(Aspect.ENERGY, 12).add(Aspect.MAGIC, 6),
|
||||
ItemApi.getItem("itemWandCap", 6),
|
||||
new ItemStack[] {
|
||||
new ItemStack(amOre, 1, 0), new ItemStack(amOre, 1, 0), new ItemStack(amOre, 1, 0)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"CAP_vinteum",
|
||||
"FORBIDDEN",
|
||||
"[AM2]",
|
||||
(new AspectList())
|
||||
.add(Aspect.MAGIC, 4)
|
||||
.add(Aspect.TOOL, 1)
|
||||
.add(Aspect.ENERGY, 2),
|
||||
-4,
|
||||
-1,
|
||||
1,
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 1)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.CAP_vinteum.1"), new ResearchPage(vinteum_recipe)
|
||||
})
|
||||
.setParents(new String[] {"ROD_witchwood", "CAP_thaumium"})
|
||||
.setSecondary()
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
IArcaneRecipe witchwood_staff = ThaumcraftApi.addArcaneCraftingRecipe("ROD_witchwood_staff", new ItemStack(ForbiddenItems.wandCore, 1, 10), (new AspectList()).add(Aspect.ENTROPY, 26).add(Aspect.FIRE, 26).add(Aspect.WATER, 26).add(Aspect.AIR, 26).add(Aspect.EARTH, 26).add(Aspect.ORDER, 26), new Object[]{"__D", "_B_", "B__", Character.valueOf('B'), new ItemStack(ForbiddenItems.wandCore, 1, 4), Character.valueOf('D'), new ItemStack(essence, 1, 10)});
|
||||
(new DarkResearchItem("ROD_witchwood_staff", "FORBIDDEN", "[AM2]", (new AspectList()).add(Aspect.MAGIC, 8).add(Aspect.MIND, 7).add(Aspect.TOOL, 6), -3, -1, 2, new ItemStack(ForbiddenItems.wandCore, 1, 10))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_witchwood_staff.1"), new ResearchPage(witchwood_staff)}).setParents(new String[]{"ROD_silverwood_staff", "ROD_witchwood"}).setSpecial().setConcealed().registerResearchItem();
|
||||
IArcaneRecipe witchwood_staff = ThaumcraftApi.addArcaneCraftingRecipe(
|
||||
"ROD_witchwood_staff",
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 10),
|
||||
(new AspectList())
|
||||
.add(Aspect.ENTROPY, 26)
|
||||
.add(Aspect.FIRE, 26)
|
||||
.add(Aspect.WATER, 26)
|
||||
.add(Aspect.AIR, 26)
|
||||
.add(Aspect.EARTH, 26)
|
||||
.add(Aspect.ORDER, 26),
|
||||
new Object[] {
|
||||
"__D",
|
||||
"_B_",
|
||||
"B__",
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 4),
|
||||
Character.valueOf('D'),
|
||||
new ItemStack(essence, 1, 10)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"ROD_witchwood_staff",
|
||||
"FORBIDDEN",
|
||||
"[AM2]",
|
||||
(new AspectList())
|
||||
.add(Aspect.MAGIC, 8)
|
||||
.add(Aspect.MIND, 7)
|
||||
.add(Aspect.TOOL, 6),
|
||||
-3,
|
||||
-1,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 10)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.ROD_witchwood_staff.1"),
|
||||
new ResearchPage(witchwood_staff)
|
||||
})
|
||||
.setParents(new String[] {"ROD_silverwood_staff", "ROD_witchwood"})
|
||||
.setSpecial()
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.INFO, e, "Forbidden Magic was slain by a Hecate.");
|
||||
am2 = false;
|
||||
@@ -159,34 +286,49 @@ public class Compat {
|
||||
if (botan) {
|
||||
try {
|
||||
ForbiddenBotany.flowerPowerHippymancy();
|
||||
}
|
||||
catch (Throwable e){
|
||||
} catch (Throwable e) {
|
||||
LogHandler.log(Level.INFO, e, "Forbidden Magic: Botania? Do you wanna build a snowman?");
|
||||
botan = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(ee3){
|
||||
if(Config.emc){
|
||||
if (ee3) {
|
||||
if (Config.emc) {
|
||||
try {
|
||||
for(int x = 0;x < 6;x++) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemShard, 1, x), 256);
|
||||
for (int x = 0; x < 6; x++) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemShard, 1, x), 256);
|
||||
}
|
||||
//EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemShard, 1, 6), 354);
|
||||
//EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 0), 83);
|
||||
//EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 1), 459);
|
||||
//EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 2), 272);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 3), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 4), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 6), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 7), 112);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 8), 2056);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 9), 5120);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 11), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 12), 32);
|
||||
//EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 14), 354);
|
||||
//EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 15), 5986);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 18), 227.556F);
|
||||
// EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemShard, 1, 6),
|
||||
// 354);
|
||||
// EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 0),
|
||||
// 83);
|
||||
// EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 1),
|
||||
// 459);
|
||||
// EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1, 2),
|
||||
// 272);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 3), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 4), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 6), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 7), 112);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 8), 2056);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 9), 5120);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 11), 32);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 12), 32);
|
||||
// EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1,
|
||||
// 14), 354);
|
||||
// EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigItems.itemResource, 1,
|
||||
// 15), 5986);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigItems.itemResource, 1, 18), 227.556F);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(ConfigItems.itemZombieBrain, 1024);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(ConfigItems.itemWispEssence, 1024);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(ConfigItems.itemManaBean, 32);
|
||||
@@ -202,47 +344,69 @@ public class Compat {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(ConfigItems.itemHelmetCultistRobe, 1536);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(ConfigItems.itemLegsCultistRobe, 2048);
|
||||
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 2), 392);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 3), 392);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), 264);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 7), 264);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 11), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 12), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 14), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 15), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCustomPlant, 1, 0), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCustomPlant, 1, 1), 256);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCustomPlant, 1, 2), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCustomPlant, 1, 3), 768);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCustomPlant, 1, 5), 16);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockMetalDevice, 1, 0), 1792);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockTable, 1, 0), 28);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockTable, 1, 15), 28);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockEldritch, 1, 4), 4);
|
||||
for(int x = 0;x < 7;x++) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockCrystal, 1, x), 1536);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 0), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 2), 392);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 3), 392);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 6), 264);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 7), 264);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 11), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 12), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 14), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCosmeticSolid, 1, 15), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCustomPlant, 1, 0), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCustomPlant, 1, 1), 256);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCustomPlant, 1, 2), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCustomPlant, 1, 3), 768);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCustomPlant, 1, 5), 16);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockMetalDevice, 1, 0), 1792);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockTable, 1, 0), 28);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockTable, 1, 15), 28);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockEldritch, 1, 4), 4);
|
||||
for (int x = 0; x < 7; x++) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockCrystal, 1, x), 1536);
|
||||
}
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockMagicalLog, 1, 1), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockMagicalLeaves, 1, 0), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ConfigBlocks.blockMagicalLeaves, 1, 1), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockMagicalLog, 1, 1), 64);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockMagicalLeaves, 1, 0), 1);
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ConfigBlocks.blockMagicalLeaves, 1, 1), 1);
|
||||
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(ForbiddenBlocks.starBlock, 221184);
|
||||
|
||||
for(int x = 0;x < 7;x++) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ForbiddenItems.deadlyShards, 1, x), 256);
|
||||
for (int x = 0; x < 7; x++) {
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ForbiddenItems.deadlyShards, 1, x), 256);
|
||||
}
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(new ItemStack(ForbiddenItems.gluttonyShard, 1), 256);
|
||||
}
|
||||
catch(Throwable e){
|
||||
EnergyValueRegistryProxy.addPreAssignedEnergyValue(
|
||||
new ItemStack(ForbiddenItems.gluttonyShard, 1), 256);
|
||||
} catch (Throwable e) {
|
||||
LogHandler.log(Level.INFO, e, "Forbidden Magic appears to be having trouble with EE3, eh?");
|
||||
ee3 = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(special){
|
||||
if (special) {
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialCaveSpider", Aspect.POISON);
|
||||
Config.spawnerMobs.put("SpecialMobs.BabyCaveSpider", Aspect.POISON);
|
||||
Config.spawnerMobs.put("SpecialMobs.FlyingCaveSpider", Aspect.POISON);
|
||||
@@ -292,10 +456,8 @@ public class Compat {
|
||||
Config.spawnerMobs.put("SpecialMobs.VampirePigZombie", Aspect.GREED);
|
||||
|
||||
Aspect silver;
|
||||
if(Config.silverfishEmeralds)
|
||||
silver = Aspect.GREED;
|
||||
else
|
||||
silver = Aspect.BEAST;
|
||||
if (Config.silverfishEmeralds) silver = Aspect.GREED;
|
||||
else silver = Aspect.BEAST;
|
||||
|
||||
Config.spawnerMobs.put("SpecialMobs.SpecialSilverfish", silver);
|
||||
Config.spawnerMobs.put("SpecialMobs.BlindingSilverfish", silver);
|
||||
@@ -336,10 +498,9 @@ public class Compat {
|
||||
Config.spawnerMobs.put("SpecialMobs.GiantZombie", Aspect.FLESH);
|
||||
Config.spawnerMobs.put("SpecialMobs.HungryZombie", Aspect.FLESH);
|
||||
Config.spawnerMobs.put("SpecialMobs.PlagueZombie", Aspect.FLESH);
|
||||
|
||||
}
|
||||
|
||||
if(twilight){
|
||||
if (twilight) {
|
||||
Config.spawnerMobs.put("TwilightForest.Wild Boar", Aspect.BEAST);
|
||||
Config.spawnerMobs.put("TwilightForest.Bighorn Sheep", Aspect.CLOTH);
|
||||
Config.spawnerMobs.put("TwilightForest.Wild Deer", Aspect.BEAST);
|
||||
@@ -361,10 +522,8 @@ public class Compat {
|
||||
Config.spawnerMobs.put("TwilightForest.Minoshroom", Aspect.PLANT);
|
||||
Config.spawnerMobs.put("TwilightForest.Fire Beetle", Aspect.FIRE);
|
||||
Config.spawnerMobs.put("TwilightForest.Slime Beetle", Aspect.SLIME);
|
||||
if(!Config.noLust)
|
||||
Config.spawnerMobs.put("TwilightForest.Pinch Beetle", DarkAspects.LUST);
|
||||
else
|
||||
Config.spawnerMobs.put("TwilightForest.Pinch Beetle", Aspect.BEAST);
|
||||
if (!Config.noLust) Config.spawnerMobs.put("TwilightForest.Pinch Beetle", DarkAspects.LUST);
|
||||
else Config.spawnerMobs.put("TwilightForest.Pinch Beetle", Aspect.BEAST);
|
||||
Config.spawnerMobs.put("TwilightForest.Maze Slime", Aspect.SLIME);
|
||||
Config.spawnerMobs.put("TwilightForest.Mist Wolf", Aspect.BEAST);
|
||||
Config.spawnerMobs.put("TwilightForest.King Spider", DarkAspects.PRIDE);
|
||||
@@ -379,19 +538,17 @@ public class Compat {
|
||||
Config.spawnerMobs.put("TwilightForest.Yeti", Aspect.COLD);
|
||||
Config.spawnerMobs.put("TwilightForest.WinterWolf", Aspect.COLD);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Item getItem(String mod, String item) throws ItemNotFoundException {
|
||||
Item target = GameRegistry.findItem(mod, item);
|
||||
if(target == null)
|
||||
throw new ItemNotFoundException(mod, item);
|
||||
if (target == null) throw new ItemNotFoundException(mod, item);
|
||||
return target;
|
||||
}
|
||||
|
||||
public static class ItemNotFoundException extends Exception {
|
||||
public ItemNotFoundException(String mod, String item){
|
||||
public ItemNotFoundException(String mod, String item) {
|
||||
super("Unable to find item " + item + " in mod " + mod + "! Are you using the correct version of the mod?");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +1,34 @@
|
||||
package fox.spiteful.forbidden.compat;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.subtile.SubTileEntity;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import vazkii.botania.api.subtile.SubTileGenerating;
|
||||
import vazkii.botania.api.subtile.signature.BasicSignature;
|
||||
import vazkii.botania.api.subtile.signature.SubTileSignature;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import vazkii.botania.api.subtile.signature.BasicSignature;
|
||||
|
||||
public class DarkSignature extends BasicSignature {
|
||||
IIcon icon;
|
||||
|
||||
public DarkSignature(String name){
|
||||
public DarkSignature(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister reg){
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
icon = reg.registerIcon("forbidden:" + getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconForStack(ItemStack item){
|
||||
public IIcon getIconForStack(ItemStack item) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedNameForStack(ItemStack item){
|
||||
public String getUnlocalizedNameForStack(ItemStack item) {
|
||||
return "darkflower." + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedLoreTextForStack(ItemStack item){
|
||||
public String getUnlocalizedLoreTextForStack(ItemStack item) {
|
||||
return "tile.darkflower." + getName() + ".lore";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import fox.spiteful.forbidden.tiles.SubTileBloodthorn;
|
||||
import fox.spiteful.forbidden.tiles.SubTileEuclidaisy;
|
||||
import fox.spiteful.forbidden.tiles.SubTileTainthistle;
|
||||
import fox.spiteful.forbidden.tiles.SubTileWhisperweed;
|
||||
import java.lang.reflect.Field;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -28,13 +29,9 @@ import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
|
||||
public class ForbiddenBotany {
|
||||
public static void flowerPowerHippymancy(){
|
||||
public static void flowerPowerHippymancy() {
|
||||
try {
|
||||
Item rune = Compat.getItem("Botania", "rune");
|
||||
Item resource = Compat.getItem("Botania", "manaResource");
|
||||
@@ -48,48 +45,262 @@ public class ForbiddenBotany {
|
||||
Class stupidLib = Class.forName("vazkii.botania.common.lib.LibOreDict");
|
||||
Field nugget = stupidLib.getDeclaredField("MANASTEEL_NUGGET");
|
||||
|
||||
}
|
||||
catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
LogHandler.log(Level.INFO, "Somebody's using an outdated version of Botania.");
|
||||
|
||||
CraftingManager.getInstance().addRecipe(new ItemStack(resource, 1, 0), new Object[] { "###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 2) });
|
||||
CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 2), new Object[] { "#", Character.valueOf('#'), new ItemStack(resource, 1, 0) });
|
||||
CraftingManager.getInstance().addRecipe(new ItemStack(resource, 1, 0), new Object[] {
|
||||
"###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 2)
|
||||
});
|
||||
CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 2), new Object[] {
|
||||
"#", Character.valueOf('#'), new ItemStack(resource, 1, 0)
|
||||
});
|
||||
|
||||
CraftingManager.getInstance().addRecipe(new ItemStack(resource, 1, 7), new Object[] { "###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 4) });
|
||||
CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 4), new Object[] { "#", Character.valueOf('#'), new ItemStack(resource, 1, 7) });
|
||||
CraftingManager.getInstance().addRecipe(new ItemStack(resource, 1, 7), new Object[] {
|
||||
"###", "###", "###", Character.valueOf('#'), new ItemStack(ForbiddenItems.resource, 1, 4)
|
||||
});
|
||||
CraftingManager.getInstance().addRecipe(new ItemStack(ForbiddenItems.resource, 9, 4), new Object[] {
|
||||
"#", Character.valueOf('#'), new ItemStack(resource, 1, 7)
|
||||
});
|
||||
}
|
||||
|
||||
OreDictionary.registerOre("nuggetManasteel", new ItemStack(ForbiddenItems.resource, 1, 2));
|
||||
OreDictionary.registerOre("nuggetElvenElementium", new ItemStack(ForbiddenItems.resource, 1, 4));
|
||||
|
||||
(new DarkResearchItem("BOTANY", "FORBIDDEN", "[B]", new AspectList(), -3, 3, 0, new ItemStack(lexicon))).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.BOTANY.1")}).setParents(new String [] {"SCHOOLS"}).setRound().setStub().setAutoUnlock().registerResearchItem();
|
||||
(new DarkResearchItem("BOTANY", "FORBIDDEN", "[B]", new AspectList(), -3, 3, 0, new ItemStack(lexicon)))
|
||||
.setPages(new ResearchPage[] {new ResearchPage("forbidden.research_page.BOTANY.1")})
|
||||
.setParents(new String[] {"SCHOOLS"})
|
||||
.setRound()
|
||||
.setStub()
|
||||
.setAutoUnlock()
|
||||
.registerResearchItem();
|
||||
|
||||
if(Config.crossWand) {
|
||||
if (Config.crossWand) {
|
||||
|
||||
InfusionRecipe livingwood_rod = ThaumcraftApi.addInfusionCraftingRecipe("ROD_livingwood", new ItemStack(ForbiddenItems.wandCore, 1, 8), 3, (new AspectList()).add(Aspect.MAGIC, 16).add(Aspect.TREE, 32).add(Aspect.LIFE, 16).add(Aspect.SENSES, 8).add(Aspect.PLANT, 8), new ItemStack(livingLog), new ItemStack[]{new ItemStack(resource, 1, 2), new ItemStack(rune, 1, 8), new ItemStack(rune, 1, 0), new ItemStack(rune, 1, 1), new ItemStack(rune, 1, 2), new ItemStack(rune, 1, 3), new ItemStack(rune, 1, 4), new ItemStack(rune, 1, 5), new ItemStack(rune, 1, 6), new ItemStack(rune, 1, 7)});
|
||||
(new DarkResearchItem("ROD_livingwood", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.TREE, 8).add(Aspect.MAGIC, 4).add(Aspect.PLANT, 6), -1, 3, 3, new ItemStack(ForbiddenItems.wandCore, 1, 7))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_livingwood.1"), new ResearchPage(livingwood_rod)}).setParents(new String[]{"BOTANY", "ROD_silverwood", "INFUSION"}).setConcealed().registerResearchItem();
|
||||
InfusionRecipe livingwood_rod = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"ROD_livingwood",
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 8),
|
||||
3,
|
||||
(new AspectList())
|
||||
.add(Aspect.MAGIC, 16)
|
||||
.add(Aspect.TREE, 32)
|
||||
.add(Aspect.LIFE, 16)
|
||||
.add(Aspect.SENSES, 8)
|
||||
.add(Aspect.PLANT, 8),
|
||||
new ItemStack(livingLog),
|
||||
new ItemStack[] {
|
||||
new ItemStack(resource, 1, 2),
|
||||
new ItemStack(rune, 1, 8),
|
||||
new ItemStack(rune, 1, 0),
|
||||
new ItemStack(rune, 1, 1),
|
||||
new ItemStack(rune, 1, 2),
|
||||
new ItemStack(rune, 1, 3),
|
||||
new ItemStack(rune, 1, 4),
|
||||
new ItemStack(rune, 1, 5),
|
||||
new ItemStack(rune, 1, 6),
|
||||
new ItemStack(rune, 1, 7)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"ROD_livingwood",
|
||||
"FORBIDDEN",
|
||||
"[B]",
|
||||
(new AspectList())
|
||||
.add(Aspect.TREE, 8)
|
||||
.add(Aspect.MAGIC, 4)
|
||||
.add(Aspect.PLANT, 6),
|
||||
-1,
|
||||
3,
|
||||
3,
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 7)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.ROD_livingwood.1"),
|
||||
new ResearchPage(livingwood_rod)
|
||||
})
|
||||
.setParents(new String[] {"BOTANY", "ROD_silverwood", "INFUSION"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
ThaumcraftApi.addWarpToResearch("ROD_livingwood", 2);
|
||||
BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ForbiddenItems.wandCore, 1, 7), new ItemStack(ForbiddenItems.wandCore, 1, 8), 10000);
|
||||
BotaniaAPI.registerManaInfusionRecipe(
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 7),
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 8),
|
||||
10000);
|
||||
|
||||
IArcaneRecipe manasteel_cap = ThaumcraftApi.addArcaneCraftingRecipe("CAP_manasteel", new ItemStack(ForbiddenItems.wandCap, 1, 4), (new AspectList()).add(Aspect.ENTROPY, 6).add(Aspect.FIRE, 6).add(Aspect.WATER, 6).add(Aspect.AIR, 6).add(Aspect.EARTH, 6).add(Aspect.ORDER, 6), new Object[]{"NNN", "N N", Character.valueOf('N'), "nuggetManasteel"});
|
||||
(new DarkResearchItem("CAP_manasteel", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.AURA, 6).add(Aspect.MAGIC, 4).add(Aspect.METAL, 4), 1, 2, 2, new ItemStack(ForbiddenItems.wandCap, 1, 3))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CAP_manasteel.1"), new ResearchPage(manasteel_cap)}).setParents(new String[]{"ROD_livingwood"}).setSecondary().setConcealed().registerResearchItem();
|
||||
BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ForbiddenItems.wandCap, 1, 3), new ItemStack(ForbiddenItems.wandCap, 1, 4), 1000);
|
||||
IArcaneRecipe manasteel_cap = ThaumcraftApi.addArcaneCraftingRecipe(
|
||||
"CAP_manasteel",
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 4),
|
||||
(new AspectList())
|
||||
.add(Aspect.ENTROPY, 6)
|
||||
.add(Aspect.FIRE, 6)
|
||||
.add(Aspect.WATER, 6)
|
||||
.add(Aspect.AIR, 6)
|
||||
.add(Aspect.EARTH, 6)
|
||||
.add(Aspect.ORDER, 6),
|
||||
new Object[] {"NNN", "N N", Character.valueOf('N'), "nuggetManasteel"});
|
||||
(new DarkResearchItem(
|
||||
"CAP_manasteel",
|
||||
"FORBIDDEN",
|
||||
"[B]",
|
||||
(new AspectList())
|
||||
.add(Aspect.AURA, 6)
|
||||
.add(Aspect.MAGIC, 4)
|
||||
.add(Aspect.METAL, 4),
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 3)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.CAP_manasteel.1"), new ResearchPage(manasteel_cap)
|
||||
})
|
||||
.setParents(new String[] {"ROD_livingwood"})
|
||||
.setSecondary()
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
BotaniaAPI.registerManaInfusionRecipe(
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 3), new ItemStack(ForbiddenItems.wandCap, 1, 4), 1000);
|
||||
|
||||
InfusionRecipe dreamwood_rod = ThaumcraftApi.addInfusionCraftingRecipe("ROD_dreamwood", new ItemStack(ForbiddenItems.wandCore, 1, 12), 3, (new AspectList()).add(Aspect.MAGIC, 16).add(Aspect.TREE, 32).add(Aspect.LIFE, 16).add(Aspect.SENSES, 8).add(Aspect.PLANT, 8), new ItemStack(dreamwood), new ItemStack[]{new ItemStack(resource, 1, 2), new ItemStack(rune, 1, 8), new ItemStack(rune, 1, 0), new ItemStack(rune, 1, 1), new ItemStack(rune, 1, 2), new ItemStack(rune, 1, 3), new ItemStack(rune, 1, 4), new ItemStack(rune, 1, 5), new ItemStack(rune, 1, 6), new ItemStack(rune, 1, 7)});
|
||||
IArcaneRecipe dreamwood_staff = ThaumcraftApi.addArcaneCraftingRecipe("ROD_dreamwood_staff", new ItemStack(ForbiddenItems.wandCore, 1, 13), (new AspectList()).add(Aspect.ENTROPY, 26).add(Aspect.FIRE, 26).add(Aspect.WATER, 26).add(Aspect.AIR, 26).add(Aspect.EARTH, 26).add(Aspect.ORDER, 26), new Object[]{"__D", "_B_", "B__", Character.valueOf('B'), new ItemStack(ForbiddenItems.wandCore, 1, 11), Character.valueOf('D'), new ItemStack(resource, 1, 9)});
|
||||
BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ForbiddenItems.wandCore, 1, 11), new ItemStack(ForbiddenItems.wandCore, 1, 12), 10000);
|
||||
(new DarkResearchItem("ROD_dreamwood_staff", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.TREE, 16).add(Aspect.MAGIC, 8).add(Aspect.ELDRITCH, 6), 1, 3, 2, new ItemStack(ForbiddenItems.wandCore, 1, 13))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.ROD_dreamwood_staff.1"), new ResearchPage(dreamwood_staff), new ResearchPage(dreamwood_rod)}).setParents(new String[]{"ROD_livingwood", "ROD_silverwood_staff"}).setSiblings(new String[]{"ROD_dreamwood"}).setConcealed().registerResearchItem();
|
||||
(new DarkResearchItem("ROD_dreamwood", "FORBIDDEN")).setVirtual().registerResearchItem();
|
||||
InfusionRecipe dreamwood_rod = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"ROD_dreamwood",
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 12),
|
||||
3,
|
||||
(new AspectList())
|
||||
.add(Aspect.MAGIC, 16)
|
||||
.add(Aspect.TREE, 32)
|
||||
.add(Aspect.LIFE, 16)
|
||||
.add(Aspect.SENSES, 8)
|
||||
.add(Aspect.PLANT, 8),
|
||||
new ItemStack(dreamwood),
|
||||
new ItemStack[] {
|
||||
new ItemStack(resource, 1, 2),
|
||||
new ItemStack(rune, 1, 8),
|
||||
new ItemStack(rune, 1, 0),
|
||||
new ItemStack(rune, 1, 1),
|
||||
new ItemStack(rune, 1, 2),
|
||||
new ItemStack(rune, 1, 3),
|
||||
new ItemStack(rune, 1, 4),
|
||||
new ItemStack(rune, 1, 5),
|
||||
new ItemStack(rune, 1, 6),
|
||||
new ItemStack(rune, 1, 7)
|
||||
});
|
||||
IArcaneRecipe dreamwood_staff = ThaumcraftApi.addArcaneCraftingRecipe(
|
||||
"ROD_dreamwood_staff",
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 13),
|
||||
(new AspectList())
|
||||
.add(Aspect.ENTROPY, 26)
|
||||
.add(Aspect.FIRE, 26)
|
||||
.add(Aspect.WATER, 26)
|
||||
.add(Aspect.AIR, 26)
|
||||
.add(Aspect.EARTH, 26)
|
||||
.add(Aspect.ORDER, 26),
|
||||
new Object[] {
|
||||
"__D",
|
||||
"_B_",
|
||||
"B__",
|
||||
Character.valueOf('B'),
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 11),
|
||||
Character.valueOf('D'),
|
||||
new ItemStack(resource, 1, 9)
|
||||
});
|
||||
BotaniaAPI.registerManaInfusionRecipe(
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 11),
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 12),
|
||||
10000);
|
||||
(new DarkResearchItem(
|
||||
"ROD_dreamwood_staff",
|
||||
"FORBIDDEN",
|
||||
"[B]",
|
||||
(new AspectList())
|
||||
.add(Aspect.TREE, 16)
|
||||
.add(Aspect.MAGIC, 8)
|
||||
.add(Aspect.ELDRITCH, 6),
|
||||
1,
|
||||
3,
|
||||
2,
|
||||
new ItemStack(ForbiddenItems.wandCore, 1, 13)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.ROD_dreamwood_staff.1"),
|
||||
new ResearchPage(dreamwood_staff),
|
||||
new ResearchPage(dreamwood_rod)
|
||||
})
|
||||
.setParents(new String[] {"ROD_livingwood", "ROD_silverwood_staff"})
|
||||
.setSiblings(new String[] {"ROD_dreamwood"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
(new DarkResearchItem("ROD_dreamwood", "FORBIDDEN"))
|
||||
.setVirtual()
|
||||
.registerResearchItem();
|
||||
|
||||
IArcaneRecipe elementium_cap_inert = ThaumcraftApi.addArcaneCraftingRecipe("CAP_elementium", new ItemStack(ForbiddenItems.wandCap, 1, 6), (new AspectList()).add(Aspect.ENTROPY, 27).add(Aspect.FIRE, 27).add(Aspect.WATER, 27).add(Aspect.AIR, 27).add(Aspect.EARTH, 27).add(Aspect.ORDER, 27), new Object[]{"NNN", "N N", Character.valueOf('N'), "nuggetElvenElementium"});
|
||||
InfusionRecipe elementium_cap = ThaumcraftApi.addInfusionCraftingRecipe("CAP_elementium", new ItemStack(ForbiddenItems.wandCap, 1, 5), 1, (new AspectList()).add(Aspect.EARTH, 18).add(Aspect.FIRE, 18).add(Aspect.WATER, 18).add(Aspect.AIR, 18), new ItemStack(ForbiddenItems.wandCap, 1, 6), new ItemStack[]{new ItemStack(resource, 1, 5), new ItemStack(rune, 1, 0), new ItemStack(rune, 1, 1), new ItemStack(rune, 1, 2), new ItemStack(rune, 1, 3)});
|
||||
(new DarkResearchItem("CAP_elementium", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.FIRE, 8).add(Aspect.MAGIC, 12).add(Aspect.WATER, 8).add(Aspect.AIR, 8).add(Aspect.EARTH, 8), 3, 3, 4, new ItemStack(ForbiddenItems.wandCap, 1, 5))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CAP_elementium.1"), new ResearchPage(elementium_cap_inert), new ResearchPage(elementium_cap)}).setParents(new String[]{"ROD_dreamwood_staff"}).setConcealed().registerResearchItem();
|
||||
IArcaneRecipe elementium_cap_inert = ThaumcraftApi.addArcaneCraftingRecipe(
|
||||
"CAP_elementium",
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 6),
|
||||
(new AspectList())
|
||||
.add(Aspect.ENTROPY, 27)
|
||||
.add(Aspect.FIRE, 27)
|
||||
.add(Aspect.WATER, 27)
|
||||
.add(Aspect.AIR, 27)
|
||||
.add(Aspect.EARTH, 27)
|
||||
.add(Aspect.ORDER, 27),
|
||||
new Object[] {"NNN", "N N", Character.valueOf('N'), "nuggetElvenElementium"});
|
||||
InfusionRecipe elementium_cap = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"CAP_elementium",
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 5),
|
||||
1,
|
||||
(new AspectList())
|
||||
.add(Aspect.EARTH, 18)
|
||||
.add(Aspect.FIRE, 18)
|
||||
.add(Aspect.WATER, 18)
|
||||
.add(Aspect.AIR, 18),
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 6),
|
||||
new ItemStack[] {
|
||||
new ItemStack(resource, 1, 5),
|
||||
new ItemStack(rune, 1, 0),
|
||||
new ItemStack(rune, 1, 1),
|
||||
new ItemStack(rune, 1, 2),
|
||||
new ItemStack(rune, 1, 3)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"CAP_elementium",
|
||||
"FORBIDDEN",
|
||||
"[B]",
|
||||
(new AspectList())
|
||||
.add(Aspect.FIRE, 8)
|
||||
.add(Aspect.MAGIC, 12)
|
||||
.add(Aspect.WATER, 8)
|
||||
.add(Aspect.AIR, 8)
|
||||
.add(Aspect.EARTH, 8),
|
||||
3,
|
||||
3,
|
||||
4,
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 5)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.CAP_elementium.1"),
|
||||
new ResearchPage(elementium_cap_inert),
|
||||
new ResearchPage(elementium_cap)
|
||||
})
|
||||
.setParents(new String[] {"ROD_dreamwood_staff"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
IRecipe terrasteel_cap = new ShapedOreRecipe(new ItemStack(ForbiddenItems.wandCap, 1, 2), new Object[]{"NNN", "N N", Character.valueOf('N'), "nuggetTerrasteel"});
|
||||
IRecipe terrasteel_cap = new ShapedOreRecipe(
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 2),
|
||||
new Object[] {"NNN", "N N", Character.valueOf('N'), "nuggetTerrasteel"});
|
||||
CraftingManager.getInstance().getRecipeList().add(terrasteel_cap);
|
||||
(new DarkResearchItem("CAP_terrasteel", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.ENERGY, 1).add(Aspect.METAL, 1), 3, 2, 1, new ItemStack(ForbiddenItems.wandCap, 1, 2))).setPages(new ResearchPage[]{new ResearchPage("forbidden.research_page.CAP_terrasteel.1"), new ResearchPage(terrasteel_cap)}).setParents(new String[]{"CAP_manasteel"}).setConcealed().setSecondary().registerResearchItem();
|
||||
|
||||
(new DarkResearchItem(
|
||||
"CAP_terrasteel",
|
||||
"FORBIDDEN",
|
||||
"[B]",
|
||||
(new AspectList()).add(Aspect.ENERGY, 1).add(Aspect.METAL, 1),
|
||||
3,
|
||||
2,
|
||||
1,
|
||||
new ItemStack(ForbiddenItems.wandCap, 1, 2)))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.CAP_terrasteel.1"),
|
||||
new ResearchPage(terrasteel_cap)
|
||||
})
|
||||
.setParents(new String[] {"CAP_manasteel"})
|
||||
.setConcealed()
|
||||
.setSecondary()
|
||||
.registerResearchItem();
|
||||
}
|
||||
|
||||
BotaniaAPI.registerSubTile("euclidaisy", SubTileEuclidaisy.class);
|
||||
@@ -103,8 +314,42 @@ public class ForbiddenBotany {
|
||||
ItemStack euclidaisy = getFlower("euclidaisy");
|
||||
SubTileEuclidaisy.lexicon.setIcon(euclidaisy);
|
||||
|
||||
InfusionRecipe euclid = ThaumcraftApi.addInfusionCraftingRecipe("EUCLIDAISY", euclidaisy, 8, (new AspectList()).add(Aspect.AURA, 8).add(Aspect.ELDRITCH, 10).add(Aspect.MAGIC, 8), new ItemStack(flower, 1, 6), new ItemStack[] { new ItemStack(ConfigItems.itemResource, 1, 14), new ItemStack(resource, 1, 1), new ItemStack(resource, 1, 6), new ItemStack(petal, 1, 6), new ItemStack(petal, 1, 6), new ItemStack(rune, 1, 12), new ItemStack(rune, 1, 11) });
|
||||
(new DarkResearchItem("EUCLIDAISY", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.PLANT, 8).add(Aspect.MAGIC, 4).add(Aspect.AURA, 12), -3, 5, 2, euclidaisy)).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.EUCLIDAISY.1"), new ResearchPage(euclid) }).setParents(new String[] { "BOTANY", "INFUSION" }).setConcealed().registerResearchItem();
|
||||
InfusionRecipe euclid = ThaumcraftApi.addInfusionCraftingRecipe(
|
||||
"EUCLIDAISY",
|
||||
euclidaisy,
|
||||
8,
|
||||
(new AspectList())
|
||||
.add(Aspect.AURA, 8)
|
||||
.add(Aspect.ELDRITCH, 10)
|
||||
.add(Aspect.MAGIC, 8),
|
||||
new ItemStack(flower, 1, 6),
|
||||
new ItemStack[] {
|
||||
new ItemStack(ConfigItems.itemResource, 1, 14),
|
||||
new ItemStack(resource, 1, 1),
|
||||
new ItemStack(resource, 1, 6),
|
||||
new ItemStack(petal, 1, 6),
|
||||
new ItemStack(petal, 1, 6),
|
||||
new ItemStack(rune, 1, 12),
|
||||
new ItemStack(rune, 1, 11)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"EUCLIDAISY",
|
||||
"FORBIDDEN",
|
||||
"[B]",
|
||||
(new AspectList())
|
||||
.add(Aspect.PLANT, 8)
|
||||
.add(Aspect.MAGIC, 4)
|
||||
.add(Aspect.AURA, 12),
|
||||
-3,
|
||||
5,
|
||||
2,
|
||||
euclidaisy))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.EUCLIDAISY.1"), new ResearchPage(euclid)
|
||||
})
|
||||
.setParents(new String[] {"BOTANY", "INFUSION"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
BotaniaAPI.registerSubTile("whisperweed", SubTileWhisperweed.class);
|
||||
BotaniaAPI.registerSubTileSignature(SubTileWhisperweed.class, new DarkSignature("whisperweed"));
|
||||
@@ -117,8 +362,44 @@ public class ForbiddenBotany {
|
||||
ItemStack whisperweed = getFlower("whisperweed");
|
||||
SubTileWhisperweed.lexicon.setIcon(whisperweed);
|
||||
|
||||
IArcaneRecipe whispercraft = ThaumcraftApi.addShapelessArcaneCraftingRecipe("WHISPERWEED", whisperweed, (new AspectList()).add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.EARTH, 10).add(Aspect.AIR, 10).add(Aspect.ORDER, 10).add(Aspect.ENTROPY, 10), new ItemStack[] { new ItemStack(Blocks.tallgrass, 1, 1), new ItemStack(resource, 1, 2), new ItemStack(resource, 1, 6), new ItemStack(ConfigItems.itemResource, 1, 9), new ItemStack(petal, 1, 7), new ItemStack(petal, 1, 10), new ItemStack(rune, 1, 14), new ItemStack(ConfigItems.itemResource, 1, 6) });
|
||||
(new DarkResearchItem("WHISPERWEED", "FORBIDDEN", "[B]", (new AspectList()).add(Aspect.PLANT, 8).add(Aspect.MIND, 10).add(Aspect.SENSES, 4), -4, 5, 1, whisperweed)).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.WHISPERWEED.1"), new ResearchPage(whispercraft) }).setParents(new String[] { "BOTANY" }).setConcealed().registerResearchItem();
|
||||
IArcaneRecipe whispercraft = ThaumcraftApi.addShapelessArcaneCraftingRecipe(
|
||||
"WHISPERWEED",
|
||||
whisperweed,
|
||||
(new AspectList())
|
||||
.add(Aspect.FIRE, 10)
|
||||
.add(Aspect.WATER, 10)
|
||||
.add(Aspect.EARTH, 10)
|
||||
.add(Aspect.AIR, 10)
|
||||
.add(Aspect.ORDER, 10)
|
||||
.add(Aspect.ENTROPY, 10),
|
||||
new ItemStack[] {
|
||||
new ItemStack(Blocks.tallgrass, 1, 1),
|
||||
new ItemStack(resource, 1, 2),
|
||||
new ItemStack(resource, 1, 6),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 9),
|
||||
new ItemStack(petal, 1, 7),
|
||||
new ItemStack(petal, 1, 10),
|
||||
new ItemStack(rune, 1, 14),
|
||||
new ItemStack(ConfigItems.itemResource, 1, 6)
|
||||
});
|
||||
(new DarkResearchItem(
|
||||
"WHISPERWEED",
|
||||
"FORBIDDEN",
|
||||
"[B]",
|
||||
(new AspectList())
|
||||
.add(Aspect.PLANT, 8)
|
||||
.add(Aspect.MIND, 10)
|
||||
.add(Aspect.SENSES, 4),
|
||||
-4,
|
||||
5,
|
||||
1,
|
||||
whisperweed))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.WHISPERWEED.1"), new ResearchPage(whispercraft)
|
||||
})
|
||||
.setParents(new String[] {"BOTANY"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
BotaniaAPI.registerSubTile("tainthistle", SubTileTainthistle.class);
|
||||
BotaniaAPI.registerSubTileSignature(SubTileTainthistle.class, new DarkSignature("tainthistle"));
|
||||
@@ -131,34 +412,70 @@ public class ForbiddenBotany {
|
||||
ItemStack tainthistle = getFlower("tainthistle");
|
||||
SubTileTainthistle.lexicon.setIcon(tainthistle);
|
||||
|
||||
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(petal, 1, 10), new ItemStack(petal, 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), -2, 5, 2, tainthistle)).setPages(new ResearchPage[] { new ResearchPage("forbidden.research_page.TAINTHISTLE.1"), new ResearchPage(thistlecraft) }).setParents(new String[] { "BOTANY", "INFUSION" }).setConcealed().registerResearchItem();
|
||||
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(petal, 1, 10),
|
||||
new ItemStack(petal, 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),
|
||||
-2,
|
||||
5,
|
||||
2,
|
||||
tainthistle))
|
||||
.setPages(new ResearchPage[] {
|
||||
new ResearchPage("forbidden.research_page.TAINTHISTLE.1"), new ResearchPage(thistlecraft)
|
||||
})
|
||||
.setParents(new String[] {"BOTANY", "INFUSION"})
|
||||
.setConcealed()
|
||||
.registerResearchItem();
|
||||
|
||||
if(Compat.bm){
|
||||
if (Compat.bm) {
|
||||
BotaniaAPI.registerSubTile("bloodthorn", SubTileBloodthorn.class);
|
||||
BotaniaAPI.registerSubTileSignature(SubTileBloodthorn.class, new DarkSignature("bloodthorn"));
|
||||
BotaniaAPI.addSubTileToCreativeMenu("bloodthorn");
|
||||
|
||||
SubTileBloodthorn.lexicon = new ForbiddenLexicon("bloodthorn", BotaniaAPI.categoryFunctionalFlowers){
|
||||
SubTileBloodthorn.lexicon = new ForbiddenLexicon("bloodthorn", BotaniaAPI.categoryFunctionalFlowers) {
|
||||
@Override
|
||||
public String getSubtitle(){
|
||||
public String getSubtitle() {
|
||||
return "[Forbidden Magic x Blood Magic x Botania]";
|
||||
}
|
||||
};
|
||||
|
||||
SubTileBloodthorn.lexicon.addPage(BotaniaAPI.internalHandler.textPage("forbidden.lexicon.bloodthorn.0"));
|
||||
SubTileBloodthorn.lexicon.addPage(
|
||||
BotaniaAPI.internalHandler.textPage("forbidden.lexicon.bloodthorn.0"));
|
||||
|
||||
ItemStack bloodthorn = getFlower("bloodthorn");
|
||||
SubTileBloodthorn.lexicon.setIcon(bloodthorn);
|
||||
try{
|
||||
AltarRecipeRegistry.registerAltarRecipe(bloodthorn, new ItemStack(flower, 1, 14), 4, 15000, 25, 50, false);
|
||||
}
|
||||
catch(Throwable e){
|
||||
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(new ItemStack(Compat.getItem("Botania", "specialFlower"), 1), (new AspectList()).add(Aspect.PLANT, 4).add(Aspect.MAGIC, 1));
|
||||
ThaumcraftApi.registerObjectTag(
|
||||
new ItemStack(Compat.getItem("Botania", "specialFlower"), 1),
|
||||
(new AspectList()).add(Aspect.PLANT, 4).add(Aspect.MAGIC, 1));
|
||||
|
||||
} catch (Throwable e) {
|
||||
LogHandler.log(Level.INFO, e, "Forbidden Magic: Botania? Do you wanna build a snowman?");
|
||||
|
||||
@@ -7,14 +7,13 @@ import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
|
||||
public class ForbiddenLexicon extends LexiconEntry implements IAddonEntry {
|
||||
|
||||
|
||||
public ForbiddenLexicon(String name, LexiconCategory category){
|
||||
public ForbiddenLexicon(String name, LexiconCategory category) {
|
||||
super(name, category);
|
||||
BotaniaAPI.addEntry(this, category);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSubtitle(){
|
||||
public String getSubtitle() {
|
||||
return "[Forbidden Magic x Botania]";
|
||||
}
|
||||
|
||||
|
||||
@@ -5,24 +5,20 @@ import WayofTime.alchemicalWizardry.api.rituals.IMasterRitualStone;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualEffect;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.lib.potions.PotionWarpWard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class RitualSanity extends RitualEffect
|
||||
{
|
||||
public class RitualSanity extends RitualEffect {
|
||||
public static final int crystallosDrain = 4;
|
||||
|
||||
@Override
|
||||
public void performEffect(IMasterRitualStone ritualStone)
|
||||
{
|
||||
public void performEffect(IMasterRitualStone ritualStone) {
|
||||
String owner = ritualStone.getOwner();
|
||||
|
||||
int currentEssence = SoulNetworkHandler.getCurrentEssence(owner);
|
||||
@@ -33,14 +29,14 @@ public class RitualSanity extends RitualEffect
|
||||
|
||||
int timeDelay = 600;
|
||||
|
||||
if (world.getWorldTime() % timeDelay != 0)
|
||||
{
|
||||
if (world.getWorldTime() % timeDelay != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean crazy = world.getWorldTime() % (timeDelay * 4) == 0;
|
||||
|
||||
boolean hasCrystallos = this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false);
|
||||
boolean hasCrystallos =
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, false);
|
||||
|
||||
int range = 15 * (hasCrystallos ? 3 : 1);
|
||||
int vertRange = 15 * (hasCrystallos ? 3 : 1);
|
||||
@@ -48,42 +44,41 @@ public class RitualSanity extends RitualEffect
|
||||
float posX = x + 0.5f;
|
||||
float posY = y + 0.5f;
|
||||
float posZ = z + 0.5f;
|
||||
List<EntityPlayer> list = world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, vertRange, range));
|
||||
List<EntityPlayer> list = world.getEntitiesWithinAABB(
|
||||
EntityPlayer.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f)
|
||||
.expand(range, vertRange, range));
|
||||
int entityCount = 0;
|
||||
|
||||
for (EntityPlayer player : list)
|
||||
{
|
||||
entityCount ++;
|
||||
for (EntityPlayer player : list) {
|
||||
entityCount++;
|
||||
}
|
||||
|
||||
int cost = this.getCostPerRefresh();
|
||||
|
||||
if (currentEssence < cost * entityCount)
|
||||
{
|
||||
if (currentEssence < cost * entityCount) {
|
||||
SoulNetworkHandler.causeNauseaToPlayer(owner);
|
||||
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
entityCount = 0;
|
||||
|
||||
for (EntityPlayer player : list)
|
||||
{
|
||||
for (EntityPlayer player : list) {
|
||||
PotionEffect effect = player.getActivePotionEffect(PotionWarpWard.instance);
|
||||
if (effect == null || effect.getDuration() <= timeDelay)
|
||||
{
|
||||
if (effect == null || effect.getDuration() <= timeDelay) {
|
||||
PotionEffect ward = new PotionEffect(PotionWarpWard.instance.id, timeDelay + 2, 0, true);
|
||||
ward.getCurativeItems().clear();
|
||||
player.addPotionEffect(ward);
|
||||
entityCount++;
|
||||
if(crazy && world.rand.nextInt(35) <= 3)
|
||||
Thaumcraft.proxy.getPlayerKnowledge().addWarpTemp(player.getDisplayName(), 1 + world.rand.nextInt(3));
|
||||
if (crazy && world.rand.nextInt(35) <= 3)
|
||||
Thaumcraft.proxy
|
||||
.getPlayerKnowledge()
|
||||
.addWarpTemp(player.getDisplayName(), 1 + world.rand.nextInt(3));
|
||||
}
|
||||
}
|
||||
|
||||
if (entityCount > 0)
|
||||
{
|
||||
if (hasCrystallos)
|
||||
{
|
||||
if (entityCount > 0) {
|
||||
if (hasCrystallos) {
|
||||
this.canDrainReagent(ritualStone, ReagentRegistry.crystallosReagent, crystallosDrain, true);
|
||||
}
|
||||
SoulNetworkHandler.syphonFromNetwork(owner, cost * entityCount);
|
||||
@@ -92,14 +87,12 @@ public class RitualSanity extends RitualEffect
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCostPerRefresh()
|
||||
{
|
||||
public int getCostPerRefresh() {
|
||||
return 15000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RitualComponent> getRitualComponentList()
|
||||
{
|
||||
public List<RitualComponent> getRitualComponentList() {
|
||||
ArrayList<RitualComponent> sanityRitual = new ArrayList();
|
||||
sanityRitual.add(new RitualComponent(4, 1, 0, RitualComponent.DUSK));
|
||||
sanityRitual.add(new RitualComponent(-4, 1, 0, RitualComponent.DUSK));
|
||||
@@ -132,4 +125,4 @@ public class RitualSanity extends RitualEffect
|
||||
|
||||
return sanityRitual;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +1,12 @@
|
||||
package fox.spiteful.forbidden.enchantments;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import java.lang.reflect.Method;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class DarkEnchantments {
|
||||
public static Enchantment cluster;
|
||||
public static Enchantment wrath;
|
||||
@@ -20,8 +18,7 @@ public class DarkEnchantments {
|
||||
public static Enchantment impact;
|
||||
|
||||
public static void hex() {
|
||||
if(!Config.enchanting)
|
||||
return;
|
||||
if (!Config.enchanting) return;
|
||||
|
||||
cluster = new EnchantmentCluster(Config.clusterEnchID);
|
||||
wrath = new EnchantmentWrath(Config.wrathEnchID);
|
||||
@@ -34,19 +31,88 @@ public class DarkEnchantments {
|
||||
|
||||
if (Compat.tt) {
|
||||
try {
|
||||
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");
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,14 +23,12 @@ public class EnchantmentCluster extends Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemMorphPickaxe)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
if (item.getItem() instanceof ItemMorphPickaxe) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,14 +25,14 @@ public class EnchantmentConsuming extends Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemSpade || item.getItem() instanceof ItemPrimalCrusher)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
if (item.getItem() instanceof ItemPickaxe
|
||||
|| item.getItem() instanceof ItemSpade
|
||||
|| item.getItem() instanceof ItemPrimalCrusher) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -29,14 +29,12 @@ public class EnchantmentCorrupting extends Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemPrimalCrusher)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemPrimalCrusher) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,11 +17,13 @@ public class EnchantmentEducational extends Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.greedy.effectId;
|
||||
return super.canApplyTogether(ench)
|
||||
&& ench.effectId != Enchantment.looting.effectId
|
||||
&& ench.effectId != DarkEnchantments.greedy.effectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,11 +27,13 @@ public class EnchantmentGreedy extends Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.educational.effectId;
|
||||
return super.canApplyTogether(ench)
|
||||
&& ench.effectId != Enchantment.looting.effectId
|
||||
&& ench.effectId != DarkEnchantments.educational.effectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,4 +36,4 @@ public class EnchantmentImpact extends Enchantment {
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,12 @@ package fox.spiteful.forbidden.enchantments;
|
||||
|
||||
import fox.spiteful.forbidden.items.tools.ItemMorphAxe;
|
||||
import fox.spiteful.forbidden.items.tools.ItemMorphPickaxe;
|
||||
import fox.spiteful.forbidden.items.tools.ItemMorphShovel;
|
||||
import fox.spiteful.forbidden.items.tools.ItemMorphSword;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnumEnchantmentType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import fox.spiteful.forbidden.items.tools.ItemMorphShovel;
|
||||
|
||||
public class EnchantmentVoid extends Enchantment {
|
||||
public EnchantmentVoid(int id) {
|
||||
super(id, 1, EnumEnchantmentType.digger);
|
||||
@@ -32,11 +31,14 @@ public class EnchantmentVoid extends Enchantment {
|
||||
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
return (item.getItem() instanceof ItemMorphPickaxe || item.getItem() instanceof ItemMorphAxe || item.getItem() instanceof ItemMorphSword || item.getItem() instanceof ItemMorphShovel);
|
||||
return (item.getItem() instanceof ItemMorphPickaxe
|
||||
|| item.getItem() instanceof ItemMorphAxe
|
||||
|| item.getItem() instanceof ItemMorphSword
|
||||
|| item.getItem() instanceof ItemMorphShovel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,13 +7,9 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.EnumCreatureAttribute;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class EnchantmentWrath extends Enchantment
|
||||
{
|
||||
public EnchantmentWrath(int id)
|
||||
{
|
||||
public class EnchantmentWrath extends Enchantment {
|
||||
public EnchantmentWrath(int id) {
|
||||
super(id, 1, EnumEnchantmentType.weapon);
|
||||
setName("wrath");
|
||||
}
|
||||
@@ -21,41 +17,33 @@ public class EnchantmentWrath extends Enchantment
|
||||
/**
|
||||
* Returns the minimal value of enchantability needed on the enchantment level passed.
|
||||
*/
|
||||
public int getMinEnchantability(int level)
|
||||
{
|
||||
public int getMinEnchantability(int level) {
|
||||
return 5 + (level - 1) * 11;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum value of enchantability nedded on the enchantment level passed.
|
||||
*/
|
||||
public int getMaxEnchantability(int level)
|
||||
{
|
||||
public int getMaxEnchantability(int level) {
|
||||
return this.getMinEnchantability(level) + 20;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the maximum level that the enchantment can have.
|
||||
*/
|
||||
public int getMaxLevel()
|
||||
{
|
||||
public int getMaxLevel() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
//Amount of bonus damage added by the enchant on hit
|
||||
public float func_152376_a(int level, EnumCreatureAttribute target)
|
||||
{
|
||||
return (float)level * 1.25F;
|
||||
// Amount of bonus damage added by the enchant on hit
|
||||
public float func_152376_a(int level, EnumCreatureAttribute target) {
|
||||
return (float) level * 1.25F;
|
||||
}
|
||||
|
||||
public boolean canApply(ItemStack stack)
|
||||
{
|
||||
public boolean canApply(ItemStack stack) {
|
||||
return stack.getItem() instanceof ItemAxe ? true : super.canApply(stack);
|
||||
}
|
||||
|
||||
//Effect that enchant does on hit
|
||||
public void func_151368_a(EntityLivingBase wut, Entity who, int level)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
// Effect that enchant does on hit
|
||||
public void func_151368_a(EntityLivingBase wut, Entity who, int level) {}
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
package fox.spiteful.forbidden.items;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import fox.spiteful.forbidden.items.baubles.*;
|
||||
import fox.spiteful.forbidden.items.scribes.*;
|
||||
import fox.spiteful.forbidden.items.tools.*;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.items.wands.*;
|
||||
import java.util.Arrays;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
@@ -22,8 +22,6 @@ import thaumcraft.api.wands.StaffRod;
|
||||
import thaumcraft.api.wands.WandCap;
|
||||
import thaumcraft.api.wands.WandRod;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ForbiddenItems {
|
||||
public static Item deadlyShards;
|
||||
public static Item gluttonyShard;
|
||||
@@ -115,38 +113,150 @@ public class ForbiddenItems {
|
||||
}
|
||||
|
||||
fork = new ItemDiabolistFork(ThaumcraftApi.toolMatThaumium).setUnlocalizedName("DiabolistFork");
|
||||
if (Config.spork)
|
||||
fork.setUnlocalizedName("DiabolistSpork");
|
||||
if (Config.spork) fork.setUnlocalizedName("DiabolistSpork");
|
||||
GameRegistry.registerItem(fork, "DiabolistFork");
|
||||
|
||||
wandCore = new ItemWandCores().setUnlocalizedName("WandCores");
|
||||
GameRegistry.registerItem(wandCore, "WandCores");
|
||||
wandCap = new ItemWandCaps().setUnlocalizedName("WandCaps");
|
||||
GameRegistry.registerItem(wandCap, "WandCaps");
|
||||
WAND_ROD_TAINTED = new WandRod("tainted", 150, new ItemStack(wandCore, 1, 0), 12, new TaintedWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_tainted.png"));
|
||||
WAND_ROD_INFERNAL = new WandRod("infernal", 150, new ItemStack(wandCore, 1, 1), 12, new InfernalWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_infernal.png"));
|
||||
WAND_ROD_NEUTRONIUM = new WandRod("neutronium", 9001, new ItemStack(Blocks.bedrock, 1), 1000, new CreativeWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_neutronium.png"));
|
||||
WAND_ROD_TAINTED = new WandRod(
|
||||
"tainted",
|
||||
150,
|
||||
new ItemStack(wandCore, 1, 0),
|
||||
12,
|
||||
new TaintedWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_tainted.png"));
|
||||
WAND_ROD_INFERNAL = new WandRod(
|
||||
"infernal",
|
||||
150,
|
||||
new ItemStack(wandCore, 1, 1),
|
||||
12,
|
||||
new InfernalWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_infernal.png"));
|
||||
WAND_ROD_NEUTRONIUM = new WandRod(
|
||||
"neutronium",
|
||||
9001,
|
||||
new ItemStack(Blocks.bedrock, 1),
|
||||
1000,
|
||||
new CreativeWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_neutronium.png"));
|
||||
WAND_ROD_NEUTRONIUM.setGlowing(true);
|
||||
WAND_ROD_BLOOD = new WandRod("blood", 100, new ItemStack(wandCore, 1, 3), 12, new BloodWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_blood.png"));
|
||||
WAND_ROD_WITCHWOOD = new WandRod("witchwood", 100, new ItemStack(wandCore, 1, 4), 12, new ManaWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_witchwood.png"));
|
||||
WAND_ROD_LIVINGWOOD = new WandRod("livingwood", 100, new ItemStack(wandCore, 1, 7), 12, new YandereWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_livingwood.png"));
|
||||
WAND_ROD_DREAMWOOD = new WandRod("dreamwood", 100, new ItemStack(wandCore, 1, 11), 12, new YandereWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_dreamwood.png"));
|
||||
WAND_ROD_EQUIVALENT = new WandRod("equivalent", 100, new ItemStack(wandCore, 1, 11), 12, new ResourceLocation("forbidden", "textures/models/wand_rod_equivalent.png"));
|
||||
WAND_ROD_PROFANE = new WandRod("profane", 50, new ItemStack(wandCore, 1, 5), 12, new ProfaneWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_profane.png"));
|
||||
WAND_ROD_PROFANED = new WandRod("profaned", 50, new ItemStack(Blocks.bedrock, 1), 1000, new ResourceLocation("forbidden", "textures/models/wand_rod_profaned.png"));
|
||||
STAFF_ROD_BLOOD = new StaffRod("blood", 50, new ItemStack(wandCore, 1, 9), 24, new BloodStaffUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_blood.png"));
|
||||
STAFF_ROD_NEUTRONIUM = new StaffRod("neutronium", 9002, new ItemStack(Blocks.bedrock, 1), 1000, new CreativeWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_neutronium.png"));
|
||||
WAND_ROD_BLOOD = new WandRod(
|
||||
"blood",
|
||||
100,
|
||||
new ItemStack(wandCore, 1, 3),
|
||||
12,
|
||||
new BloodWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_blood.png"));
|
||||
WAND_ROD_WITCHWOOD = new WandRod(
|
||||
"witchwood",
|
||||
100,
|
||||
new ItemStack(wandCore, 1, 4),
|
||||
12,
|
||||
new ManaWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_witchwood.png"));
|
||||
WAND_ROD_LIVINGWOOD = new WandRod(
|
||||
"livingwood",
|
||||
100,
|
||||
new ItemStack(wandCore, 1, 7),
|
||||
12,
|
||||
new YandereWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_livingwood.png"));
|
||||
WAND_ROD_DREAMWOOD = new WandRod(
|
||||
"dreamwood",
|
||||
100,
|
||||
new ItemStack(wandCore, 1, 11),
|
||||
12,
|
||||
new YandereWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_dreamwood.png"));
|
||||
WAND_ROD_EQUIVALENT = new WandRod(
|
||||
"equivalent",
|
||||
100,
|
||||
new ItemStack(wandCore, 1, 11),
|
||||
12,
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_equivalent.png"));
|
||||
WAND_ROD_PROFANE = new WandRod(
|
||||
"profane",
|
||||
50,
|
||||
new ItemStack(wandCore, 1, 5),
|
||||
12,
|
||||
new ProfaneWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_profane.png"));
|
||||
WAND_ROD_PROFANED = new WandRod(
|
||||
"profaned",
|
||||
50,
|
||||
new ItemStack(Blocks.bedrock, 1),
|
||||
1000,
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_profaned.png"));
|
||||
STAFF_ROD_BLOOD = new StaffRod(
|
||||
"blood",
|
||||
50,
|
||||
new ItemStack(wandCore, 1, 9),
|
||||
24,
|
||||
new BloodStaffUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_blood.png"));
|
||||
STAFF_ROD_NEUTRONIUM = new StaffRod(
|
||||
"neutronium",
|
||||
9002,
|
||||
new ItemStack(Blocks.bedrock, 1),
|
||||
1000,
|
||||
new CreativeWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_neutronium.png"));
|
||||
STAFF_ROD_NEUTRONIUM.setGlowing(true);
|
||||
STAFF_ROD_WITCHWOOD = new StaffRod("witchwood", 50, new ItemStack(wandCore, 1, 10), 24, new ManaStaffUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_witchwood.png"));
|
||||
STAFF_ROD_DREAMWOOD = new StaffRod("dreamwood", 250, new ItemStack(wandCore, 1, 13), 25, new YandereWandUpdate(), new ResourceLocation("forbidden", "textures/models/wand_rod_dreamwood.png"));
|
||||
STAFF_ROD_WITCHWOOD = new StaffRod(
|
||||
"witchwood",
|
||||
50,
|
||||
new ItemStack(wandCore, 1, 10),
|
||||
24,
|
||||
new ManaStaffUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_witchwood.png"));
|
||||
STAFF_ROD_DREAMWOOD = new StaffRod(
|
||||
"dreamwood",
|
||||
250,
|
||||
new ItemStack(wandCore, 1, 13),
|
||||
25,
|
||||
new YandereWandUpdate(),
|
||||
new ResourceLocation("forbidden", "textures/models/wand_rod_dreamwood.png"));
|
||||
STAFF_ROD_DREAMWOOD.setRunes(true);
|
||||
WAND_CAP_ORICHALCUM = new DarkWandCap("orichalcum", 0.0F, new ItemStack(Blocks.command_block, 1), 1000, new ResourceLocation("forbidden", "textures/models/wand_cap_orichalcum.png"));
|
||||
WAND_CAP_ALCHEMICAL = new DarkWandCap("alchemical", 0.9F, Arrays.asList(new Aspect[] { Aspect.WATER }), 0.8F, new ItemStack(wandCap, 1, 0), 7, new ResourceLocation("forbidden", "textures/models/wand_cap_alchemical.png"));
|
||||
WAND_CAP_VINTEUM = new DarkWandCap("vinteum", 0.9F, new ItemStack(wandCap, 1, 1), 6, new ResourceLocation("forbidden", "textures/models/wand_cap_vinteum.png"));
|
||||
WAND_CAP_MANASTEEL = new DarkWandCap("manasteel", 0.9F, new ItemStack(wandCap, 1, 3), 6, new ResourceLocation("forbidden", "textures/models/wand_cap_manasteel.png"));
|
||||
WAND_CAP_ELEMENTIUM = new DarkWandCap("elementium", 0.8F, new ItemStack(wandCap, 1, 5), 9, new ResourceLocation("forbidden", "textures/models/wand_cap_elementium.png"));
|
||||
WAND_CAP_TERRASTEEL = new DarkWandCap("terrasteel", 1.8F, new ItemStack(wandCap, 1, 2), 1, new ResourceLocation("forbidden", "textures/models/wand_cap_terrasteel.png"));
|
||||
|
||||
WAND_CAP_ORICHALCUM = new DarkWandCap(
|
||||
"orichalcum",
|
||||
0.0F,
|
||||
new ItemStack(Blocks.command_block, 1),
|
||||
1000,
|
||||
new ResourceLocation("forbidden", "textures/models/wand_cap_orichalcum.png"));
|
||||
WAND_CAP_ALCHEMICAL = new DarkWandCap(
|
||||
"alchemical",
|
||||
0.9F,
|
||||
Arrays.asList(new Aspect[] {Aspect.WATER}),
|
||||
0.8F,
|
||||
new ItemStack(wandCap, 1, 0),
|
||||
7,
|
||||
new ResourceLocation("forbidden", "textures/models/wand_cap_alchemical.png"));
|
||||
WAND_CAP_VINTEUM = new DarkWandCap(
|
||||
"vinteum",
|
||||
0.9F,
|
||||
new ItemStack(wandCap, 1, 1),
|
||||
6,
|
||||
new ResourceLocation("forbidden", "textures/models/wand_cap_vinteum.png"));
|
||||
WAND_CAP_MANASTEEL = new DarkWandCap(
|
||||
"manasteel",
|
||||
0.9F,
|
||||
new ItemStack(wandCap, 1, 3),
|
||||
6,
|
||||
new ResourceLocation("forbidden", "textures/models/wand_cap_manasteel.png"));
|
||||
WAND_CAP_ELEMENTIUM = new DarkWandCap(
|
||||
"elementium",
|
||||
0.8F,
|
||||
new ItemStack(wandCap, 1, 5),
|
||||
9,
|
||||
new ResourceLocation("forbidden", "textures/models/wand_cap_elementium.png"));
|
||||
WAND_CAP_TERRASTEEL = new DarkWandCap(
|
||||
"terrasteel",
|
||||
1.8F,
|
||||
new ItemStack(wandCap, 1, 2),
|
||||
1,
|
||||
new ResourceLocation("forbidden", "textures/models/wand_cap_terrasteel.png"));
|
||||
|
||||
resource = new ItemResource().setUnlocalizedName("FMResource");
|
||||
GameRegistry.registerItem(resource, "FMResource");
|
||||
@@ -180,10 +290,9 @@ public class ForbiddenItems {
|
||||
ridingCrop = new ItemRidingCrop(ToolMaterial.WOOD).setUnlocalizedName("RidingCrop");
|
||||
GameRegistry.registerItem(ridingCrop, "RidingCrop");
|
||||
|
||||
if(!Config.noLust) {
|
||||
if (!Config.noLust) {
|
||||
subCollar = new ItemSubCollar().setUnlocalizedName("SubCollar");
|
||||
GameRegistry.registerItem(subCollar, "SubCollar");
|
||||
|
||||
}
|
||||
|
||||
ringFood = new ItemRingNutrition().setUnlocalizedName("RingNutrition");
|
||||
@@ -197,15 +306,15 @@ public class ForbiddenItems {
|
||||
|
||||
blinkFocus = new ItemFocusBlink().setUnlocalizedName("BlinkFocus");
|
||||
GameRegistry.registerItem(blinkFocus, "BlinkFocus");
|
||||
|
||||
}
|
||||
|
||||
public static FocusUpgradeType getUpgrade(int id, ResourceLocation icon, String name, String text, AspectList aspects){
|
||||
public static FocusUpgradeType getUpgrade(
|
||||
int id, ResourceLocation icon, String name, String text, AspectList aspects) {
|
||||
if (id >= FocusUpgradeType.types.length) {
|
||||
FocusUpgradeType[] temp = new FocusUpgradeType[id+1];
|
||||
FocusUpgradeType[] temp = new FocusUpgradeType[id + 1];
|
||||
System.arraycopy(FocusUpgradeType.types, 0, temp, 0, FocusUpgradeType.types.length);
|
||||
FocusUpgradeType.types = temp;
|
||||
}
|
||||
return new FocusUpgradeType(id, icon, name, text, aspects);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package fox.spiteful.forbidden.items;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
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.Entity;
|
||||
@@ -10,18 +13,23 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemArcaneCake extends Item {
|
||||
public ItemArcaneCake() {
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World yWorld, int z, int par5, int par6, int par7, float par8, float par9, float par10) {
|
||||
public boolean onItemUse(
|
||||
ItemStack stack,
|
||||
EntityPlayer player,
|
||||
World yWorld,
|
||||
int z,
|
||||
int par5,
|
||||
int par6,
|
||||
int par7,
|
||||
float par8,
|
||||
float par9,
|
||||
float par10) {
|
||||
Block block = yWorld.getBlock(z, par5, par6);
|
||||
|
||||
if (block == Blocks.snow_layer && (yWorld.getBlockMetadata(z, par5, par6) & 7) < 1) {
|
||||
@@ -67,7 +75,13 @@ public class ItemArcaneCake extends Item {
|
||||
cake.onPostBlockPlaced(yWorld, z, par5, par6, j1);
|
||||
}
|
||||
|
||||
yWorld.playSoundEffect((double) ((float) z + 0.5F), (double) ((float) par5 + 0.5F), (double) ((float) par6 + 0.5F), block.stepSound.soundName, (block.stepSound.getVolume() + 1.0F) / 2.0F, block.stepSound.getPitch() * 0.8F);
|
||||
yWorld.playSoundEffect(
|
||||
(double) ((float) z + 0.5F),
|
||||
(double) ((float) par5 + 0.5F),
|
||||
(double) ((float) par6 + 0.5F),
|
||||
block.stepSound.soundName,
|
||||
(block.stepSound.getVolume() + 1.0F) / 2.0F,
|
||||
block.stepSound.getPitch() * 0.8F);
|
||||
--stack.stackSize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package fox.spiteful.forbidden.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -10,13 +12,8 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemDeadlyShard extends Item {
|
||||
public static final String[] vices = new String[] { "wrath", "envy", "taint", "pride", "lust", "sloth", "greed" };
|
||||
public static final String[] vices = new String[] {"wrath", "envy", "taint", "pride", "lust", "sloth", "greed"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] icons;
|
||||
@@ -26,8 +23,7 @@ public class ItemDeadlyShard extends Item {
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
if (Config.noLust)
|
||||
vices[4] = "despair";
|
||||
if (Config.noLust) vices[4] = "despair";
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -1,25 +1,23 @@
|
||||
package fox.spiteful.forbidden.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBloodOrb;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
public class ItemDivineOrb extends Item implements IBloodOrb, IBindable, IWarpingGear {
|
||||
@@ -40,15 +38,14 @@ public class ItemDivineOrb extends Item implements IBloodOrb, IBindable, IWarpin
|
||||
list.add(StatCollector.translateToLocal("tooltip.divineorb"));
|
||||
|
||||
if (!(stack.stackTagCompound == null)) {
|
||||
list.add(StatCollector.translateToLocal("tooltip.currentowner") + " " + stack.stackTagCompound.getString("ownerName"));
|
||||
list.add(StatCollector.translateToLocal("tooltip.currentowner") + " "
|
||||
+ stack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
if (!Compat.bm)
|
||||
return itemstack;
|
||||
if (!Compat.bm) return itemstack;
|
||||
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
|
||||
@@ -56,7 +53,13 @@ public class ItemDivineOrb extends Item implements IBloodOrb, IBindable, IWarpin
|
||||
double posX = player.posX;
|
||||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
world.playSoundEffect(
|
||||
(double) ((float) posX + 0.5F),
|
||||
(double) ((float) posY + 0.5F),
|
||||
(double) ((float) posZ + 0.5F),
|
||||
"random.fizz",
|
||||
0.5F,
|
||||
2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
}
|
||||
if (world.isRemote) {
|
||||
return itemstack;
|
||||
@@ -68,8 +71,7 @@ public class ItemDivineOrb extends Item implements IBloodOrb, IBindable, IWarpin
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
if(itemTag.getString("ownerName").equals(SoulNetworkHandler.getUsername(player)))
|
||||
{
|
||||
if (itemTag.getString("ownerName").equals(SoulNetworkHandler.getUsername(player))) {
|
||||
SoulNetworkHandler.setMaxOrbToMax(itemTag.getString("ownerName"), 6);
|
||||
}
|
||||
|
||||
@@ -100,45 +102,34 @@ public class ItemDivineOrb extends Item implements IBloodOrb, IBindable, IWarpin
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasContainerItem()
|
||||
{
|
||||
public boolean hasContainerItem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack)
|
||||
{
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItem(ItemStack itemStack)
|
||||
{
|
||||
public ItemStack getContainerItem(ItemStack itemStack) {
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
private void hurtPlayer(EntityPlayer user, int energySyphoned)
|
||||
{
|
||||
if (energySyphoned < 100 && energySyphoned > 0)
|
||||
{
|
||||
if (!user.capabilities.isCreativeMode)
|
||||
{
|
||||
private void hurtPlayer(EntityPlayer user, int energySyphoned) {
|
||||
if (energySyphoned < 100 && energySyphoned > 0) {
|
||||
if (!user.capabilities.isCreativeMode) {
|
||||
user.setHealth((user.getHealth() - 1));
|
||||
if (user.getHealth() <= 0.0005f)
|
||||
{
|
||||
if (user.getHealth() <= 0.0005f) {
|
||||
user.func_110142_aN().func_94547_a(new DamageSource("blooderp"), 1, 1);
|
||||
user.onDeath(new DamageSource("blooderp"));
|
||||
}
|
||||
}
|
||||
} else if (energySyphoned >= 100)
|
||||
{
|
||||
if (!user.capabilities.isCreativeMode)
|
||||
{
|
||||
for (int i = 0; i < ((energySyphoned + 99) / 100); i++)
|
||||
{
|
||||
} else if (energySyphoned >= 100) {
|
||||
if (!user.capabilities.isCreativeMode) {
|
||||
for (int i = 0; i < ((energySyphoned + 99) / 100); i++) {
|
||||
user.setHealth((user.getHealth() - 1));
|
||||
if (user.getHealth() <= 0.0005f)
|
||||
{
|
||||
if (user.getHealth() <= 0.0005f) {
|
||||
user.func_110142_aN().func_94547_a(new DamageSource("blooderp"), 1, 1);
|
||||
user.onDeath(new DamageSource("blooderp"));
|
||||
break;
|
||||
@@ -147,4 +138,4 @@ public class ItemDivineOrb extends Item implements IBloodOrb, IBindable, IWarpin
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,18 +20,19 @@ import thaumcraft.common.lib.potions.PotionThaumarhia;
|
||||
|
||||
public class ItemFruitTainted extends ItemFood {
|
||||
|
||||
public ItemFruitTainted(){
|
||||
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) {
|
||||
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")));
|
||||
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));
|
||||
}
|
||||
}
|
||||
@@ -44,10 +45,9 @@ public class ItemFruitTainted extends ItemFood {
|
||||
this.itemIcon = iconRegister.registerIcon("forbidden:taint_fruit");
|
||||
}
|
||||
|
||||
private PotionEffect getEffect(int id, int duration, boolean ambient){
|
||||
private PotionEffect getEffect(int id, int duration, boolean ambient) {
|
||||
PotionEffect potion = new PotionEffect(id, duration, 0, ambient);
|
||||
potion.getCurativeItems().clear();
|
||||
return potion;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,12 @@
|
||||
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.ItemFood;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemGluttonyShard extends ItemFood {
|
||||
IIcon icon;
|
||||
|
||||
@@ -27,4 +26,4 @@ public class ItemGluttonyShard extends ItemFood {
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package fox.spiteful.forbidden.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -13,11 +15,6 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemMobCrystal extends Item {
|
||||
|
||||
IIcon[] icons;
|
||||
@@ -34,13 +31,12 @@ public class ItemMobCrystal extends Item {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean z) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
if(nbttagcompound.hasKey("mob")) {
|
||||
if (nbttagcompound.hasKey("mob")) {
|
||||
String string = nbttagcompound.getString("mob");
|
||||
|
||||
if (string != null) {
|
||||
Aspect mobAspect = Config.spawnerMobs.get(string);
|
||||
if (mobAspect != null)
|
||||
list.add(mobAspect.getName());
|
||||
if (mobAspect != null) list.add(mobAspect.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,8 +58,7 @@ public class ItemMobCrystal extends Item {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
String string = nbttagcompound.getString("mob");
|
||||
|
||||
if (string != null)
|
||||
return icons[1];
|
||||
if (string != null) return icons[1];
|
||||
}
|
||||
|
||||
return icons[0];
|
||||
@@ -74,8 +69,7 @@ public class ItemMobCrystal extends Item {
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
if (nbttagcompound.hasKey("mob"))
|
||||
return icons[1];
|
||||
if (nbttagcompound.hasKey("mob")) return icons[1];
|
||||
}
|
||||
|
||||
return icons[0];
|
||||
@@ -98,11 +92,15 @@ public class ItemMobCrystal extends Item {
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
if(nbttagcompound.hasKey("mob")) {
|
||||
if (nbttagcompound.hasKey("mob")) {
|
||||
String string = nbttagcompound.getString("mob");
|
||||
|
||||
if (string != null)
|
||||
return ("" + StatCollector.translateToLocal("item.MobCrystal.name").replace("%s", StatCollector.translateToLocal("entity." + string + ".name"))).trim();
|
||||
return (""
|
||||
+ StatCollector.translateToLocal("item.MobCrystal.name")
|
||||
.replace(
|
||||
"%s", StatCollector.translateToLocal("entity." + string + ".name")))
|
||||
.trim();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package fox.spiteful.forbidden.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -11,10 +12,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemResource extends Item {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -47,7 +44,7 @@ public class ItemResource extends Item {
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
//int i = MathHelper.clamp_int(stack.getItemDamage(), 0, 3);
|
||||
// int i = MathHelper.clamp_int(stack.getItemDamage(), 0, 3);
|
||||
int i = stack.getItemDamage();
|
||||
return super.getUnlocalizedName() + "." + i;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.item.Item;
|
||||
|
||||
public class ItemTaintCoal extends Item {
|
||||
|
||||
public ItemTaintCoal(){
|
||||
public ItemTaintCoal() {
|
||||
super();
|
||||
setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -14,21 +15,16 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import vazkii.botania.api.item.ICosmeticAttachable;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@Optional.Interface(iface = "vazkii.botania.api.item.ICosmeticAttachable", modid = "Botania")
|
||||
public class ItemRingNutrition extends Item implements IRunicArmor, IBauble, ICosmeticAttachable {
|
||||
IIcon icon;
|
||||
|
||||
public ItemRingNutrition(){
|
||||
public ItemRingNutrition() {
|
||||
super();
|
||||
maxStackSize = 1;
|
||||
setCreativeTab(Forbidden.tab);
|
||||
@@ -46,45 +42,43 @@ public class ItemRingNutrition extends Item implements IRunicArmor, IBauble, ICo
|
||||
return icon;
|
||||
}
|
||||
|
||||
public BaubleType getBaubleType(ItemStack itemstack){
|
||||
public BaubleType getBaubleType(ItemStack itemstack) {
|
||||
return BaubleType.RING;
|
||||
}
|
||||
|
||||
public void onWornTick(ItemStack itemstack, EntityLivingBase player){}
|
||||
public void onEquipped(ItemStack itemstack, EntityLivingBase player){}
|
||||
public void onUnequipped(ItemStack itemstack, EntityLivingBase player){}
|
||||
public void onWornTick(ItemStack itemstack, EntityLivingBase player) {}
|
||||
|
||||
public boolean canEquip(ItemStack itemstack, EntityLivingBase player){
|
||||
public void onEquipped(ItemStack itemstack, EntityLivingBase player) {}
|
||||
|
||||
public void onUnequipped(ItemStack itemstack, EntityLivingBase player) {}
|
||||
|
||||
public boolean canEquip(ItemStack itemstack, EntityLivingBase player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean canUnequip(ItemStack itemstack, EntityLivingBase player){
|
||||
public boolean canUnequip(ItemStack itemstack, EntityLivingBase player) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getRunicCharge(ItemStack itemstack){
|
||||
public int getRunicCharge(ItemStack itemstack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCosmeticItem(ItemStack stack) {
|
||||
if(stack == null || stack.getTagCompound() == null)
|
||||
return null;
|
||||
if(!stack.getTagCompound().hasKey("cosmeticItem"))
|
||||
return null;
|
||||
if (stack == null || stack.getTagCompound() == null) return null;
|
||||
if (!stack.getTagCompound().hasKey("cosmeticItem")) return null;
|
||||
NBTTagCompound cosmetic = stack.getTagCompound().getCompoundTag("cosmeticItem");
|
||||
return ItemStack.loadItemStackFromNBT(cosmetic);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCosmeticItem(ItemStack stack, ItemStack cosmetic) {
|
||||
if(stack == null)
|
||||
return;
|
||||
if (stack == null) return;
|
||||
NBTTagCompound cmp = new NBTTagCompound();
|
||||
if(cosmetic != null)
|
||||
cosmetic.writeToNBT(cmp);
|
||||
if (cosmetic != null) cosmetic.writeToNBT(cmp);
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
if(tag == null){
|
||||
if (tag == null) {
|
||||
tag = new NBTTagCompound();
|
||||
stack.setTagCompound(tag);
|
||||
}
|
||||
@@ -95,8 +89,10 @@ public class ItemRingNutrition extends Item implements IRunicArmor, IBauble, ICo
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
|
||||
if(Compat.botan && GuiScreen.isShiftKeyDown() && getCosmeticItem(stack) != null)
|
||||
list.add(String.format(StatCollector.translateToLocal("botaniamisc.hasCosmetic"), getCosmeticItem(stack).getDisplayName()).replaceAll("&", "\u00a7"));
|
||||
|
||||
if (Compat.botan && GuiScreen.isShiftKeyDown() && getCosmeticItem(stack) != null)
|
||||
list.add(String.format(
|
||||
StatCollector.translateToLocal("botaniamisc.hasCosmetic"),
|
||||
getCosmeticItem(stack).getDisplayName())
|
||||
.replaceAll("&", "\u00a7"));
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,9 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -24,17 +27,13 @@ import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.items.baubles.ItemAmuletVis;
|
||||
import vazkii.botania.api.item.ICosmeticAttachable;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@Optional.Interface(iface = "vazkii.botania.api.item.ICosmeticAttachable", modid = "Botania")
|
||||
public class ItemSubCollar extends ItemAmuletVis implements ICosmeticAttachable {
|
||||
|
||||
public IIcon icon;
|
||||
DecimalFormat myFormatter = new DecimalFormat("#######.##");
|
||||
|
||||
public ItemSubCollar(){
|
||||
public ItemSubCollar() {
|
||||
super();
|
||||
maxStackSize = 1;
|
||||
setCreativeTab(Forbidden.tab);
|
||||
@@ -74,55 +73,61 @@ public class ItemSubCollar extends ItemAmuletVis implements ICosmeticAttachable
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
|
||||
list.add(EnumChatFormatting.GOLD + StatCollector.translateToLocal("item.capacity.text") + " " + this.getMaxVis(stack) / 100);
|
||||
if(stack.hasTagCompound()) {
|
||||
list.add(EnumChatFormatting.GOLD + StatCollector.translateToLocal("item.capacity.text") + " "
|
||||
+ this.getMaxVis(stack) / 100);
|
||||
if (stack.hasTagCompound()) {
|
||||
Iterator count = Aspect.getPrimalAspects().iterator();
|
||||
|
||||
while(count.hasNext()) {
|
||||
Aspect aspect = (Aspect)count.next();
|
||||
if(stack.stackTagCompound.hasKey(aspect.getTag())) {
|
||||
String amount = this.myFormatter.format((double)((float)stack.stackTagCompound.getInteger(aspect.getTag()) / 100.0F));
|
||||
list.add("\u00a7" + aspect.getChatcolor() + aspect.getName() + EnumChatFormatting.RESET + " x " + amount);
|
||||
while (count.hasNext()) {
|
||||
Aspect aspect = (Aspect) count.next();
|
||||
if (stack.stackTagCompound.hasKey(aspect.getTag())) {
|
||||
String amount = this.myFormatter.format(
|
||||
(double) ((float) stack.stackTagCompound.getInteger(aspect.getTag()) / 100.0F));
|
||||
list.add("\u00a7" + aspect.getChatcolor() + aspect.getName() + EnumChatFormatting.RESET + " x "
|
||||
+ amount);
|
||||
}
|
||||
}
|
||||
if(stack.stackTagCompound.hasKey("owner"))
|
||||
list.add(StatCollector.translateToLocal("tooltip.collar.owner") + " " + stack.stackTagCompound.getString("owner"));
|
||||
|
||||
if(Compat.botan && GuiScreen.isShiftKeyDown() && getCosmeticItem(stack) != null)
|
||||
list.add(String.format(StatCollector.translateToLocal("botaniamisc.hasCosmetic"), getCosmeticItem(stack).getDisplayName()).replaceAll("&", "\u00a7"));
|
||||
if (stack.stackTagCompound.hasKey("owner"))
|
||||
list.add(StatCollector.translateToLocal("tooltip.collar.owner") + " "
|
||||
+ stack.stackTagCompound.getString("owner"));
|
||||
|
||||
if (Compat.botan && GuiScreen.isShiftKeyDown() && getCosmeticItem(stack) != null)
|
||||
list.add(String.format(
|
||||
StatCollector.translateToLocal("botaniamisc.hasCosmetic"),
|
||||
getCosmeticItem(stack).getDisplayName())
|
||||
.replaceAll("&", "\u00a7"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the item can be used on the given entity, e.g. shears on sheep.
|
||||
*/
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack itemstack, EntityPlayer player, EntityLivingBase entity)
|
||||
{
|
||||
if (entity.worldObj.isRemote)
|
||||
{
|
||||
public boolean itemInteractionForEntity(ItemStack itemstack, EntityPlayer player, EntityLivingBase entity) {
|
||||
if (entity.worldObj.isRemote) {
|
||||
return false;
|
||||
}
|
||||
if (entity instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer sub = (EntityPlayer)entity;
|
||||
if (entity instanceof EntityPlayer) {
|
||||
EntityPlayer sub = (EntityPlayer) entity;
|
||||
IInventory baubles = BaublesApi.getBaubles(sub);
|
||||
if(baubles.getStackInSlot(0) == null) {
|
||||
if(!itemstack.hasTagCompound()){
|
||||
if (baubles.getStackInSlot(0) == null) {
|
||||
if (!itemstack.hasTagCompound()) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
itemstack.setTagCompound(tag);
|
||||
}
|
||||
itemstack.stackTagCompound.setString("owner", player.getDisplayName());
|
||||
baubles.setInventorySlotContents(0, itemstack.copy());
|
||||
itemstack.stackSize = 0;
|
||||
sub.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.collar.placescollar").replace("%s", player.getDisplayName())));
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.collar.youplacecollar").replace("%s", sub.getDisplayName())));
|
||||
sub.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.collar.placescollar")
|
||||
.replace("%s", player.getDisplayName())));
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(StatCollector.translateToLocal("message.collar.youplacecollar")
|
||||
.replace("%s", sub.getDisplayName())));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
player.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.collar.alreadywearing").replace("%s", sub.getDisplayName())));
|
||||
} else
|
||||
player.addChatMessage(
|
||||
new ChatComponentText(StatCollector.translateToLocal("message.collar.alreadywearing")
|
||||
.replace("%s", sub.getDisplayName())));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -135,28 +140,23 @@ public class ItemSubCollar extends ItemAmuletVis implements ICosmeticAttachable
|
||||
|
||||
@Override
|
||||
public ItemStack getCosmeticItem(ItemStack stack) {
|
||||
if(stack == null || stack.getTagCompound() == null)
|
||||
return null;
|
||||
if(!stack.getTagCompound().hasKey("cosmeticItem"))
|
||||
return null;
|
||||
if (stack == null || stack.getTagCompound() == null) return null;
|
||||
if (!stack.getTagCompound().hasKey("cosmeticItem")) return null;
|
||||
NBTTagCompound cosmetic = stack.getTagCompound().getCompoundTag("cosmeticItem");
|
||||
return ItemStack.loadItemStackFromNBT(cosmetic);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCosmeticItem(ItemStack stack, ItemStack cosmetic) {
|
||||
if(stack == null)
|
||||
return;
|
||||
if (stack == null) return;
|
||||
NBTTagCompound cmp = new NBTTagCompound();
|
||||
if(cosmetic != null)
|
||||
cosmetic.writeToNBT(cmp);
|
||||
if (cosmetic != null) cosmetic.writeToNBT(cmp);
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
if(tag == null){
|
||||
if (tag == null) {
|
||||
tag = new NBTTagCompound();
|
||||
stack.setTagCompound(tag);
|
||||
}
|
||||
|
||||
tag.setTag("cosmeticItem", cmp);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +1,21 @@
|
||||
package fox.spiteful.forbidden.items.scribes;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.IScribeTools;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBloodwell extends Item implements IScribeTools, IBindable {
|
||||
|
||||
@@ -48,13 +46,10 @@ public class ItemBloodwell extends Item implements IScribeTools, IBindable {
|
||||
public void onUpdate(ItemStack stack, World world, Entity fauxplayer, int z, boolean par5) {
|
||||
if (Compat.bm && stack.getItemDamage() > 0 && stack.hasTagCompound()) {
|
||||
EntityPlayer player = null;
|
||||
if (fauxplayer instanceof EntityPlayer)
|
||||
player = (EntityPlayer) fauxplayer;
|
||||
else
|
||||
return;
|
||||
if (fauxplayer instanceof EntityPlayer) player = (EntityPlayer) fauxplayer;
|
||||
else return;
|
||||
|
||||
if (player.capabilities.isCreativeMode)
|
||||
stack.setItemDamage(0);
|
||||
if (player.capabilities.isCreativeMode) stack.setItemDamage(0);
|
||||
else if (SoulNetworkHandler.syphonFromNetwork(stack, 25) > 0)
|
||||
stack.setItemDamage(stack.getItemDamage() - 1);
|
||||
else if (player.getHealth() > 6) {
|
||||
@@ -66,7 +61,7 @@ public class ItemBloodwell extends Item implements IScribeTools, IBindable {
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -74,18 +69,16 @@ public class ItemBloodwell extends Item implements IScribeTools, IBindable {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean z) {
|
||||
if (stack.hasTagCompound()) {
|
||||
list.add("");
|
||||
list.add(StatCollector.translateToLocal("tooltip.currentowner") + " " + stack.stackTagCompound.getString("ownerName"));
|
||||
list.add(StatCollector.translateToLocal("tooltip.currentowner") + " "
|
||||
+ stack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDamage(ItemStack stack, int damage) {
|
||||
if (damage > 0) {
|
||||
if (SoulNetworkHandler.syphonFromNetwork(stack, 25 * damage) > 0)
|
||||
super.setDamage(stack, 0);
|
||||
else
|
||||
super.setDamage(stack, damage);
|
||||
} else
|
||||
super.setDamage(stack, damage);
|
||||
if (SoulNetworkHandler.syphonFromNetwork(stack, 25 * damage) > 0) super.setDamage(stack, 0);
|
||||
else super.setDamage(stack, damage);
|
||||
} else super.setDamage(stack, damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
@@ -20,10 +22,7 @@ import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.playerdata.PacketAspectPool;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBoundwell extends Item implements IScribeTools, IBindable{
|
||||
public class ItemBoundwell extends Item implements IScribeTools, IBindable {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon icon;
|
||||
|
||||
@@ -53,22 +52,26 @@ public class ItemBoundwell extends Item implements IScribeTools, IBindable{
|
||||
if (itemstack.getItemDamage() >= 100) {
|
||||
player.swingItem();
|
||||
if (!world.isRemote) {
|
||||
if (player.capabilities.isCreativeMode)
|
||||
itemstack.setItemDamage(0);
|
||||
if (player.capabilities.isCreativeMode) itemstack.setItemDamage(0);
|
||||
else {
|
||||
SoulNetworkHandler.syphonAndDamageFromNetwork(itemstack, player, 10000);
|
||||
if(player.getHealth() > 0){
|
||||
if (player.getHealth() > 0) {
|
||||
itemstack.setItemDamage(0);
|
||||
}
|
||||
else
|
||||
return itemstack;
|
||||
} else return itemstack;
|
||||
}
|
||||
Aspect aspect;
|
||||
short amount;
|
||||
for(Iterator count = Aspect.getPrimalAspects().iterator(); count.hasNext(); PacketHandler.INSTANCE.sendTo(new PacketAspectPool(aspect.getTag(), Short.valueOf(amount), Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(player.getCommandSenderName(), aspect))), (EntityPlayerMP)player))
|
||||
{
|
||||
aspect = (Aspect)count.next();
|
||||
amount = (short)(world.rand.nextInt(4) + 4);
|
||||
for (Iterator count = Aspect.getPrimalAspects().iterator();
|
||||
count.hasNext();
|
||||
PacketHandler.INSTANCE.sendTo(
|
||||
new PacketAspectPool(
|
||||
aspect.getTag(),
|
||||
Short.valueOf(amount),
|
||||
Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(
|
||||
player.getCommandSenderName(), aspect))),
|
||||
(EntityPlayerMP) player)) {
|
||||
aspect = (Aspect) count.next();
|
||||
amount = (short) (world.rand.nextInt(4) + 4);
|
||||
Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getCommandSenderName(), aspect, amount);
|
||||
ResearchManager.scheduleSave(player);
|
||||
}
|
||||
@@ -81,7 +84,8 @@ public class ItemBoundwell extends Item implements IScribeTools, IBindable{
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean z) {
|
||||
if (stack.hasTagCompound()) {
|
||||
list.add("");
|
||||
list.add(StatCollector.translateToLocal("tooltip.currentowner") + " " + stack.stackTagCompound.getString("ownerName"));
|
||||
list.add(StatCollector.translateToLocal("tooltip.currentowner") + " "
|
||||
+ stack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,5 +97,4 @@ public class ItemBoundwell extends Item implements IScribeTools, IBindable{
|
||||
public boolean hasEffect(ItemStack stack, int pass) {
|
||||
return stack.getItemDamage() >= 100;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,19 +1,17 @@
|
||||
package fox.spiteful.forbidden.items.scribes;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.LogHandler;
|
||||
import java.util.Iterator;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import thaumcraft.api.IScribeTools;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
@@ -21,9 +19,6 @@ import thaumcraft.common.config.Config;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.playerdata.PacketAspectPool;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
|
||||
public class ItemCrystalwell extends Item implements IScribeTools {
|
||||
@@ -34,13 +29,10 @@ public class ItemCrystalwell extends Item implements IScribeTools {
|
||||
public ItemCrystalwell() {
|
||||
maxStackSize = 1;
|
||||
canRepair = false;
|
||||
if(Config.researchDifficulty == -1)
|
||||
setMaxDamage(50);
|
||||
else
|
||||
setMaxDamage(100);
|
||||
if (Config.researchDifficulty == -1) setMaxDamage(50);
|
||||
else setMaxDamage(100);
|
||||
setCreativeTab(Forbidden.tab);
|
||||
setHasSubtypes(false);
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -61,35 +53,46 @@ public class ItemCrystalwell extends Item implements IScribeTools {
|
||||
if (!world.isRemote) {
|
||||
Aspect aspect;
|
||||
short amount;
|
||||
for(Iterator count = Aspect.getPrimalAspects().iterator(); count.hasNext(); PacketHandler.INSTANCE.sendTo(new PacketAspectPool(aspect.getTag(), Short.valueOf(amount), Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(player.getCommandSenderName(), aspect))), (EntityPlayerMP)player))
|
||||
{
|
||||
aspect = (Aspect)count.next();
|
||||
amount = (short)(world.rand.nextInt(4) + 4);
|
||||
for (Iterator count = Aspect.getPrimalAspects().iterator();
|
||||
count.hasNext();
|
||||
PacketHandler.INSTANCE.sendTo(
|
||||
new PacketAspectPool(
|
||||
aspect.getTag(),
|
||||
Short.valueOf(amount),
|
||||
Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(
|
||||
player.getCommandSenderName(), aspect))),
|
||||
(EntityPlayerMP) player)) {
|
||||
aspect = (Aspect) count.next();
|
||||
amount = (short) (world.rand.nextInt(4) + 4);
|
||||
Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getCommandSenderName(), aspect, amount);
|
||||
ResearchManager.scheduleSave(player);
|
||||
}
|
||||
}
|
||||
player.swingItem();
|
||||
return new ItemStack(ConfigItems.itemInkwell, 1, 100);
|
||||
} else
|
||||
return stack;
|
||||
} else return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean isSelected) {
|
||||
|
||||
if(world.isRemote)
|
||||
return;
|
||||
if(Config.researchDifficulty == -1 && entity.ticksExisted % 200 == 0 && (entity instanceof EntityPlayer)){
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
Aspect aspect = (Aspect)Aspect.getPrimalAspects().get(world.rand.nextInt(6));
|
||||
short amount = (short)(world.rand.nextInt(4) + 1);
|
||||
if (world.isRemote) return;
|
||||
if (Config.researchDifficulty == -1 && entity.ticksExisted % 200 == 0 && (entity instanceof EntityPlayer)) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
Aspect aspect = (Aspect) Aspect.getPrimalAspects().get(world.rand.nextInt(6));
|
||||
short amount = (short) (world.rand.nextInt(4) + 1);
|
||||
Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getCommandSenderName(), aspect, amount);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketAspectPool(aspect.getTag(), amount, Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(player.getCommandSenderName(), aspect))), (EntityPlayerMP) player);
|
||||
PacketHandler.INSTANCE.sendTo(
|
||||
new PacketAspectPool(
|
||||
aspect.getTag(),
|
||||
amount,
|
||||
Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(
|
||||
player.getCommandSenderName(), aspect))),
|
||||
(EntityPlayerMP) player);
|
||||
ResearchManager.scheduleSave(player);
|
||||
stack.setItemDamage(stack.getItemDamage() + 1);
|
||||
if(stack.getItemDamage() >= stack.getMaxDamage())
|
||||
((EntityPlayer)entity).inventory.setInventorySlotContents(slot, null);
|
||||
if (stack.getItemDamage() >= stack.getMaxDamage())
|
||||
((EntityPlayer) entity).inventory.setInventorySlotContents(slot, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,5 +104,4 @@ public class ItemCrystalwell extends Item implements IScribeTools {
|
||||
public boolean hasEffect(ItemStack stack, int pass) {
|
||||
return Config.researchDifficulty != -1 && stack.getItemDamage() >= 100;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,22 +4,11 @@ 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.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.IScribeTools;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.lib.network.PacketHandler;
|
||||
import thaumcraft.common.lib.network.playerdata.PacketAspectPool;
|
||||
import thaumcraft.common.lib.research.ResearchManager;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
public class ItemPrimewell extends Item implements IScribeTools {
|
||||
|
||||
@@ -32,7 +21,6 @@ public class ItemPrimewell extends Item implements IScribeTools {
|
||||
setMaxDamage(100);
|
||||
setCreativeTab(Forbidden.tab);
|
||||
setHasSubtypes(false);
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -48,12 +36,12 @@ public class ItemPrimewell extends Item implements IScribeTools {
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack){
|
||||
public EnumRarity getRarity(ItemStack stack) {
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDamage(ItemStack stack, int damage){
|
||||
public void setDamage(ItemStack stack, int damage) {
|
||||
super.setDamage(stack, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,12 +20,12 @@ import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
|
||||
public class ItemBloodRapier extends ItemSword implements IRepairable, IWarpingGear{
|
||||
public class ItemBloodRapier extends ItemSword implements IRepairable, IWarpingGear {
|
||||
|
||||
static final ToolMaterial bloodsucker = EnumHelper.addToolMaterial("BLOODSUCKER", 3, 700, 10F, -3F, 18);
|
||||
private IIcon icon;
|
||||
|
||||
public ItemBloodRapier(){
|
||||
public ItemBloodRapier() {
|
||||
super(bloodsucker);
|
||||
}
|
||||
|
||||
@@ -33,16 +33,13 @@ public class ItemBloodRapier extends ItemSword implements IRepairable, IWarpingG
|
||||
public boolean hitEntity(ItemStack stack, EntityLivingBase victim, EntityLivingBase player) {
|
||||
stack.damageItem(1, player);
|
||||
victim.motionY *= 0.8;
|
||||
if (victim.hurtResistantTime > 18)
|
||||
victim.hurtResistantTime -= 5;
|
||||
if (victim.hurtResistantTime > 18) victim.hurtResistantTime -= 5;
|
||||
if (Compat.bm & victim instanceof EntityPlayer) {
|
||||
String target = ((EntityPlayer) victim).getDisplayName();
|
||||
int lp = SoulNetworkHandler.getCurrentEssence(target);
|
||||
int damage = Math.max(4000, lp / 4);
|
||||
if (lp >= damage)
|
||||
lp -= damage;
|
||||
else
|
||||
lp = 0;
|
||||
if (lp >= damage) lp -= damage;
|
||||
else lp = 0;
|
||||
SoulNetworkHandler.setCurrentEssence(target, lp);
|
||||
victim.addPotionEffect(new PotionEffect(DarkPotions.bloodSeal.getId(), 1200));
|
||||
}
|
||||
@@ -52,8 +49,11 @@ public class ItemBloodRapier extends ItemSword implements IRepairable, IWarpingG
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int wat, boolean fuckObfuscation) {
|
||||
super.onUpdate(stack, world, entity, wat, fuckObfuscation);
|
||||
if(stack.isItemDamaged() && entity != null && entity.ticksExisted % 20 == 0 && entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase)entity);
|
||||
if (stack.isItemDamaged()
|
||||
&& entity != null
|
||||
&& entity.ticksExisted % 20 == 0
|
||||
&& entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase) entity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,9 @@ public class ItemBloodRapier extends ItemSword implements IRepairable, IWarpingG
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
|
||||
return par2ItemStack.isItemEqual(new ItemStack(ConfigItems.itemResource, 1, 15))?true:super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
return par2ItemStack.isItemEqual(new ItemStack(ConfigItems.itemResource, 1, 15))
|
||||
? true
|
||||
: super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package fox.spiteful.forbidden.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -12,11 +15,6 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemDiabolistFork extends ItemSword implements IRepairable {
|
||||
|
||||
public IIcon icon;
|
||||
@@ -29,10 +27,8 @@ public class ItemDiabolistFork extends ItemSword implements IRepairable {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
if (Config.spork)
|
||||
this.icon = ir.registerIcon("forbidden:spork");
|
||||
else
|
||||
this.icon = ir.registerIcon("forbidden:fork");
|
||||
if (Config.spork) this.icon = ir.registerIcon("forbidden:spork");
|
||||
else this.icon = ir.registerIcon("forbidden:fork");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,4 +66,4 @@ public class ItemDiabolistFork extends ItemSword implements IRepairable {
|
||||
public boolean canHarvestBlock(Block block, ItemStack itemStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package fox.spiteful.forbidden.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
@@ -15,11 +18,6 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
public class ItemMorphAxe extends ItemAxe implements IRepairable, IWarpingGear {
|
||||
@@ -48,50 +46,53 @@ public class ItemMorphAxe extends ItemAxe implements IRepairable, IWarpingGear {
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2);
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1))
|
||||
? true
|
||||
: super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
if (player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage(itemstack) - itemstack.getItemDamage() > 5) {
|
||||
if (player.isSneaking()
|
||||
&& itemstack.hasTagCompound()
|
||||
&& getMaxDamage(itemstack) - itemstack.getItemDamage() > 5) {
|
||||
NBTTagCompound tags = itemstack.getTagCompound();
|
||||
byte phase = tags.getByte("phase");
|
||||
if(tags.hasKey("ench")){
|
||||
if (tags.hasKey("ench")) {
|
||||
NBTTagList enchants = itemstack.getEnchantmentTagList();
|
||||
tags.setTag("enchants" + phase, enchants);
|
||||
}
|
||||
else
|
||||
tags.removeTag("enchants" + phase);
|
||||
} else tags.removeTag("enchants" + phase);
|
||||
|
||||
if (tags.hasKey("display")) {
|
||||
String name = tags.getCompoundTag("display").getString("Name");
|
||||
if (name != null && !name.equals(""))
|
||||
tags.getCompoundTag("display").setString("Name" + phase, name);
|
||||
else
|
||||
tags.getCompoundTag("display").removeTag("Name" + phase);
|
||||
else tags.getCompoundTag("display").removeTag("Name" + phase);
|
||||
}
|
||||
if (++phase > 2)
|
||||
phase = 0;
|
||||
if (++phase > 2) phase = 0;
|
||||
tags.setByte("phase", phase);
|
||||
if(tags.hasKey("enchants" + phase)) {
|
||||
if (tags.hasKey("enchants" + phase)) {
|
||||
NBTTagList enchants = (NBTTagList) (tags.getTag("enchants" + phase));
|
||||
tags.setTag("ench", enchants);
|
||||
}
|
||||
else
|
||||
tags.removeTag("ench");
|
||||
} else tags.removeTag("ench");
|
||||
|
||||
if (tags.hasKey("display")) {
|
||||
String name = tags.getCompoundTag("display").getString("Name" + phase);
|
||||
if (name != null && !name.equals(""))
|
||||
tags.getCompoundTag("display").setString("Name", name);
|
||||
else
|
||||
tags.getCompoundTag("display").removeTag("Name");
|
||||
else tags.getCompoundTag("display").removeTag("Name");
|
||||
}
|
||||
|
||||
itemstack.setTagCompound(tags);
|
||||
itemstack.damageItem(5, player);
|
||||
player.swingItem();
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F);
|
||||
world.playSoundEffect(
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
"thaumcraft:wandfail",
|
||||
0.2F,
|
||||
0.2F + world.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
@@ -99,18 +100,13 @@ public class ItemMorphAxe extends ItemAxe implements IRepairable, IWarpingGear {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
if (renderpass != 1)
|
||||
return 16777215;
|
||||
if (renderpass != 1) return 16777215;
|
||||
else {
|
||||
if (!itemstack.hasTagCompound())
|
||||
return 0x980000;
|
||||
if (!itemstack.hasTagCompound()) return 0x980000;
|
||||
byte phase = itemstack.getTagCompound().getByte("phase");
|
||||
if (phase == 1)
|
||||
return 0x0010CC;
|
||||
else if (phase == 2)
|
||||
return 0xE5DA00;
|
||||
else
|
||||
return 0x980000;
|
||||
if (phase == 1) return 0x0010CC;
|
||||
else if (phase == 2) return 0xE5DA00;
|
||||
else return 0x980000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,17 +117,17 @@ public class ItemMorphAxe extends ItemAxe implements IRepairable, IWarpingGear {
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int fuckObfuscation, boolean fuckObfuscation2) {
|
||||
super.onUpdate(stack, world, entity, fuckObfuscation, fuckObfuscation2);
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, stack) > 0 && stack.isItemDamaged() && entity != null && entity.ticksExisted % 10 == 0 && entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase)entity);
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, stack) > 0
|
||||
&& stack.isItemDamaged()
|
||||
&& entity != null
|
||||
&& entity.ticksExisted % 10 == 0
|
||||
&& entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase) entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public int getWarp(ItemStack itemstack, EntityPlayer player) {
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, itemstack) > 0)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, itemstack) > 0) return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
package fox.spiteful.forbidden.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -7,29 +11,18 @@ import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
import java.util.List;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
|
||||
public class ItemMorphPickaxe extends ItemPickaxe implements IRepairable, IWarpingGear {
|
||||
public IIcon[] icon;
|
||||
@@ -62,50 +55,53 @@ public class ItemMorphPickaxe extends ItemPickaxe implements IRepairable, IWarpi
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2);
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1))
|
||||
? true
|
||||
: super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
if (player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage(itemstack) - itemstack.getItemDamage() > 5) {
|
||||
if (player.isSneaking()
|
||||
&& itemstack.hasTagCompound()
|
||||
&& getMaxDamage(itemstack) - itemstack.getItemDamage() > 5) {
|
||||
NBTTagCompound tags = itemstack.getTagCompound();
|
||||
byte phase = tags.getByte("phase");
|
||||
if(tags.hasKey("ench")){
|
||||
if (tags.hasKey("ench")) {
|
||||
NBTTagList enchants = itemstack.getEnchantmentTagList();
|
||||
tags.setTag("enchants" + phase, enchants);
|
||||
}
|
||||
else
|
||||
tags.removeTag("enchants" + phase);
|
||||
} else tags.removeTag("enchants" + phase);
|
||||
|
||||
if (tags.hasKey("display")) {
|
||||
String name = tags.getCompoundTag("display").getString("Name");
|
||||
if (name != null && !name.equals(""))
|
||||
tags.getCompoundTag("display").setString("Name" + phase, name);
|
||||
else
|
||||
tags.getCompoundTag("display").removeTag("Name" + phase);
|
||||
else tags.getCompoundTag("display").removeTag("Name" + phase);
|
||||
}
|
||||
if (++phase > 2)
|
||||
phase = 0;
|
||||
if (++phase > 2) phase = 0;
|
||||
tags.setByte("phase", phase);
|
||||
if(tags.hasKey("enchants" + phase)) {
|
||||
if (tags.hasKey("enchants" + phase)) {
|
||||
NBTTagList enchants = (NBTTagList) (tags.getTag("enchants" + phase));
|
||||
tags.setTag("ench", enchants);
|
||||
}
|
||||
else
|
||||
tags.removeTag("ench");
|
||||
} else tags.removeTag("ench");
|
||||
|
||||
if (tags.hasKey("display")) {
|
||||
String name = tags.getCompoundTag("display").getString("Name" + phase);
|
||||
if (name != null && !name.equals(""))
|
||||
tags.getCompoundTag("display").setString("Name", name);
|
||||
else
|
||||
tags.getCompoundTag("display").removeTag("Name");
|
||||
else tags.getCompoundTag("display").removeTag("Name");
|
||||
}
|
||||
|
||||
itemstack.setTagCompound(tags);
|
||||
itemstack.damageItem(5, player);
|
||||
player.swingItem();
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F);
|
||||
world.playSoundEffect(
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
"thaumcraft:wandfail",
|
||||
0.2F,
|
||||
0.2F + world.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
@@ -113,18 +109,13 @@ public class ItemMorphPickaxe extends ItemPickaxe implements IRepairable, IWarpi
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
if (renderpass != 1)
|
||||
return 16777215;
|
||||
if (renderpass != 1) return 16777215;
|
||||
else {
|
||||
if (!itemstack.hasTagCompound())
|
||||
return 0x980000;
|
||||
if (!itemstack.hasTagCompound()) return 0x980000;
|
||||
byte phase = itemstack.getTagCompound().getByte("phase");
|
||||
if (phase == 1)
|
||||
return 0x0010CC;
|
||||
else if (phase == 2)
|
||||
return 0xE5DA00;
|
||||
else
|
||||
return 0x980000;
|
||||
if (phase == 1) return 0x0010CC;
|
||||
else if (phase == 2) return 0xE5DA00;
|
||||
else return 0x980000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,23 +127,25 @@ public class ItemMorphPickaxe extends ItemPickaxe implements IRepairable, IWarpi
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int fuckObfuscation, boolean fuckObfuscation2) {
|
||||
super.onUpdate(stack, world, entity, fuckObfuscation, fuckObfuscation2);
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, stack) > 0 && stack.isItemDamaged() && entity != null && entity.ticksExisted % 10 == 0 && entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase)entity);
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, stack) > 0
|
||||
&& stack.isItemDamaged()
|
||||
&& entity != null
|
||||
&& entity.ticksExisted % 10 == 0
|
||||
&& entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase) entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public int getWarp(ItemStack itemstack, EntityPlayer player) {
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, itemstack) > 0)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, itemstack) > 0) return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player) {
|
||||
MovingObjectPosition movingobjectposition = BlockUtils.getTargetBlock(player.worldObj, player, true);
|
||||
if(movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
if (movingobjectposition != null
|
||||
&& movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
this.side = movingobjectposition.sideHit;
|
||||
}
|
||||
|
||||
@@ -160,21 +153,22 @@ public class ItemMorphPickaxe extends ItemPickaxe implements IRepairable, IWarpi
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase player) {
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.impact.effectId, stack) <= 0)
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase player) {
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.impact.effectId, stack) <= 0)
|
||||
return super.onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
if(!player.worldObj.isRemote) {
|
||||
if (!player.worldObj.isRemote) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(ForgeHooks.isToolEffective(stack, block, meta)) {
|
||||
for(int aa = -1; aa <= 1; ++aa) {
|
||||
for(int bb = -1; bb <= 1; ++bb) {
|
||||
if (ForgeHooks.isToolEffective(stack, block, meta)) {
|
||||
for (int aa = -1; aa <= 1; ++aa) {
|
||||
for (int bb = -1; bb <= 1; ++bb) {
|
||||
int xx = 0;
|
||||
int yy = 0;
|
||||
int zz = 0;
|
||||
if(this.side <= 1) {
|
||||
if (this.side <= 1) {
|
||||
xx = aa;
|
||||
zz = bb;
|
||||
} else if(this.side <= 3) {
|
||||
} else if (this.side <= 3) {
|
||||
xx = aa;
|
||||
yy = bb;
|
||||
} else {
|
||||
@@ -182,22 +176,21 @@ public class ItemMorphPickaxe extends ItemPickaxe implements IRepairable, IWarpi
|
||||
yy = bb;
|
||||
}
|
||||
|
||||
if(!(player instanceof EntityPlayer) || world.canMineBlock((EntityPlayer)player, x + xx, y + yy, z + zz)) {
|
||||
if (!(player instanceof EntityPlayer)
|
||||
|| world.canMineBlock((EntityPlayer) player, x + xx, y + yy, z + zz)) {
|
||||
Block bl = world.getBlock(x + xx, y + yy, z + zz);
|
||||
meta = world.getBlockMetadata(x + xx, y + yy, z + zz);
|
||||
if(bl.getBlockHardness(world, x + xx, y + yy, z + zz) >= 0.0F && ForgeHooks.isToolEffective(stack, bl, meta)) {
|
||||
if (bl.getBlockHardness(world, x + xx, y + yy, z + zz) >= 0.0F
|
||||
&& ForgeHooks.isToolEffective(stack, bl, meta)) {
|
||||
stack.damageItem(1, player);
|
||||
BlockUtils.harvestBlock(world, (EntityPlayer)player, x + xx, y + yy, z + zz, true, 2);
|
||||
BlockUtils.harvestBlock(world, (EntityPlayer) player, x + xx, y + yy, z + zz, true, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
return super.onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
} else return super.onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
}
|
||||
|
||||
return super.onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,32 +1,26 @@
|
||||
package fox.spiteful.forbidden.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.play.client.C07PacketPlayerDigging;
|
||||
import net.minecraft.network.play.server.S23PacketBlockChange;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
|
||||
@@ -57,50 +51,53 @@ public class ItemMorphShovel extends ItemSpade implements IRepairable, IWarpingG
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2);
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1))
|
||||
? true
|
||||
: super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
if (player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage(itemstack) - itemstack.getItemDamage() > 5) {
|
||||
if (player.isSneaking()
|
||||
&& itemstack.hasTagCompound()
|
||||
&& getMaxDamage(itemstack) - itemstack.getItemDamage() > 5) {
|
||||
NBTTagCompound tags = itemstack.getTagCompound();
|
||||
byte phase = tags.getByte("phase");
|
||||
if(tags.hasKey("ench")){
|
||||
if (tags.hasKey("ench")) {
|
||||
NBTTagList enchants = itemstack.getEnchantmentTagList();
|
||||
tags.setTag("enchants" + phase, enchants);
|
||||
}
|
||||
else
|
||||
tags.removeTag("enchants" + phase);
|
||||
} else tags.removeTag("enchants" + phase);
|
||||
|
||||
if (tags.hasKey("display")) {
|
||||
String name = tags.getCompoundTag("display").getString("Name");
|
||||
if (name != null && !name.equals(""))
|
||||
tags.getCompoundTag("display").setString("Name" + phase, name);
|
||||
else
|
||||
tags.getCompoundTag("display").removeTag("Name" + phase);
|
||||
else tags.getCompoundTag("display").removeTag("Name" + phase);
|
||||
}
|
||||
if (++phase > 2)
|
||||
phase = 0;
|
||||
if (++phase > 2) phase = 0;
|
||||
tags.setByte("phase", phase);
|
||||
if(tags.hasKey("enchants" + phase)) {
|
||||
if (tags.hasKey("enchants" + phase)) {
|
||||
NBTTagList enchants = (NBTTagList) (tags.getTag("enchants" + phase));
|
||||
tags.setTag("ench", enchants);
|
||||
}
|
||||
else
|
||||
tags.removeTag("ench");
|
||||
} else tags.removeTag("ench");
|
||||
|
||||
if (tags.hasKey("display")) {
|
||||
String name = tags.getCompoundTag("display").getString("Name" + phase);
|
||||
if (name != null && !name.equals(""))
|
||||
tags.getCompoundTag("display").setString("Name", name);
|
||||
else
|
||||
tags.getCompoundTag("display").removeTag("Name");
|
||||
else tags.getCompoundTag("display").removeTag("Name");
|
||||
}
|
||||
|
||||
itemstack.setTagCompound(tags);
|
||||
itemstack.damageItem(5, player);
|
||||
player.swingItem();
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F);
|
||||
world.playSoundEffect(
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
"thaumcraft:wandfail",
|
||||
0.2F,
|
||||
0.2F + world.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
@@ -108,18 +105,13 @@ public class ItemMorphShovel extends ItemSpade implements IRepairable, IWarpingG
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
if (renderpass != 1)
|
||||
return 16777215;
|
||||
if (renderpass != 1) return 16777215;
|
||||
else {
|
||||
if (!itemstack.hasTagCompound())
|
||||
return 0x980000;
|
||||
if (!itemstack.hasTagCompound()) return 0x980000;
|
||||
byte phase = itemstack.getTagCompound().getByte("phase");
|
||||
if (phase == 1)
|
||||
return 0x0010CC;
|
||||
else if (phase == 2)
|
||||
return 0xE5DA00;
|
||||
else
|
||||
return 0x980000;
|
||||
if (phase == 1) return 0x0010CC;
|
||||
else if (phase == 2) return 0xE5DA00;
|
||||
else return 0x980000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,23 +122,25 @@ public class ItemMorphShovel extends ItemSpade implements IRepairable, IWarpingG
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int fuckObfuscation, boolean fuckObfuscation2) {
|
||||
super.onUpdate(stack, world, entity, fuckObfuscation, fuckObfuscation2);
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, stack) > 0 && stack.isItemDamaged() && entity != null && entity.ticksExisted % 10 == 0 && entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase)entity);
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, stack) > 0
|
||||
&& stack.isItemDamaged()
|
||||
&& entity != null
|
||||
&& entity.ticksExisted % 10 == 0
|
||||
&& entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase) entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public int getWarp(ItemStack itemstack, EntityPlayer player) {
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, itemstack) > 0)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, itemstack) > 0) return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player) {
|
||||
MovingObjectPosition movingobjectposition = BlockUtils.getTargetBlock(player.worldObj, player, true);
|
||||
if(movingobjectposition != null && movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
if (movingobjectposition != null
|
||||
&& movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
|
||||
this.side = movingobjectposition.sideHit;
|
||||
}
|
||||
|
||||
@@ -154,21 +148,22 @@ public class ItemMorphShovel extends ItemSpade implements IRepairable, IWarpingG
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase player) {
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.impact.effectId, stack) <= 0)
|
||||
public boolean onBlockDestroyed(
|
||||
ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase player) {
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.impact.effectId, stack) <= 0)
|
||||
return super.onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
if(!player.worldObj.isRemote) {
|
||||
if (!player.worldObj.isRemote) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(ForgeHooks.isToolEffective(stack, block, meta)) {
|
||||
for(int aa = -1; aa <= 1; ++aa) {
|
||||
for(int bb = -1; bb <= 1; ++bb) {
|
||||
if (ForgeHooks.isToolEffective(stack, block, meta)) {
|
||||
for (int aa = -1; aa <= 1; ++aa) {
|
||||
for (int bb = -1; bb <= 1; ++bb) {
|
||||
int xx = 0;
|
||||
int yy = 0;
|
||||
int zz = 0;
|
||||
if(this.side <= 1) {
|
||||
if (this.side <= 1) {
|
||||
xx = aa;
|
||||
zz = bb;
|
||||
} else if(this.side <= 3) {
|
||||
} else if (this.side <= 3) {
|
||||
xx = aa;
|
||||
yy = bb;
|
||||
} else {
|
||||
@@ -176,22 +171,21 @@ public class ItemMorphShovel extends ItemSpade implements IRepairable, IWarpingG
|
||||
yy = bb;
|
||||
}
|
||||
|
||||
if(!(player instanceof EntityPlayer) || world.canMineBlock((EntityPlayer)player, x + xx, y + yy, z + zz)) {
|
||||
if (!(player instanceof EntityPlayer)
|
||||
|| world.canMineBlock((EntityPlayer) player, x + xx, y + yy, z + zz)) {
|
||||
Block bl = world.getBlock(x + xx, y + yy, z + zz);
|
||||
meta = world.getBlockMetadata(x + xx, y + yy, z + zz);
|
||||
if(bl.getBlockHardness(world, x + xx, y + yy, z + zz) >= 0.0F && ForgeHooks.isToolEffective(stack, bl, meta)) {
|
||||
if (bl.getBlockHardness(world, x + xx, y + yy, z + zz) >= 0.0F
|
||||
&& ForgeHooks.isToolEffective(stack, bl, meta)) {
|
||||
stack.damageItem(1, player);
|
||||
BlockUtils.harvestBlock(world, (EntityPlayer)player, x + xx, y + yy, z + zz, true, 2);
|
||||
BlockUtils.harvestBlock(world, (EntityPlayer) player, x + xx, y + yy, z + zz, true, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
return super.onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
} else return super.onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
}
|
||||
|
||||
return super.onBlockDestroyed(stack, world, block, x, y, z, player);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package fox.spiteful.forbidden.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
@@ -15,11 +18,6 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
import fox.spiteful.forbidden.enchantments.DarkEnchantments;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
public class ItemMorphSword extends ItemSword implements IRepairable, IWarpingGear {
|
||||
@@ -49,50 +47,53 @@ public class ItemMorphSword extends ItemSword implements IRepairable, IWarpingGe
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2);
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1))
|
||||
? true
|
||||
: super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
if (player.isSneaking() && itemstack.hasTagCompound() && getMaxDamage(itemstack) - itemstack.getItemDamage() > 5) {
|
||||
if (player.isSneaking()
|
||||
&& itemstack.hasTagCompound()
|
||||
&& getMaxDamage(itemstack) - itemstack.getItemDamage() > 5) {
|
||||
NBTTagCompound tags = itemstack.getTagCompound();
|
||||
byte phase = tags.getByte("phase");
|
||||
if(tags.hasKey("ench")){
|
||||
if (tags.hasKey("ench")) {
|
||||
NBTTagList enchants = itemstack.getEnchantmentTagList();
|
||||
tags.setTag("enchants" + phase, enchants);
|
||||
}
|
||||
else
|
||||
tags.removeTag("enchants" + phase);
|
||||
} else tags.removeTag("enchants" + phase);
|
||||
|
||||
if (tags.hasKey("display")) {
|
||||
String name = tags.getCompoundTag("display").getString("Name");
|
||||
if (name != null && !name.equals(""))
|
||||
tags.getCompoundTag("display").setString("Name" + phase, name);
|
||||
else
|
||||
tags.getCompoundTag("display").removeTag("Name" + phase);
|
||||
else tags.getCompoundTag("display").removeTag("Name" + phase);
|
||||
}
|
||||
if (++phase > 2)
|
||||
phase = 0;
|
||||
if (++phase > 2) phase = 0;
|
||||
tags.setByte("phase", phase);
|
||||
if(tags.hasKey("enchants" + phase)) {
|
||||
if (tags.hasKey("enchants" + phase)) {
|
||||
NBTTagList enchants = (NBTTagList) (tags.getTag("enchants" + phase));
|
||||
tags.setTag("ench", enchants);
|
||||
}
|
||||
else
|
||||
tags.removeTag("ench");
|
||||
} else tags.removeTag("ench");
|
||||
|
||||
if (tags.hasKey("display")) {
|
||||
String name = tags.getCompoundTag("display").getString("Name" + phase);
|
||||
if (name != null && !name.equals(""))
|
||||
tags.getCompoundTag("display").setString("Name", name);
|
||||
else
|
||||
tags.getCompoundTag("display").removeTag("Name");
|
||||
else tags.getCompoundTag("display").removeTag("Name");
|
||||
}
|
||||
|
||||
itemstack.setTagCompound(tags);
|
||||
itemstack.damageItem(5, player);
|
||||
player.swingItem();
|
||||
world.playSoundEffect(player.posX, player.posY, player.posZ, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F);
|
||||
world.playSoundEffect(
|
||||
player.posX,
|
||||
player.posY,
|
||||
player.posZ,
|
||||
"thaumcraft:wandfail",
|
||||
0.2F,
|
||||
0.2F + world.rand.nextFloat() * 0.2F);
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
@@ -100,18 +101,13 @@ public class ItemMorphSword extends ItemSword implements IRepairable, IWarpingGe
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
if (renderpass != 1)
|
||||
return 16777215;
|
||||
if (renderpass != 1) return 16777215;
|
||||
else {
|
||||
if (!itemstack.hasTagCompound())
|
||||
return 0x980000;
|
||||
if (!itemstack.hasTagCompound()) return 0x980000;
|
||||
byte phase = itemstack.getTagCompound().getByte("phase");
|
||||
if (phase == 1)
|
||||
return 0x0010CC;
|
||||
else if (phase == 2)
|
||||
return 0xE5DA00;
|
||||
else
|
||||
return 0x980000;
|
||||
if (phase == 1) return 0x0010CC;
|
||||
else if (phase == 2) return 0xE5DA00;
|
||||
else return 0x980000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,16 +118,17 @@ public class ItemMorphSword extends ItemSword implements IRepairable, IWarpingGe
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int fuckObfuscation, boolean fuckObfuscation2) {
|
||||
super.onUpdate(stack, world, entity, fuckObfuscation, fuckObfuscation2);
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, stack) > 0 && stack.isItemDamaged() && entity != null && entity.ticksExisted % 10 == 0 && entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase)entity);
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, stack) > 0
|
||||
&& stack.isItemDamaged()
|
||||
&& entity != null
|
||||
&& entity.ticksExisted % 10 == 0
|
||||
&& entity instanceof EntityLivingBase) {
|
||||
stack.damageItem(-1, (EntityLivingBase) entity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public int getWarp(ItemStack itemstack, EntityPlayer player) {
|
||||
if(EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, itemstack) > 0)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.voidtouched.effectId, itemstack) > 0) return 1;
|
||||
else return 0;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package fox.spiteful.forbidden.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -20,11 +23,6 @@ import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemRidingCrop extends ItemSword {
|
||||
|
||||
public IIcon icon;
|
||||
@@ -50,7 +48,10 @@ public class ItemRidingCrop extends ItemSword {
|
||||
victim.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 200, 1));
|
||||
victim.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 200, 1));
|
||||
}
|
||||
if (!player.worldObj.isRemote && !Config.noLust && player.worldObj.provider.dimensionId == -1 && player.worldObj.rand.nextInt(15) == 1) {
|
||||
if (!player.worldObj.isRemote
|
||||
&& !Config.noLust
|
||||
&& player.worldObj.provider.dimensionId == -1
|
||||
&& player.worldObj.rand.nextInt(15) == 1) {
|
||||
EntityItem ent = victim.entityDropItem(new ItemStack(ForbiddenItems.deadlyShards, 1, 4), 1.0F);
|
||||
ent.motionY += player.worldObj.rand.nextFloat() * 0.05F;
|
||||
ent.motionX += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F;
|
||||
@@ -103,4 +104,4 @@ public class ItemRidingCrop extends ItemSword {
|
||||
public boolean canHarvestBlock(Block block, ItemStack itemStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package fox.spiteful.forbidden.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -9,11 +12,6 @@ import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemSkullAxe extends ItemSword implements IRepairable {
|
||||
public IIcon icon;
|
||||
|
||||
@@ -41,7 +39,8 @@ public class ItemSkullAxe extends ItemSword implements IRepairable {
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2)) || super.getIsRepairable(stack, stack2);
|
||||
return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2))
|
||||
|| super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
package fox.spiteful.forbidden.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
@@ -7,12 +11,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemTaintPickaxe extends ItemPickaxe implements IRepairable {
|
||||
public IIcon icon;
|
||||
|
||||
@@ -39,6 +37,8 @@ public class ItemTaintPickaxe extends ItemPickaxe implements IRepairable {
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2)) ? true : super.getIsRepairable(stack, stack2);
|
||||
return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2))
|
||||
? true
|
||||
: super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package fox.spiteful.forbidden.items.tools;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -12,85 +15,92 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import thaumcraft.api.IRepairable;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.config.ConfigBlocks;
|
||||
|
||||
public class ItemTaintShovel extends ItemSpade implements IRepairable
|
||||
{
|
||||
public class ItemTaintShovel extends ItemSpade implements IRepairable {
|
||||
public IIcon icon;
|
||||
|
||||
public ItemTaintShovel(ToolMaterial enumtoolmaterial)
|
||||
{
|
||||
public ItemTaintShovel(ToolMaterial enumtoolmaterial) {
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
this.setHarvestLevel("shovel", 3);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir)
|
||||
{
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:taintshovel");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1)
|
||||
{
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack itemstack)
|
||||
{
|
||||
public EnumRarity getRarity(ItemStack itemstack) {
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2)
|
||||
{
|
||||
return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2)) ? true : super.getIsRepairable(stack, stack2);
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2))
|
||||
? true
|
||||
: super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta)
|
||||
{
|
||||
if (ForgeHooks.isToolEffective(stack, block, meta) ||
|
||||
(block.getMaterial() == Config.taintMaterial && block != ForbiddenBlocks.taintLog && block != ForbiddenBlocks.taintPlanks
|
||||
&& block != ForbiddenBlocks.taintStone))
|
||||
{
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
if (ForgeHooks.isToolEffective(stack, block, meta)
|
||||
|| (block.getMaterial() == Config.taintMaterial
|
||||
&& block != ForbiddenBlocks.taintLog
|
||||
&& block != ForbiddenBlocks.taintPlanks
|
||||
&& block != ForbiddenBlocks.taintStone)) {
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
|
||||
return func_150893_a(stack, block);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int side, float par8, float par9, float par10) {
|
||||
public boolean onItemUse(
|
||||
ItemStack itemstack,
|
||||
EntityPlayer player,
|
||||
World world,
|
||||
int x,
|
||||
int y,
|
||||
int z,
|
||||
int side,
|
||||
float par8,
|
||||
float par9,
|
||||
float par10) {
|
||||
int purified = 0;
|
||||
for(int ex = x - 5;ex < x + 6;ex++){
|
||||
for(int wy = y - 4;wy < y + 5;wy++){
|
||||
for(int zee = z - 5;zee < z + 6;zee++){
|
||||
for (int ex = x - 5; ex < x + 6; ex++) {
|
||||
for (int wy = y - 4; wy < y + 5; wy++) {
|
||||
for (int zee = z - 5; zee < z + 6; zee++) {
|
||||
Block target = world.getBlock(ex, wy, zee);
|
||||
if(target != null && (target == ConfigBlocks.blockFluxGoo || target == ConfigBlocks.blockFluxGas)){
|
||||
if (target != null
|
||||
&& (target == ConfigBlocks.blockFluxGoo || target == ConfigBlocks.blockFluxGas)) {
|
||||
purified++;
|
||||
world.setBlockToAir(ex, wy, zee);
|
||||
float d1 = ((float) ex + world.rand.nextFloat());
|
||||
float d2 = ((float) wy + world.rand.nextFloat());
|
||||
float d0 = ((float) zee + world.rand.nextFloat());
|
||||
Thaumcraft.proxy.nodeBolt(world, (float)player.posX, (float)player.posY, (float)player.posZ, d1, d2, d0);
|
||||
Thaumcraft.proxy.nodeBolt(
|
||||
world, (float) player.posX, (float) player.posY, (float) player.posZ, d1, d2, d0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(purified > 0){
|
||||
if (purified > 0) {
|
||||
itemstack.damageItem(Math.min(purified, 15), player);
|
||||
player.swingItem();
|
||||
world.playSoundEffect((double)x + 0.5D, (double)y + 0.5D, (double)z + 0.5D, "thaumcraft:wandfail", 0.2F, 0.2F + world.rand.nextFloat() * 0.2F);
|
||||
world.playSoundEffect(
|
||||
(double) x + 0.5D,
|
||||
(double) y + 0.5D,
|
||||
(double) z + 0.5D,
|
||||
"thaumcraft:wandfail",
|
||||
0.2F,
|
||||
0.2F + world.rand.nextFloat() * 0.2F);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return super.onItemUse(itemstack, player, world, x, y, z, side, par8, par9, par10);
|
||||
} else return super.onItemUse(itemstack, player, world, x, y, z, side, par8, par9, par10);
|
||||
}
|
||||
}
|
||||
@@ -1,88 +1,73 @@
|
||||
package fox.spiteful.forbidden.items.wands;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.IWandRodOnUpdate;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
|
||||
public class BloodStaffUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player)
|
||||
{
|
||||
if(Compat.bm && Config.crossWand && player.ticksExisted % 25 == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(!checkHotbar(itemstack, player))
|
||||
return;
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
if (Compat.bm && Config.crossWand && player.ticksExisted % 25 == 0) {
|
||||
try {
|
||||
if (!checkHotbar(itemstack, player)) return;
|
||||
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
|
||||
|
||||
int cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("alchemical"))
|
||||
cost = Config.bloodvis - 1;
|
||||
else
|
||||
cost = Config.bloodvis;
|
||||
if (((ItemWandCasting) itemstack.getItem())
|
||||
.getCap(itemstack)
|
||||
.getTag()
|
||||
.equals("alchemical")) cost = Config.bloodvis - 1;
|
||||
else cost = Config.bloodvis;
|
||||
|
||||
cost = Math.max(0, cost);
|
||||
|
||||
for(int x = 0;x < primals.length;x++)
|
||||
{
|
||||
int deficit = ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if(deficit > 0)
|
||||
{
|
||||
for (int x = 0; x < primals.length; x++) {
|
||||
int deficit = ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)
|
||||
- ((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if (deficit > 0) {
|
||||
deficit = Math.min(deficit, 100);
|
||||
if(player.capabilities.isCreativeMode)
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if(SoulNetworkHandler.syphonFromNetwork(itemstack, cost * deficit) > 0)
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if(syphonHealth(player))
|
||||
{
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
return;
|
||||
}
|
||||
else
|
||||
if (player.capabilities.isCreativeMode)
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if (SoulNetworkHandler.syphonFromNetwork(itemstack, cost * deficit) > 0)
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if (syphonHealth(player)) {
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
return;
|
||||
} else return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
||||
} catch (Exception e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player){
|
||||
if(player.getHealth() > 3){
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player) {
|
||||
if (player.getHealth() > 3) {
|
||||
player.setHealth(player.getHealth() - 3);
|
||||
return true;
|
||||
}
|
||||
else if(player.getHealth() > 0){
|
||||
} else if (player.getHealth() > 0) {
|
||||
player.func_110142_aN().func_94547_a(new DamageSource("blooderp"), 3, 3);
|
||||
player.setHealth(0);
|
||||
player.onDeath(new DamageSource("blooderp"));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
} else return false;
|
||||
}
|
||||
|
||||
private boolean checkHotbar(ItemStack stack, EntityPlayer player){
|
||||
for(int x = 0; x < 9; ++x){
|
||||
|
||||
private boolean checkHotbar(ItemStack stack, EntityPlayer player) {
|
||||
for (int x = 0; x < 9; ++x) {
|
||||
ItemStack item = player.inventory.getStackInSlot(x);
|
||||
if(item == stack)
|
||||
return true;
|
||||
if (item == stack) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package fox.spiteful.forbidden.items.wands;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -7,65 +8,51 @@ import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.IWandRodOnUpdate;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
|
||||
public class BloodWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player)
|
||||
{
|
||||
if(Compat.bm && Config.crossWand && player.ticksExisted % 100 == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
if (Compat.bm && Config.crossWand && player.ticksExisted % 100 == 0) {
|
||||
try {
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
|
||||
int cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("alchemical"))
|
||||
cost = Config.bloodvis - 1;
|
||||
else
|
||||
cost = Config.bloodvis;
|
||||
if (((ItemWandCasting) itemstack.getItem())
|
||||
.getCap(itemstack)
|
||||
.getTag()
|
||||
.equals("alchemical")) cost = Config.bloodvis - 1;
|
||||
else cost = Config.bloodvis;
|
||||
|
||||
cost = Math.max(0, cost);
|
||||
|
||||
for(int x = 0;x < primals.length;x++)
|
||||
{
|
||||
int deficit = ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if(deficit > 0)
|
||||
{
|
||||
|
||||
for (int x = 0; x < primals.length; x++) {
|
||||
int deficit = ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)
|
||||
- ((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if (deficit > 0) {
|
||||
deficit = Math.min(deficit, 100);
|
||||
if(player.capabilities.isCreativeMode)
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if(SoulNetworkHandler.syphonFromNetwork(itemstack, cost * deficit) > 0)
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if(syphonHealth(player))
|
||||
{
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
return;
|
||||
}
|
||||
else
|
||||
if (player.capabilities.isCreativeMode)
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if (SoulNetworkHandler.syphonFromNetwork(itemstack, cost * deficit) > 0)
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if (syphonHealth(player)) {
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
return;
|
||||
} else return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch(Throwable e)
|
||||
{
|
||||
|
||||
} catch (Throwable e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player)
|
||||
{
|
||||
if(player.getHealth() > 6)
|
||||
{
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player) {
|
||||
if (player.getHealth() > 6) {
|
||||
player.setHealth(player.getHealth() - 3);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
} else return false;
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,15 @@ public class CreativeWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
for (int x = 0; x < primals.length; x++) {
|
||||
if (((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)) {
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]), true);
|
||||
if (((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x])
|
||||
< ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)) {
|
||||
((ItemWandCasting) itemstack.getItem())
|
||||
.addVis(
|
||||
itemstack,
|
||||
primals[x],
|
||||
((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)
|
||||
- ((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]),
|
||||
true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package fox.spiteful.forbidden.items.wands;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
@@ -10,9 +9,9 @@ import thaumcraft.api.wands.WandCap;
|
||||
/**
|
||||
* This class is used to keep the material information for the various caps. It
|
||||
* is also used to generate the wand recipes ingame.
|
||||
*
|
||||
*
|
||||
* @author Azanor
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class DarkWandCap extends WandCap {
|
||||
public DarkWandCap(String tag, float discount, ItemStack item, int craftCost, ResourceLocation skin) {
|
||||
@@ -20,7 +19,14 @@ public class DarkWandCap extends WandCap {
|
||||
setTexture(skin);
|
||||
}
|
||||
|
||||
public DarkWandCap(String tag, float discount, List<Aspect> specialAspects, float discountSpecial, ItemStack item, int craftCost, ResourceLocation skin) {
|
||||
public DarkWandCap(
|
||||
String tag,
|
||||
float discount,
|
||||
List<Aspect> specialAspects,
|
||||
float discountSpecial,
|
||||
ItemStack item,
|
||||
int craftCost,
|
||||
ResourceLocation skin) {
|
||||
super(tag, discount, specialAspects, discountSpecial, item, craftCost);
|
||||
setTexture(skin);
|
||||
}
|
||||
|
||||
@@ -12,28 +12,27 @@ public class InfernalWandUpdate implements IWandRodOnUpdate {
|
||||
Aspect primals[] = {Aspect.ORDER, Aspect.ENTROPY, Aspect.AIR, Aspect.EARTH, Aspect.WATER};
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
if(player.ticksExisted % 100 == 0){
|
||||
if(player.worldObj.provider.dimensionId == -1){
|
||||
for(int x = 0;x < primals.length;x++){
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) / 10) {
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
if (player.ticksExisted % 100 == 0) {
|
||||
if (player.worldObj.provider.dimensionId == -1) {
|
||||
for (int x = 0; x < primals.length; x++) {
|
||||
if (((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x])
|
||||
< ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack) / 10) {
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, Aspect.FIRE) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) / 5) {
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, Aspect.FIRE, 1, true);
|
||||
|
||||
if (((ItemWandCasting) itemstack.getItem()).getVis(itemstack, Aspect.FIRE)
|
||||
< ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack) / 5) {
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, Aspect.FIRE, 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
if(player.isBurning())
|
||||
player.extinguish();
|
||||
|
||||
if(player.isPotionActive(Potion.wither.id)) {
|
||||
if(player.worldObj.isRemote)
|
||||
player.removePotionEffectClient(Potion.wither.id);
|
||||
else
|
||||
player.removePotionEffect(Potion.wither.id);
|
||||
|
||||
if (player.isBurning()) player.extinguish();
|
||||
|
||||
if (player.isPotionActive(Potion.wither.id)) {
|
||||
if (player.worldObj.isRemote) player.removePotionEffectClient(Potion.wither.id);
|
||||
else player.removePotionEffect(Potion.wither.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.DarkAspects;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
@@ -20,8 +21,6 @@ import thaumcraft.api.wands.ItemFocusBasic;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import thaumcraft.common.lib.utils.BlockUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemFocusBlink extends ItemFocusBasic {
|
||||
|
||||
private IIcon icon;
|
||||
@@ -29,75 +28,128 @@ public class ItemFocusBlink extends ItemFocusBasic {
|
||||
AspectList visCost = (new AspectList()).add(Aspect.ENTROPY, 300);
|
||||
AspectList fireCost = (new AspectList()).add(Aspect.ENTROPY, 300).add(Aspect.FIRE, 100);
|
||||
AspectList switchCost = (new AspectList()).add(Aspect.ENTROPY, 300).add(Aspect.ORDER, 100);
|
||||
FocusUpgradeType hellfire = ForbiddenItems.getUpgrade(Config.hellfireUpgradeID, new ResourceLocation("forbidden", "textures/misc/hellfire.png"), "forbidden.upgrade.hellfire.name", "forbidden.upgrade.hellfire.text", (new AspectList()).add(DarkAspects.NETHER, 1));
|
||||
FocusUpgradeType pandemonium = ForbiddenItems.getUpgrade(Config.pandemoniumUpgradeID, new ResourceLocation("forbidden", "textures/misc/pandemonium.png"), "forbidden.upgrade.pandemonium.name", "forbidden.upgrade.pandemonium.text", (new AspectList()).add(Aspect.DARKNESS, 1));
|
||||
FocusUpgradeType hellfire = ForbiddenItems.getUpgrade(
|
||||
Config.hellfireUpgradeID,
|
||||
new ResourceLocation("forbidden", "textures/misc/hellfire.png"),
|
||||
"forbidden.upgrade.hellfire.name",
|
||||
"forbidden.upgrade.hellfire.text",
|
||||
(new AspectList()).add(DarkAspects.NETHER, 1));
|
||||
FocusUpgradeType pandemonium = ForbiddenItems.getUpgrade(
|
||||
Config.pandemoniumUpgradeID,
|
||||
new ResourceLocation("forbidden", "textures/misc/pandemonium.png"),
|
||||
"forbidden.upgrade.pandemonium.name",
|
||||
"forbidden.upgrade.pandemonium.text",
|
||||
(new AspectList()).add(Aspect.DARKNESS, 1));
|
||||
|
||||
public ItemFocusBlink(){
|
||||
public ItemFocusBlink() {
|
||||
super();
|
||||
setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onFocusRightClick(ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition wut) {
|
||||
MovingObjectPosition mop = BlockUtils.getTargetBlock(world, (player.prevPosX + (player.posX - player.prevPosX)),
|
||||
public ItemStack onFocusRightClick(
|
||||
ItemStack itemstack, World world, EntityPlayer player, MovingObjectPosition wut) {
|
||||
MovingObjectPosition mop = BlockUtils.getTargetBlock(
|
||||
world,
|
||||
(player.prevPosX + (player.posX - player.prevPosX)),
|
||||
(player.prevPosY + (player.posY - player.prevPosY) + 1.62 - player.yOffset),
|
||||
(player.prevPosZ + (player.posZ - player.prevPosZ)),
|
||||
(player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw)),
|
||||
(player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch)), false, 128.0);
|
||||
if(mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && mop.sideHit != -1){
|
||||
ItemWandCasting wand = (ItemWandCasting)itemstack.getItem();
|
||||
if(wand.consumeAllVis(itemstack, player, getVisCost(itemstack), false, false)){
|
||||
(player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch)),
|
||||
false,
|
||||
128.0);
|
||||
if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && mop.sideHit != -1) {
|
||||
ItemWandCasting wand = (ItemWandCasting) itemstack.getItem();
|
||||
if (wand.consumeAllVis(itemstack, player, getVisCost(itemstack), false, false)) {
|
||||
double ex = mop.hitVec.xCoord;
|
||||
double wy = mop.hitVec.yCoord;
|
||||
double zee = mop.hitVec.zCoord;
|
||||
switch(mop.sideHit){
|
||||
case 0: wy -= 2.0;
|
||||
switch (mop.sideHit) {
|
||||
case 0:
|
||||
wy -= 2.0;
|
||||
break;
|
||||
case 1: break;
|
||||
case 2: zee -= 0.5;
|
||||
case 1:
|
||||
break;
|
||||
case 3: zee += 0.5;
|
||||
case 2:
|
||||
zee -= 0.5;
|
||||
break;
|
||||
case 4: ex -= 0.5;
|
||||
case 3:
|
||||
zee += 0.5;
|
||||
break;
|
||||
case 5: ex += 0.5;
|
||||
case 4:
|
||||
ex -= 0.5;
|
||||
break;
|
||||
case 5:
|
||||
ex += 0.5;
|
||||
break;
|
||||
}
|
||||
world.playAuxSFXAtEntity((EntityPlayer) null, 1009, (int) player.posX, (int) player.posY, (int) player.posZ, 0);
|
||||
for (int k = 0; k < 8; ++k)
|
||||
{
|
||||
world.spawnParticle("smoke", player.posX + (world.rand.nextDouble() - 0.5D) * (double)player.width, player.posY + world.rand.nextDouble() * (double)player.height - 0.25D, player.posZ + (world.rand.nextDouble() - 0.5D) * (double)player.width, 0, 0, 0);
|
||||
world.playAuxSFXAtEntity(
|
||||
(EntityPlayer) null, 1009, (int) player.posX, (int) player.posY, (int) player.posZ, 0);
|
||||
for (int k = 0; k < 8; ++k) {
|
||||
world.spawnParticle(
|
||||
"smoke",
|
||||
player.posX + (world.rand.nextDouble() - 0.5D) * (double) player.width,
|
||||
player.posY + world.rand.nextDouble() * (double) player.height - 0.25D,
|
||||
player.posZ + (world.rand.nextDouble() - 0.5D) * (double) player.width,
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
double range = 3.0 + 1.5 * wand.getFocusEnlarge(itemstack);
|
||||
if(this.isUpgradedWith(wand.getFocusItem(itemstack), hellfire)) {
|
||||
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(ex - range, wy - range, zee - range, ex + range, wy + range, zee + range));
|
||||
if (this.isUpgradedWith(wand.getFocusItem(itemstack), hellfire)) {
|
||||
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(
|
||||
EntityLivingBase.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
ex - range, wy - range, zee - range, ex + range, wy + range, zee + range));
|
||||
for (EntityLivingBase entity : entities) {
|
||||
if(entity == player)
|
||||
continue;
|
||||
if (entity == player) continue;
|
||||
for (int k = 0; k < 8; ++k) {
|
||||
world.spawnParticle("flame", entity.posX + (world.rand.nextDouble() - 0.5D) * (double) entity.width, entity.posY + world.rand.nextDouble() * (double) entity.height - 0.25D, entity.posZ + (world.rand.nextDouble() - 0.5D) * (double) entity.width, 0, 0, 0);
|
||||
world.spawnParticle(
|
||||
"flame",
|
||||
entity.posX + (world.rand.nextDouble() - 0.5D) * (double) entity.width,
|
||||
entity.posY + world.rand.nextDouble() * (double) entity.height - 0.25D,
|
||||
entity.posZ + (world.rand.nextDouble() - 0.5D) * (double) entity.width,
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
int potency = wand.getFocusPotency(itemstack);
|
||||
entity.attackEntityFrom((new EntityDamageSource("fireball", player)).setFireDamage(), 3 + 3 * potency);
|
||||
entity.attackEntityFrom(
|
||||
(new EntityDamageSource("fireball", player)).setFireDamage(), 3 + 3 * potency);
|
||||
entity.setFire(3 + 3 * potency);
|
||||
}
|
||||
}
|
||||
else if(this.isUpgradedWith(wand.getFocusItem(itemstack), pandemonium)){
|
||||
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(ex - range, wy - range, zee - range, ex + range, wy + range, zee + range));
|
||||
} else if (this.isUpgradedWith(wand.getFocusItem(itemstack), pandemonium)) {
|
||||
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(
|
||||
EntityLivingBase.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
ex - range, wy - range, zee - range, ex + range, wy + range, zee + range));
|
||||
for (EntityLivingBase entity : entities) {
|
||||
if(!(entity instanceof IMob))
|
||||
continue;
|
||||
if (!(entity instanceof IMob)) continue;
|
||||
for (int k = 0; k < 8; ++k) {
|
||||
world.spawnParticle("smoke", entity.posX + (world.rand.nextDouble() - 0.5D) * (double) entity.width, entity.posY + world.rand.nextDouble() * (double) entity.height - 0.25D, entity.posZ + (world.rand.nextDouble() - 0.5D) * (double) entity.width, 0, 0, 0);
|
||||
world.spawnParticle(
|
||||
"smoke",
|
||||
entity.posX + (world.rand.nextDouble() - 0.5D) * (double) entity.width,
|
||||
entity.posY + world.rand.nextDouble() * (double) entity.height - 0.25D,
|
||||
entity.posZ + (world.rand.nextDouble() - 0.5D) * (double) entity.width,
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
entity.setPositionAndUpdate(player.posX, player.posY, player.posZ);
|
||||
}
|
||||
}
|
||||
player.setPositionAndUpdate(ex, wy, zee);
|
||||
world.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)player.posX, (int)player.posY, (int)player.posZ, 0);
|
||||
for (int k = 0; k < 8; ++k)
|
||||
{
|
||||
world.spawnParticle("flame", player.posX + (world.rand.nextDouble() - 0.5D) * (double)player.width, player.posY + world.rand.nextDouble() * (double)player.height - 0.25D, player.posZ + (world.rand.nextDouble() - 0.5D) * (double)player.width, 0, 0, 0);
|
||||
world.playAuxSFXAtEntity(
|
||||
(EntityPlayer) null, 1009, (int) player.posX, (int) player.posY, (int) player.posZ, 0);
|
||||
for (int k = 0; k < 8; ++k) {
|
||||
world.spawnParticle(
|
||||
"flame",
|
||||
player.posX + (world.rand.nextDouble() - 0.5D) * (double) player.width,
|
||||
player.posY + world.rand.nextDouble() * (double) player.height - 0.25D,
|
||||
player.posZ + (world.rand.nextDouble() - 0.5D) * (double) player.width,
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
wand.consumeAllVis(itemstack, player, getVisCost(itemstack), true, false);
|
||||
player.swingItem();
|
||||
@@ -123,7 +175,7 @@ public class ItemFocusBlink extends ItemFocusBasic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFocusColor(ItemStack item){
|
||||
public int getFocusColor(ItemStack item) {
|
||||
return 0x909090;
|
||||
}
|
||||
|
||||
@@ -133,13 +185,15 @@ public class ItemFocusBlink extends ItemFocusBasic {
|
||||
}
|
||||
|
||||
@Override
|
||||
public AspectList getVisCost(ItemStack item){
|
||||
return this.isUpgradedWith(item, hellfire) ? fireCost : this.isUpgradedWith(item, pandemonium) ? switchCost : visCost;
|
||||
public AspectList getVisCost(ItemStack item) {
|
||||
return this.isUpgradedWith(item, hellfire)
|
||||
? fireCost
|
||||
: this.isUpgradedWith(item, pandemonium) ? switchCost : visCost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack item, int rank){
|
||||
switch(rank){
|
||||
public FocusUpgradeType[] getPossibleUpgradesByRank(ItemStack item, int rank) {
|
||||
switch (rank) {
|
||||
case 1:
|
||||
return new FocusUpgradeType[] {FocusUpgradeType.frugal};
|
||||
case 2:
|
||||
@@ -147,12 +201,13 @@ public class ItemFocusBlink extends ItemFocusBasic {
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
if(this.isUpgradedWith(item, hellfire))
|
||||
return new FocusUpgradeType[] {FocusUpgradeType.potency, FocusUpgradeType.frugal, FocusUpgradeType.enlarge};
|
||||
else if(this.isUpgradedWith(item, pandemonium))
|
||||
if (this.isUpgradedWith(item, hellfire))
|
||||
return new FocusUpgradeType[] {
|
||||
FocusUpgradeType.potency, FocusUpgradeType.frugal, FocusUpgradeType.enlarge
|
||||
};
|
||||
else if (this.isUpgradedWith(item, pandemonium))
|
||||
return new FocusUpgradeType[] {FocusUpgradeType.frugal, FocusUpgradeType.enlarge};
|
||||
else
|
||||
return new FocusUpgradeType[] {FocusUpgradeType.frugal};
|
||||
else return new FocusUpgradeType[] {FocusUpgradeType.frugal};
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,27 +1,19 @@
|
||||
package fox.spiteful.forbidden.items.wands;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import java.util.List;
|
||||
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 cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemWandCaps extends Item {
|
||||
|
||||
public final String[] types = {
|
||||
"alchemical",
|
||||
"vinteum",
|
||||
"terrasteel",
|
||||
"manasteel",
|
||||
"manasteel_inert",
|
||||
"elementium",
|
||||
"elementium_inert"
|
||||
"alchemical", "vinteum", "terrasteel", "manasteel", "manasteel_inert", "elementium", "elementium_inert"
|
||||
};
|
||||
public IIcon[] icon;
|
||||
|
||||
@@ -36,8 +28,7 @@ public class ItemWandCaps extends Item {
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icon = new IIcon[types.length];
|
||||
for(int x = 0; x < types.length; x++)
|
||||
this.icon[x] = ir.registerIcon("forbidden:wand_cap_" + types[x]);
|
||||
for (int x = 0; x < types.length; x++) this.icon[x] = ir.registerIcon("forbidden:wand_cap_" + types[x]);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -49,7 +40,7 @@ public class ItemWandCaps extends Item {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs xCreativeTabs, List list) {
|
||||
for(int x = 0; x < types.length; x++){
|
||||
for (int x = 0; x < types.length; x++) {
|
||||
list.add(new ItemStack(this, 1, x));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
package fox.spiteful.forbidden.items.wands;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.Forbidden;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import java.util.List;
|
||||
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.api.ItemApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.WandCap;
|
||||
@@ -17,28 +18,24 @@ import thaumcraft.api.wands.WandRod;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemWandCores extends Item {
|
||||
|
||||
public final String[] types = {
|
||||
"tainted",
|
||||
"infernal",
|
||||
"soul",
|
||||
"blood",
|
||||
"witchwood",
|
||||
"profane",
|
||||
"blood_inert",
|
||||
"livingwood",
|
||||
"livingwood_inert",
|
||||
"blood_staff",
|
||||
"witchwood_staff",
|
||||
"dreamwood",
|
||||
"dreamwood_inert",
|
||||
"dreamwood_staff" };
|
||||
"tainted",
|
||||
"infernal",
|
||||
"soul",
|
||||
"blood",
|
||||
"witchwood",
|
||||
"profane",
|
||||
"blood_inert",
|
||||
"livingwood",
|
||||
"livingwood_inert",
|
||||
"blood_staff",
|
||||
"witchwood_staff",
|
||||
"dreamwood",
|
||||
"dreamwood_inert",
|
||||
"dreamwood_staff"
|
||||
};
|
||||
public IIcon[] icon;
|
||||
|
||||
public ItemWandCores() {
|
||||
@@ -52,8 +49,7 @@ public class ItemWandCores extends Item {
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icon = new IIcon[types.length];
|
||||
for (int x = 0; x < types.length; x++)
|
||||
this.icon[x] = ir.registerIcon("forbidden:wand_rod_" + types[x]);
|
||||
for (int x = 0; x < types.length; x++) this.icon[x] = ir.registerIcon("forbidden:wand_rod_" + types[x]);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -88,7 +84,16 @@ public class ItemWandCores extends Item {
|
||||
wand = new ItemStack(ConfigItems.itemWandCasting, 1, 36);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("iron"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("profane"));
|
||||
((ItemWandCasting) wand.getItem()).storeAllVis(wand, new AspectList().add(Aspect.FIRE, 5000).add(Aspect.WATER, 5000).add(Aspect.EARTH, 5000).add(Aspect.AIR, 5000).add(Aspect.ORDER, 5000).add(Aspect.ENTROPY, 5000));
|
||||
((ItemWandCasting) wand.getItem())
|
||||
.storeAllVis(
|
||||
wand,
|
||||
new AspectList()
|
||||
.add(Aspect.FIRE, 5000)
|
||||
.add(Aspect.WATER, 5000)
|
||||
.add(Aspect.EARTH, 5000)
|
||||
.add(Aspect.AIR, 5000)
|
||||
.add(Aspect.ORDER, 5000)
|
||||
.add(Aspect.ENTROPY, 5000));
|
||||
list.add(wand);
|
||||
if (Compat.bm && Config.crossWand) {
|
||||
wand = new ItemStack(ConfigItems.itemWandCasting, 1, 84);
|
||||
|
||||
@@ -15,40 +15,35 @@ public class ManaStaffUpdate implements IWandRodOnUpdate {
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
if(Compat.am2 && Config.crossWand)
|
||||
{
|
||||
if(player.ticksExisted % 40 == 0){
|
||||
|
||||
try
|
||||
{
|
||||
if (Compat.am2 && Config.crossWand) {
|
||||
if (player.ticksExisted % 40 == 0) {
|
||||
|
||||
try {
|
||||
IExtendedProperties prop = ArsMagicaApi.instance.getExtendedProperties(player);
|
||||
|
||||
|
||||
float cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("vinteum"))
|
||||
cost = 0.5F;
|
||||
else
|
||||
cost = 1.0F;
|
||||
|
||||
if(prop == null || prop.getCurrentMana() <= 0)
|
||||
return;
|
||||
|
||||
|
||||
for(int x = 0;x < primals.length;x++){
|
||||
int deficit = ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if(deficit > 0) {
|
||||
if (((ItemWandCasting) itemstack.getItem())
|
||||
.getCap(itemstack)
|
||||
.getTag()
|
||||
.equals("vinteum")) cost = 0.5F;
|
||||
else cost = 1.0F;
|
||||
|
||||
if (prop == null || prop.getCurrentMana() <= 0) return;
|
||||
|
||||
for (int x = 0; x < primals.length; x++) {
|
||||
int deficit = ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)
|
||||
- ((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if (deficit > 0) {
|
||||
deficit = Math.min(deficit, 100);
|
||||
if(prop.getCurrentMana() > cost * deficit)
|
||||
{
|
||||
if (prop.getCurrentMana() > cost * deficit) {
|
||||
prop.setCurrentMana(prop.getCurrentMana() - cost * deficit);
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Throwable e){}
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,11 @@ package fox.spiteful.forbidden.items.wands;
|
||||
import am2.api.ArsMagicaApi;
|
||||
import am2.api.IExtendedProperties;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.IWandRodOnUpdate;
|
||||
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class ManaWandUpdate implements IWandRodOnUpdate {
|
||||
@@ -16,40 +15,35 @@ public class ManaWandUpdate implements IWandRodOnUpdate {
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
if(Compat.am2 && Config.crossWand)
|
||||
{
|
||||
if(player.ticksExisted % 100 == 0){
|
||||
|
||||
try
|
||||
{
|
||||
if (Compat.am2 && Config.crossWand) {
|
||||
if (player.ticksExisted % 100 == 0) {
|
||||
|
||||
try {
|
||||
IExtendedProperties prop = ArsMagicaApi.instance.getExtendedProperties(player);
|
||||
|
||||
|
||||
float cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("vinteum"))
|
||||
cost = 0.8F;
|
||||
else
|
||||
cost = 1.4F;
|
||||
|
||||
if(prop == null || prop.getCurrentMana() <= 0)
|
||||
return;
|
||||
|
||||
|
||||
for(int x = 0;x < primals.length;x++){
|
||||
int deficit = ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if(deficit > 0) {
|
||||
if (((ItemWandCasting) itemstack.getItem())
|
||||
.getCap(itemstack)
|
||||
.getTag()
|
||||
.equals("vinteum")) cost = 0.8F;
|
||||
else cost = 1.4F;
|
||||
|
||||
if (prop == null || prop.getCurrentMana() <= 0) return;
|
||||
|
||||
for (int x = 0; x < primals.length; x++) {
|
||||
int deficit = ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)
|
||||
- ((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if (deficit > 0) {
|
||||
deficit = Math.min(deficit, 100);
|
||||
if(prop.getCurrentMana() > cost * deficit)
|
||||
{
|
||||
if (prop.getCurrentMana() > cost * deficit) {
|
||||
prop.setCurrentMana(prop.getCurrentMana() - cost * deficit);
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
catch(Throwable e){}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -15,34 +15,38 @@ public class ProfaneWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
|
||||
if(player.ticksExisted % 20 == 0){
|
||||
if (player.ticksExisted % 20 == 0) {
|
||||
|
||||
NBTTagCompound tag = itemstack.getTagCompound();
|
||||
if(!tag.hasKey("contract")){
|
||||
if (!tag.hasKey("contract")) {
|
||||
Thaumcraft.proxy.getResearchManager().completeResearch(player, "ROD_profane");
|
||||
tag.setInteger("contract", 25000);
|
||||
}
|
||||
else if(tag.getInteger("contract") <= 0)
|
||||
return;
|
||||
} else if (tag.getInteger("contract") <= 0) return;
|
||||
|
||||
for(int x = 0;x < primals.length && tag.getInteger("contract") > 0;x++){
|
||||
int deficit = ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if(deficit > 0) {
|
||||
for (int x = 0; x < primals.length && tag.getInteger("contract") > 0; x++) {
|
||||
int deficit = ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)
|
||||
- ((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if (deficit > 0) {
|
||||
int restore = Math.min(tag.getInteger("contract"), deficit);
|
||||
((ItemWandCasting)itemstack.getItem()).addRealVis(itemstack, primals[x], restore, true);
|
||||
((ItemWandCasting) itemstack.getItem()).addRealVis(itemstack, primals[x], restore, true);
|
||||
tag.setInteger("contract", tag.getInteger("contract") - restore);
|
||||
if(player.worldObj.rand.nextInt(2501) < restore)
|
||||
Thaumcraft.addStickyWarpToPlayer(player, 1);
|
||||
if (player.worldObj.rand.nextInt(2501) < restore) Thaumcraft.addStickyWarpToPlayer(player, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if(tag.getInteger("contract") <= 0) {
|
||||
((ItemWandCasting)itemstack.getItem()).setRod(itemstack, WandRod.rods.get("profaned"));
|
||||
if (tag.getInteger("contract") <= 0) {
|
||||
((ItemWandCasting) itemstack.getItem()).setRod(itemstack, WandRod.rods.get("profaned"));
|
||||
Thaumcraft.addStickyWarpToPlayer(player, 1);
|
||||
player.worldObj.spawnParticle("largeexplode", player.posX, player.posY + (double)(player.height / 2.0F), player.posZ, 0.0D, 0.0D, 0.0D);
|
||||
player.worldObj.spawnParticle(
|
||||
"largeexplode",
|
||||
player.posX,
|
||||
player.posY + (double) (player.height / 2.0F),
|
||||
player.posZ,
|
||||
0.0D,
|
||||
0.0D,
|
||||
0.0D);
|
||||
}
|
||||
itemstack.setTagCompound(tag);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -6,20 +6,20 @@ import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.IWandRodOnUpdate;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
public class TaintedWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
if(player.ticksExisted % 100 == 0 && player.worldObj.getBiomeGenForCoords((int)player.posX, (int)player.posZ).biomeID == thaumcraft.common.config.Config.biomeTaintID){
|
||||
for(int x = 0;x < primals.length;x++){
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) / 10) {
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
if (player.ticksExisted % 100 == 0
|
||||
&& player.worldObj.getBiomeGenForCoords((int) player.posX, (int) player.posZ).biomeID
|
||||
== thaumcraft.common.config.Config.biomeTaintID) {
|
||||
for (int x = 0; x < primals.length; x++) {
|
||||
if (((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x])
|
||||
< ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack) / 10) {
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,65 +1,55 @@
|
||||
package fox.spiteful.forbidden.items.wands;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.LogHandler;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.IWandRodOnUpdate;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
|
||||
public class YandereWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player)
|
||||
{
|
||||
if(Compat.botan && Config.crossWand && player.ticksExisted % 40 == 0 && checkHotbar(itemstack, player))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
if (Compat.botan && Config.crossWand && player.ticksExisted % 40 == 0 && checkHotbar(itemstack, player)) {
|
||||
try {
|
||||
int cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("manasteel")
|
||||
||((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("elementium"))
|
||||
cost = Config.manavis - 2;
|
||||
else
|
||||
cost = Config.manavis;
|
||||
if (((ItemWandCasting) itemstack.getItem())
|
||||
.getCap(itemstack)
|
||||
.getTag()
|
||||
.equals("manasteel")
|
||||
|| ((ItemWandCasting) itemstack.getItem())
|
||||
.getCap(itemstack)
|
||||
.getTag()
|
||||
.equals("elementium")) cost = Config.manavis - 2;
|
||||
else cost = Config.manavis;
|
||||
|
||||
cost = Math.max(0, cost);
|
||||
|
||||
for(int x = 0;x < primals.length;x++)
|
||||
{
|
||||
int deficit = ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if(deficit > 0)
|
||||
{
|
||||
|
||||
for (int x = 0; x < primals.length; x++) {
|
||||
int deficit = ((ItemWandCasting) itemstack.getItem()).getMaxVis(itemstack)
|
||||
- ((ItemWandCasting) itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if (deficit > 0) {
|
||||
deficit = Math.min(deficit, 100);
|
||||
if(ManaItemHandler.requestManaExact(itemstack, player, cost * deficit, true))
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
if (ManaItemHandler.requestManaExact(itemstack, player, cost * deficit, true))
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch(Throwable e)
|
||||
{
|
||||
|
||||
} catch (Throwable e) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean checkHotbar(ItemStack stack, EntityPlayer player)
|
||||
{
|
||||
for(int x = 0; x < 9; ++x)
|
||||
{
|
||||
private boolean checkHotbar(ItemStack stack, EntityPlayer player) {
|
||||
for (int x = 0; x < 9; ++x) {
|
||||
ItemStack item = player.inventory.getStackInSlot(x);
|
||||
if(item == stack)
|
||||
return true;
|
||||
if (item == stack) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,19 +2,18 @@ package fox.spiteful.forbidden.potions;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.compat.Compat;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class DarkPotions {
|
||||
public static final ResourceLocation icons = new ResourceLocation("forbidden", "textures/misc/potions.png");
|
||||
public static Potion bloodSeal;
|
||||
public static Potion dragonwrack;
|
||||
|
||||
public static void alchemize(){
|
||||
if(Potion.potionTypes.length < 256) {
|
||||
public static void alchemize() {
|
||||
if (Potion.potionTypes.length < 256) {
|
||||
Potion[] potionTypes = null;
|
||||
for (Field f : Potion.class.getDeclaredFields()) {
|
||||
f.setAccessible(true);
|
||||
@@ -35,7 +34,6 @@ public class DarkPotions {
|
||||
}
|
||||
}
|
||||
|
||||
if(Compat.bm)
|
||||
bloodSeal = new PotionBloodSeal(Config.bloodSealPotionID);
|
||||
if (Compat.bm) bloodSeal = new PotionBloodSeal(Config.bloodSealPotionID);
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
||||
public class PotionBloodSeal extends Potion {
|
||||
public PotionBloodSeal(int id){
|
||||
public PotionBloodSeal(int id) {
|
||||
super(id, true, 0xAC1919);
|
||||
this.setPotionName("potion.blood_seal");
|
||||
this.setIconIndex(4, 0);
|
||||
|
||||
@@ -11,11 +11,10 @@
|
||||
*
|
||||
* File Created @ [May 15, 2014, 4:47:41 PM (GMT)]
|
||||
*/
|
||||
|
||||
package fox.spiteful.forbidden.tiles;
|
||||
|
||||
import java.util.List;
|
||||
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;
|
||||
@@ -25,45 +24,59 @@ 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;
|
||||
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) {
|
||||
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(){
|
||||
public IIcon getIcon() {
|
||||
return BotaniaAPI.getSignatureForName("bloodthorn").getIconForStack(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package fox.spiteful.forbidden.tiles;
|
||||
|
||||
import fox.spiteful.forbidden.compat.DarkSignature;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -19,41 +18,45 @@ public class SubTileEuclidaisy extends SubTileFunctional {
|
||||
public static LexiconEntry lexicon;
|
||||
|
||||
@Override
|
||||
public void onUpdate(){
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(redstoneSignal > 0)
|
||||
return;
|
||||
if (redstoneSignal > 0) return;
|
||||
|
||||
if(mana >= cost && !supertile.getWorldObj().isRemote && this.ticksExisted % 400 == 0) {
|
||||
Thaumcraft.proxy.burst(supertile.getWorldObj(), (double)supertile.xCoord + 0.5D, (double)supertile.yCoord + 0.5D, (double)supertile.zCoord + 0.5D, 1.0F);
|
||||
if (mana >= cost && !supertile.getWorldObj().isRemote && this.ticksExisted % 400 == 0) {
|
||||
Thaumcraft.proxy.burst(
|
||||
supertile.getWorldObj(),
|
||||
(double) supertile.xCoord + 0.5D,
|
||||
(double) supertile.yCoord + 0.5D,
|
||||
(double) supertile.zCoord + 0.5D,
|
||||
1.0F);
|
||||
AspectList aspect;
|
||||
if(supertile.getWorldObj().rand.nextInt(10) < 4)
|
||||
aspect = (new AspectList()).add(Aspect.AURA, 2);
|
||||
if (supertile.getWorldObj().rand.nextInt(10) < 4) aspect = (new AspectList()).add(Aspect.AURA, 2);
|
||||
else {
|
||||
Aspect[] aspects = Aspect.aspects.values().toArray(new Aspect[0]);
|
||||
aspect = (new AspectList()).add(aspects[supertile.getWorldObj().rand.nextInt(aspects.length)], 2);
|
||||
aspect = (new AspectList())
|
||||
.add(aspects[supertile.getWorldObj().rand.nextInt(aspects.length)], 2);
|
||||
}
|
||||
ItemStack ess = new ItemStack(ConfigItems.itemWispEssence);
|
||||
((ItemWispEssence)ess.getItem()).setAspects(ess, aspect);
|
||||
((ItemWispEssence) ess.getItem()).setAspects(ess, aspect);
|
||||
dropItem(supertile.getWorldObj(), supertile.xCoord, supertile.yCoord, supertile.zCoord, ess);
|
||||
mana -= cost;
|
||||
sync();
|
||||
}
|
||||
}
|
||||
|
||||
public void dropItem(World world, int x, int y, int z, ItemStack item){
|
||||
public void dropItem(World world, int x, int y, int z, ItemStack item) {
|
||||
float f = 0.7F;
|
||||
double d0 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d1 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
EntityItem entityitem = new EntityItem(world, (double)x + d0, (double)y + d1, (double)z + d2, item);
|
||||
double d0 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
||||
double d1 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
||||
double d2 = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
||||
EntityItem entityitem = new EntityItem(world, (double) x + d0, (double) y + d1, (double) z + d2, item);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor(){
|
||||
public int getColor() {
|
||||
return 0xFF8CFF;
|
||||
}
|
||||
|
||||
@@ -68,12 +71,12 @@ public class SubTileEuclidaisy extends SubTileFunctional {
|
||||
}
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(){
|
||||
public LexiconEntry getEntry() {
|
||||
return lexicon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(){
|
||||
public IIcon getIcon() {
|
||||
return BotaniaAPI.getSignatureForName("euclidaisy").getIconForStack(null);
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,6 @@
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
*/
|
||||
|
||||
package fox.spiteful.forbidden.tiles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -21,8 +20,6 @@ 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";
|
||||
@@ -34,7 +31,7 @@ public class SubTileTainthistle extends SubTileGenerating {
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
boolean didSomething = false;
|
||||
if(this.ticksExisted % 80 == 0) {
|
||||
if (this.ticksExisted % 80 == 0) {
|
||||
if (!supertile.getWorldObj().isRemote) {
|
||||
for (int ex = supertile.xCoord - range; ex <= supertile.xCoord + range; ex++) {
|
||||
for (int wy = supertile.yCoord - range; wy <= supertile.yCoord + range; wy++) {
|
||||
@@ -55,9 +52,8 @@ public class SubTileTainthistle extends SubTileGenerating {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(burnTime > 0){
|
||||
if(supertile.getWorldObj().rand.nextInt(8) == 0)
|
||||
doBurnParticles();
|
||||
if (burnTime > 0) {
|
||||
if (supertile.getWorldObj().rand.nextInt(8) == 0) doBurnParticles();
|
||||
burnTime--;
|
||||
}
|
||||
}
|
||||
@@ -68,16 +64,25 @@ public class SubTileTainthistle extends SubTileGenerating {
|
||||
}
|
||||
|
||||
public void doBurnParticles() {
|
||||
Thaumcraft.proxy.reservoirBubble(supertile.getWorldObj(), supertile.xCoord, supertile.yCoord, supertile.zCoord, 0x4D00FF);
|
||||
Thaumcraft.proxy.reservoirBubble(
|
||||
supertile.getWorldObj(), supertile.xCoord, supertile.yCoord, supertile.zCoord, 0x4D00FF);
|
||||
}
|
||||
|
||||
public boolean isFlux(int x, int y, int z){
|
||||
public boolean isFlux(int x, int y, int z) {
|
||||
Block target = supertile.getWorldObj().getBlock(x, y, z);
|
||||
return target == ConfigBlocks.blockFluxGas || target == ConfigBlocks.blockFluxGoo;
|
||||
}
|
||||
|
||||
public void playSound() {
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.drink", 0.05F, 0.5F + (float) Math.random() * 0.5F);
|
||||
supertile
|
||||
.getWorldObj()
|
||||
.playSoundEffect(
|
||||
supertile.xCoord,
|
||||
supertile.yCoord,
|
||||
supertile.zCoord,
|
||||
"random.drink",
|
||||
0.05F,
|
||||
0.5F + (float) Math.random() * 0.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -123,8 +128,7 @@ public class SubTileTainthistle extends SubTileGenerating {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(){
|
||||
public IIcon getIcon() {
|
||||
return BotaniaAPI.getSignatureForName("tainthistle").getIconForStack(null);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package fox.spiteful.forbidden.tiles;
|
||||
|
||||
import fox.spiteful.forbidden.compat.DarkSignature;
|
||||
import java.util.List;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
@@ -14,48 +14,62 @@ import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SubTileWhisperweed extends SubTileFunctional {
|
||||
private static final int cost = 6000;
|
||||
private final static int range = 3;
|
||||
private static final int range = 3;
|
||||
public static LexiconEntry lexicon;
|
||||
|
||||
@Override
|
||||
public void onUpdate(){
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
if(redstoneSignal > 0)
|
||||
return;
|
||||
if (redstoneSignal > 0) return;
|
||||
|
||||
if(!supertile.getWorldObj().isRemote && mana >= cost && this.ticksExisted % 300 == 0) {
|
||||
List<EntityPlayer> players = supertile.getWorldObj().getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - range, supertile.zCoord - range, supertile.xCoord + range + 1, supertile.yCoord + range + 1, supertile.zCoord + range + 1));
|
||||
if(players.size() > 0) {
|
||||
if (!supertile.getWorldObj().isRemote && mana >= cost && this.ticksExisted % 300 == 0) {
|
||||
List<EntityPlayer> players = supertile
|
||||
.getWorldObj()
|
||||
.getEntitiesWithinAABB(
|
||||
EntityPlayer.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
supertile.xCoord - range,
|
||||
supertile.yCoord - range,
|
||||
supertile.zCoord - range,
|
||||
supertile.xCoord + range + 1,
|
||||
supertile.yCoord + range + 1,
|
||||
supertile.zCoord + range + 1));
|
||||
if (players.size() > 0) {
|
||||
EntityPlayer player = players.get(supertile.getWorldObj().rand.nextInt(players.size()));
|
||||
int amt = 1 + player.worldObj.rand.nextInt(3);
|
||||
if(player.worldObj.rand.nextInt(10) < 2){
|
||||
if (player.worldObj.rand.nextInt(10) < 2) {
|
||||
amt += 1 + player.worldObj.rand.nextInt(3);
|
||||
Thaumcraft.addWarpToPlayer(player, 1 + player.worldObj.rand.nextInt(5), true);
|
||||
}
|
||||
|
||||
for(int a = 0; a < amt; ++a) {
|
||||
for (int a = 0; a < amt; ++a) {
|
||||
Aspect aspect;
|
||||
if(player.worldObj.rand.nextInt(25) > 2)
|
||||
aspect = (Aspect)Aspect.getPrimalAspects().get(player.worldObj.rand.nextInt(6));
|
||||
if (player.worldObj.rand.nextInt(25) > 2)
|
||||
aspect = (Aspect) Aspect.getPrimalAspects().get(player.worldObj.rand.nextInt(6));
|
||||
else
|
||||
aspect = (Aspect)Aspect.getCompoundAspects().get(player.worldObj.rand.nextInt(Aspect.getCompoundAspects().size()));
|
||||
Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getCommandSenderName(), aspect, (short)1);
|
||||
PacketHandler.INSTANCE.sendTo(new PacketAspectPool(aspect.getTag(), (short)1, Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(player.getCommandSenderName(), aspect))), (EntityPlayerMP)player);
|
||||
aspect = (Aspect) Aspect.getCompoundAspects()
|
||||
.get(player.worldObj.rand.nextInt(
|
||||
Aspect.getCompoundAspects().size()));
|
||||
Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getCommandSenderName(), aspect, (short) 1);
|
||||
PacketHandler.INSTANCE.sendTo(
|
||||
new PacketAspectPool(
|
||||
aspect.getTag(),
|
||||
(short) 1,
|
||||
Short.valueOf(Thaumcraft.proxy.playerKnowledge.getAspectPoolFor(
|
||||
player.getCommandSenderName(), aspect))),
|
||||
(EntityPlayerMP) player);
|
||||
ResearchManager.scheduleSave(player);
|
||||
}
|
||||
mana -= cost;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColor(){
|
||||
public int getColor() {
|
||||
return 0x745380;
|
||||
}
|
||||
|
||||
@@ -70,12 +84,12 @@ public class SubTileWhisperweed extends SubTileFunctional {
|
||||
}
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(){
|
||||
public LexiconEntry getEntry() {
|
||||
return lexicon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(){
|
||||
public IIcon getIcon() {
|
||||
return BotaniaAPI.getSignatureForName("whisperweed").getIconForStack(null);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package fox.spiteful.forbidden.tiles;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.DarkAspects;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
@@ -12,12 +14,7 @@ import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.aspects.IAspectContainer;
|
||||
import thaumcraft.api.aspects.IEssentiaTransport;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import fox.spiteful.forbidden.DarkAspects;
|
||||
|
||||
|
||||
public class TileEntityWrathCage extends TileEntity implements IAspectContainer, IEssentiaTransport
|
||||
{
|
||||
public class TileEntityWrathCage extends TileEntity implements IAspectContainer, IEssentiaTransport {
|
||||
private final WrathSpawnerLogic spawnLogic = new WrathSpawnerLogic(this);
|
||||
public int wrath = 0;
|
||||
public int sloth = 0;
|
||||
@@ -29,8 +26,7 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
super.readFromNBT(par1NBTTagCompound);
|
||||
this.spawnLogic.readFromNBT(par1NBTTagCompound);
|
||||
this.wrath = par1NBTTagCompound.getShort("Wrath");
|
||||
@@ -44,24 +40,23 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
super.writeToNBT(par1NBTTagCompound);
|
||||
this.spawnLogic.writeToNBT(par1NBTTagCompound);
|
||||
par1NBTTagCompound.setShort("Wrath", (short)this.wrath);
|
||||
par1NBTTagCompound.setShort("Sloth", (short)this.sloth);
|
||||
par1NBTTagCompound.setShort("Special", (short)this.special);
|
||||
par1NBTTagCompound.setShort("Wrath", (short) this.wrath);
|
||||
par1NBTTagCompound.setShort("Sloth", (short) this.sloth);
|
||||
par1NBTTagCompound.setShort("Special", (short) this.special);
|
||||
par1NBTTagCompound.setByte("Mode", this.mode);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
readFromNBT(pkt.func_148857_g());
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
public Packet getDescriptionPacket() {
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
this.writeToNBT(nbttagcompound);
|
||||
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbttagcompound);
|
||||
@@ -72,39 +67,47 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
* ticks and creates a new spawn inside its implementation.
|
||||
*/
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){
|
||||
public void updateEntity() {
|
||||
if (!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) {
|
||||
this.spawnLogic.updateSpawner();
|
||||
}
|
||||
|
||||
if(Config.wrathCost > 0 && spawnLogic.isMobSet() && !(special >= 64 || wrath >= 64 || sloth >= 64))
|
||||
drawEssentia();
|
||||
|
||||
|
||||
if (Config.wrathCost > 0 && spawnLogic.isMobSet() && !(special >= 64 || wrath >= 64 || sloth >= 64))
|
||||
drawEssentia();
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
void drawEssentia()
|
||||
{
|
||||
for(int x = 0;x < ForgeDirection.VALID_DIRECTIONS.length;x++){
|
||||
|
||||
void drawEssentia() {
|
||||
for (int x = 0; x < ForgeDirection.VALID_DIRECTIONS.length; x++) {
|
||||
ForgeDirection current = ForgeDirection.VALID_DIRECTIONS[x];
|
||||
TileEntity te = ThaumcraftApiHelper.getConnectableTile(worldObj, xCoord, yCoord, zCoord, current);
|
||||
if(te != null) {
|
||||
IEssentiaTransport ic = (IEssentiaTransport)te;
|
||||
if(ic.canOutputTo(current.getOpposite()) && special < 64 //THE DIRECTION HERE MAY BE WRONG SPITEFULFOXY SO CHECK IT
|
||||
&& ic.getEssentiaType(current.getOpposite()) == aspect && ic.getEssentiaAmount(current.getOpposite()) > 0 && ic.takeEssentia(aspect, 1, current.getOpposite()) == 1) {
|
||||
if (te != null) {
|
||||
IEssentiaTransport ic = (IEssentiaTransport) te;
|
||||
if (ic.canOutputTo(current.getOpposite())
|
||||
&& special < 64 // THE DIRECTION HERE MAY BE WRONG SPITEFULFOXY SO CHECK IT
|
||||
&& ic.getEssentiaType(current.getOpposite()) == aspect
|
||||
&& ic.getEssentiaAmount(current.getOpposite()) > 0
|
||||
&& ic.takeEssentia(aspect, 1, current.getOpposite()) == 1) {
|
||||
special++;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
return;
|
||||
}
|
||||
else if(ic.canOutputTo(current.getOpposite()) && wrath < 64 && special < Config.wrathCost
|
||||
&& ic.getEssentiaType(current.getOpposite()) == DarkAspects.WRATH && ic.getEssentiaAmount(current.getOpposite()) > 0 && ic.takeEssentia(DarkAspects.WRATH, 1, current.getOpposite()) == 1) {
|
||||
} else if (ic.canOutputTo(current.getOpposite())
|
||||
&& wrath < 64
|
||||
&& special < Config.wrathCost
|
||||
&& ic.getEssentiaType(current.getOpposite()) == DarkAspects.WRATH
|
||||
&& ic.getEssentiaAmount(current.getOpposite()) > 0
|
||||
&& ic.takeEssentia(DarkAspects.WRATH, 1, current.getOpposite()) == 1) {
|
||||
wrath++;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
return;
|
||||
}
|
||||
else if(ic.canOutputTo(current.getOpposite()) && sloth < 64 && special < Config.wrathCost && wrath < Config.wrathCost
|
||||
&& ic.getEssentiaType(current.getOpposite()) == DarkAspects.SLOTH && ic.getEssentiaAmount(current.getOpposite()) > 0 && ic.takeEssentia(DarkAspects.SLOTH, 1, current.getOpposite()) == 1) {
|
||||
} else if (ic.canOutputTo(current.getOpposite())
|
||||
&& sloth < 64
|
||||
&& special < Config.wrathCost
|
||||
&& wrath < Config.wrathCost
|
||||
&& ic.getEssentiaType(current.getOpposite()) == DarkAspects.SLOTH
|
||||
&& ic.getEssentiaAmount(current.getOpposite()) > 0
|
||||
&& ic.takeEssentia(DarkAspects.SLOTH, 1, current.getOpposite()) == 1) {
|
||||
sloth++;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
return;
|
||||
@@ -112,86 +115,66 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void checkAspect() {
|
||||
if(aspect != spawnLogic.getAspect())
|
||||
special = 0;
|
||||
if (aspect != spawnLogic.getAspect()) special = 0;
|
||||
aspect = spawnLogic.getAspect();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called when a client event is received with the event number and argument, see World.sendClientEvent
|
||||
*/
|
||||
public boolean receiveClientEvent(int par1, int x)
|
||||
{
|
||||
public boolean receiveClientEvent(int par1, int x) {
|
||||
return this.spawnLogic.setDelayToMin(par1) ? true : super.receiveClientEvent(par1, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the spawner logic associated with this spawner
|
||||
*/
|
||||
public WrathSpawnerLogic getSpawnerLogic()
|
||||
{
|
||||
public WrathSpawnerLogic getSpawnerLogic() {
|
||||
return this.spawnLogic;
|
||||
}
|
||||
|
||||
public AspectList getAspects()
|
||||
{
|
||||
|
||||
public AspectList getAspects() {
|
||||
AspectList list = new AspectList();
|
||||
if(Config.wrathCost > 0 && spawnLogic.isMobSet())
|
||||
{
|
||||
if(mode == 0)
|
||||
list.add(aspect, special);
|
||||
else if(mode == 1)
|
||||
list.add(DarkAspects.WRATH, wrath);
|
||||
else
|
||||
list.add(DarkAspects.SLOTH, sloth);
|
||||
if (Config.wrathCost > 0 && spawnLogic.isMobSet()) {
|
||||
if (mode == 0) list.add(aspect, special);
|
||||
else if (mode == 1) list.add(DarkAspects.WRATH, wrath);
|
||||
else list.add(DarkAspects.SLOTH, sloth);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setAspects(AspectList aspects)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void setAspects(AspectList aspects) {}
|
||||
|
||||
/**
|
||||
* This method is used to determine of a specific aspect can be added to this container.
|
||||
* @param tag
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean doesContainerAccept(Aspect tag)
|
||||
{
|
||||
if(Config.wrathCost <= 0)
|
||||
return false;
|
||||
else
|
||||
return (tag == DarkAspects.WRATH || tag == DarkAspects.SLOTH || tag == aspect);
|
||||
public boolean doesContainerAccept(Aspect tag) {
|
||||
if (Config.wrathCost <= 0) return false;
|
||||
else return (tag == DarkAspects.WRATH || tag == DarkAspects.SLOTH || tag == aspect);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method is used to add a certain amount of an aspect to the tile entity.
|
||||
* @param tag
|
||||
* @param amount
|
||||
* @return the amount of aspect left over that could not be added.
|
||||
*/
|
||||
public int addToContainer(Aspect tag, int amount)
|
||||
{
|
||||
if(Config.wrathCost <= 0)
|
||||
return amount;
|
||||
if(tag == DarkAspects.WRATH){
|
||||
public int addToContainer(Aspect tag, int amount) {
|
||||
if (Config.wrathCost <= 0) return amount;
|
||||
if (tag == DarkAspects.WRATH) {
|
||||
wrath += amount;
|
||||
return 0;
|
||||
}
|
||||
else if(tag == DarkAspects.SLOTH){
|
||||
} else if (tag == DarkAspects.SLOTH) {
|
||||
sloth += amount;
|
||||
return 0;
|
||||
}
|
||||
else if(tag == aspect){
|
||||
} else if (tag == aspect) {
|
||||
special += amount;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return amount;
|
||||
} else return amount;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -200,8 +183,7 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
* @param amount
|
||||
* @return true if that amount of aspect was available and was removed
|
||||
*/
|
||||
public boolean takeFromContainer(Aspect tag, int amount)
|
||||
{
|
||||
public boolean takeFromContainer(Aspect tag, int amount) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -211,16 +193,11 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
* @param amount
|
||||
* @return
|
||||
*/
|
||||
public boolean doesContainerContainAmount(Aspect tag, int amount)
|
||||
{
|
||||
if(tag == DarkAspects.WRATH)
|
||||
return wrath >= amount;
|
||||
else if(tag == DarkAspects.SLOTH)
|
||||
return sloth >= amount;
|
||||
else if(tag == aspect)
|
||||
return special >= amount;
|
||||
else
|
||||
return false;
|
||||
public boolean doesContainerContainAmount(Aspect tag, int amount) {
|
||||
if (tag == DarkAspects.WRATH) return wrath >= amount;
|
||||
else if (tag == DarkAspects.SLOTH) return sloth >= amount;
|
||||
else if (tag == aspect) return special >= amount;
|
||||
else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -228,55 +205,45 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
* @param tag
|
||||
* @return the amount of that aspect found
|
||||
*/
|
||||
public int containerContains(Aspect tag)
|
||||
{
|
||||
if(tag == DarkAspects.WRATH)
|
||||
return wrath;
|
||||
else if(tag == DarkAspects.SLOTH)
|
||||
return sloth;
|
||||
else if(tag == aspect)
|
||||
return special;
|
||||
else
|
||||
return 0;
|
||||
public int containerContains(Aspect tag) {
|
||||
if (tag == DarkAspects.WRATH) return wrath;
|
||||
else if (tag == DarkAspects.SLOTH) return sloth;
|
||||
else if (tag == aspect) return special;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if the tile entity contains all the listed aspects and their amounts
|
||||
* @param ot the ObjectTags object that contains the aspects and their amounts.
|
||||
* @return
|
||||
*
|
||||
*
|
||||
* Going away in the next major patch
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean doesContainerContain(AspectList ot)
|
||||
{
|
||||
public boolean doesContainerContain(AspectList ot) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* removes a bunch of different aspects and amounts from the tile entity.
|
||||
* @param ot the ObjectTags object that contains the aspects and their amounts.
|
||||
* @return true if all the aspects and their amounts were available and successfully removed
|
||||
*
|
||||
*
|
||||
* Going away in the next major patch
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean takeFromContainer(AspectList ot)
|
||||
{
|
||||
public boolean takeFromContainer(AspectList ot) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Is this tile able to connect to other vis users/sources on the specified side?
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public boolean isConnectable(ForgeDirection face)
|
||||
{
|
||||
if(Config.wrathCost > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
public boolean isConnectable(ForgeDirection face) {
|
||||
if (Config.wrathCost > 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -284,8 +251,7 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public boolean canInputFrom(ForgeDirection face)
|
||||
{
|
||||
public boolean canInputFrom(ForgeDirection face) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -294,8 +260,7 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public boolean canOutputTo(ForgeDirection face)
|
||||
{
|
||||
public boolean canOutputTo(ForgeDirection face) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -303,131 +268,105 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
* Sets the amount of suction this block will apply
|
||||
* @param suction
|
||||
*/
|
||||
public void setSuction(Aspect aspect, int amount)
|
||||
{
|
||||
|
||||
}
|
||||
public void setSuction(Aspect aspect, int amount) {}
|
||||
|
||||
//**
|
||||
//* Returns the amount of suction this block is applying.
|
||||
//* @param loc
|
||||
//* the location from where the suction is being checked
|
||||
//* @return
|
||||
//*/
|
||||
//public AspectList getSuction(ForgeDirection face)
|
||||
//{
|
||||
//AspectList list = new AspectList();
|
||||
//if(Config.wrathCost <= 0)
|
||||
//return list;
|
||||
//if(special < 64)
|
||||
//list.add(aspect, 256);
|
||||
//if(special < Config.wrathCost && wrath < 64)
|
||||
//list.add(DarkAspects.WRATH, 256);
|
||||
//if(special < Config.wrathCost && wrath < Config.wrathCost && sloth < 64)
|
||||
//list.add(DarkAspects.SLOTH, 256);
|
||||
|
||||
//return list;
|
||||
//}
|
||||
// **
|
||||
// * Returns the amount of suction this block is applying.
|
||||
// * @param loc
|
||||
// * the location from where the suction is being checked
|
||||
// * @return
|
||||
// */
|
||||
// public AspectList getSuction(ForgeDirection face)
|
||||
// {
|
||||
// AspectList list = new AspectList();
|
||||
// if(Config.wrathCost <= 0)
|
||||
// return list;
|
||||
// if(special < 64)
|
||||
// list.add(aspect, 256);
|
||||
// if(special < Config.wrathCost && wrath < 64)
|
||||
// list.add(DarkAspects.WRATH, 256);
|
||||
// if(special < Config.wrathCost && wrath < Config.wrathCost && sloth < 64)
|
||||
// list.add(DarkAspects.SLOTH, 256);
|
||||
|
||||
// return list;
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the type of suction this block is applying.
|
||||
* Returns the type of suction this block is applying.
|
||||
* @param loc
|
||||
* the location from where the suction is being checked
|
||||
* @return
|
||||
* a return type of null indicates the suction is untyped and the first thing available will be drawn
|
||||
*/
|
||||
public Aspect getSuctionType(ForgeDirection face)
|
||||
{
|
||||
if(Config.wrathCost <= 0)
|
||||
return null;
|
||||
if(mode == 0)
|
||||
return aspect;
|
||||
else if(mode == 1)
|
||||
return DarkAspects.WRATH;
|
||||
else
|
||||
return DarkAspects.SLOTH;
|
||||
public Aspect getSuctionType(ForgeDirection face) {
|
||||
if (Config.wrathCost <= 0) return null;
|
||||
if (mode == 0) return aspect;
|
||||
else if (mode == 1) return DarkAspects.WRATH;
|
||||
else return DarkAspects.SLOTH;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the strength of suction this block is applying.
|
||||
* Returns the strength of suction this block is applying.
|
||||
* @param loc
|
||||
* the location from where the suction is being checked
|
||||
* @return
|
||||
*/
|
||||
public int getSuctionAmount(ForgeDirection face)
|
||||
{
|
||||
if(Config.wrathCost > 0)
|
||||
return 256;
|
||||
else
|
||||
return 0;
|
||||
public int getSuctionAmount(ForgeDirection face) {
|
||||
if (Config.wrathCost > 0) return 256;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* remove the specified amount of vis from this transport tile
|
||||
* @param suction
|
||||
* @return how much was actually taken
|
||||
*/
|
||||
public int takeEssentia(Aspect aspect, int amount, ForgeDirection dir)
|
||||
{
|
||||
public int takeEssentia(Aspect aspect, int amount, ForgeDirection dir) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* add the specified amount of vis to this transport tile
|
||||
* @return how much was actually added
|
||||
*/
|
||||
public int addEssentia(Aspect inp, int amount, ForgeDirection dir)
|
||||
{
|
||||
if(inp == aspect)
|
||||
{
|
||||
public int addEssentia(Aspect inp, int amount, ForgeDirection dir) {
|
||||
if (inp == aspect) {
|
||||
special += Math.min(amount, 64);
|
||||
return Math.min(amount, 64);
|
||||
}
|
||||
else if(inp == DarkAspects.WRATH)
|
||||
{
|
||||
} else if (inp == DarkAspects.WRATH) {
|
||||
wrath += Math.min(amount, 64);
|
||||
return Math.min(amount, 64);
|
||||
}
|
||||
else if(inp == DarkAspects.SLOTH)
|
||||
{
|
||||
} else if (inp == DarkAspects.SLOTH) {
|
||||
sloth += Math.min(amount, 64);
|
||||
return Math.min(amount, 64);
|
||||
}
|
||||
else
|
||||
return amount;
|
||||
} else return amount;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* What type of essentia this contains
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public Aspect getEssentiaType(ForgeDirection face)
|
||||
{
|
||||
public Aspect getEssentiaType(ForgeDirection face) {
|
||||
return getSuctionType(face);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* How much essentia this block contains
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public int getEssentiaAmount(ForgeDirection face)
|
||||
{
|
||||
if(mode == 0)
|
||||
return special;
|
||||
else if(mode == 1)
|
||||
return wrath;
|
||||
else
|
||||
return sloth;
|
||||
public int getEssentiaAmount(ForgeDirection face) {
|
||||
if (mode == 0) return special;
|
||||
else if (mode == 1) return wrath;
|
||||
else return sloth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Essentia will not be drawn from this container unless the suction exceeds this amount.
|
||||
* @return the amount
|
||||
*/
|
||||
public int getMinimumSuction()
|
||||
{
|
||||
public int getMinimumSuction() {
|
||||
return 9000;
|
||||
}
|
||||
|
||||
@@ -436,8 +375,7 @@ public class TileEntityWrathCage extends TileEntity implements IAspectContainer,
|
||||
* Used by jars and alembics that have smaller than normal hitboxes
|
||||
* @return
|
||||
*/
|
||||
public boolean renderExtendedTube()
|
||||
{
|
||||
public boolean renderExtendedTube() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package fox.spiteful.forbidden.tiles;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
@@ -12,11 +15,6 @@ import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class WrathSpawnerLogic {
|
||||
/** The mob spawner we deal with */
|
||||
final TileEntityWrathCage mobSpawnerEntity;
|
||||
@@ -25,6 +23,7 @@ public class WrathSpawnerLogic {
|
||||
|
||||
/** The delay to spawn. */
|
||||
public int spawnDelay = 20;
|
||||
|
||||
private String mobID = "Pig";
|
||||
Aspect aspect = Aspect.GREED;
|
||||
private boolean slothful = false;
|
||||
@@ -37,6 +36,7 @@ public class WrathSpawnerLogic {
|
||||
|
||||
/** A counter for spawn tries. */
|
||||
private int spawnCount = 3;
|
||||
|
||||
private Entity renderEntity;
|
||||
private int maxNearbyEntities = 6;
|
||||
|
||||
@@ -63,10 +63,8 @@ public class WrathSpawnerLogic {
|
||||
|
||||
public void setMobID(String par1Str) {
|
||||
this.mobID = par1Str;
|
||||
if (Config.spawnerMobs.containsKey(mobID))
|
||||
aspect = Config.spawnerMobs.get(mobID);
|
||||
else
|
||||
aspect = Aspect.GREED;
|
||||
if (Config.spawnerMobs.containsKey(mobID)) aspect = Config.spawnerMobs.get(mobID);
|
||||
else aspect = Aspect.GREED;
|
||||
}
|
||||
|
||||
public void mobIsSet(boolean inp) {
|
||||
@@ -78,7 +76,15 @@ public class WrathSpawnerLogic {
|
||||
}
|
||||
|
||||
public void updateSpawnerBlock(int par1) {
|
||||
this.mobSpawnerEntity.getWorldObj().addBlockEvent(this.mobSpawnerEntity.xCoord, this.mobSpawnerEntity.yCoord, this.mobSpawnerEntity.zCoord, Blocks.mob_spawner, par1, 0);
|
||||
this.mobSpawnerEntity
|
||||
.getWorldObj()
|
||||
.addBlockEvent(
|
||||
this.mobSpawnerEntity.xCoord,
|
||||
this.mobSpawnerEntity.yCoord,
|
||||
this.mobSpawnerEntity.zCoord,
|
||||
Blocks.mob_spawner,
|
||||
par1,
|
||||
0);
|
||||
}
|
||||
|
||||
public World getSpawnerWorld() {
|
||||
@@ -98,15 +104,17 @@ public class WrathSpawnerLogic {
|
||||
}
|
||||
|
||||
public void updateSpawner() {
|
||||
if (!mobSet)
|
||||
return;
|
||||
if (!mobSet) return;
|
||||
|
||||
double d0;
|
||||
|
||||
if (this.getSpawnerWorld().isRemote && (fuel > 0 || Config.wrathCost <= 0)) {
|
||||
double d1 = (double) ((float) this.getSpawnerX() + this.getSpawnerWorld().rand.nextFloat());
|
||||
double d2 = (double) ((float) this.getSpawnerY() + this.getSpawnerWorld().rand.nextFloat());
|
||||
d0 = (double) ((float) this.getSpawnerZ() + this.getSpawnerWorld().rand.nextFloat());
|
||||
double d1 = (double)
|
||||
((float) this.getSpawnerX() + this.getSpawnerWorld().rand.nextFloat());
|
||||
double d2 = (double)
|
||||
((float) this.getSpawnerY() + this.getSpawnerWorld().rand.nextFloat());
|
||||
d0 = (double)
|
||||
((float) this.getSpawnerZ() + this.getSpawnerWorld().rand.nextFloat());
|
||||
// this.getSpawnerWorld().spawnParticle("smoke", d1, d2, d0, 0.0D,
|
||||
// 0.0D, 0.0D);
|
||||
// this.getSpawnerWorld().spawnParticle("flame", d1, d2, d0, 0.0D,
|
||||
@@ -118,7 +126,8 @@ public class WrathSpawnerLogic {
|
||||
}
|
||||
|
||||
this.field_98284_d = this.field_98287_c;
|
||||
this.field_98287_c = (this.field_98287_c + (double) (1000.0F / ((float) this.spawnDelay + 200.0F))) % 360.0D;
|
||||
this.field_98287_c =
|
||||
(this.field_98287_c + (double) (1000.0F / ((float) this.spawnDelay + 200.0F))) % 360.0D;
|
||||
} else if (Config.wrathCage) {
|
||||
if (Config.wrathCost > 0 && fuel <= 0) {
|
||||
if (mobSpawnerEntity.special >= Config.wrathCost) {
|
||||
@@ -143,8 +152,7 @@ public class WrathSpawnerLogic {
|
||||
this.updateDelay();
|
||||
}
|
||||
|
||||
if (fuel <= 0 && Config.wrathCost > 0)
|
||||
return;
|
||||
if (fuel <= 0 && Config.wrathCost > 0) return;
|
||||
|
||||
if (this.spawnDelay > 0) {
|
||||
--this.spawnDelay;
|
||||
@@ -158,19 +166,42 @@ public class WrathSpawnerLogic {
|
||||
return;
|
||||
}
|
||||
|
||||
//int j = this.getSpawnerWorld().getEntitiesWithinAABB(entity.getClass(), AxisAlignedBB.getAABBPool().getAABB((double) this.getSpawnerX(), (double) this.getSpawnerY(), (double) this.getSpawnerZ(), (double) (this.getSpawnerX() + 1), (double) (this.getSpawnerY() + 1), (double) (this.getSpawnerZ() + 1)).expand((double) (this.spawnRange * 2), 4.0D, (double) (this.spawnRange * 2))).size();
|
||||
int j = this.getSpawnerWorld().getEntitiesWithinAABB(entity.getClass(), AxisAlignedBB.getBoundingBox((double)this.getSpawnerX(), (double)this.getSpawnerY(), (double)this.getSpawnerZ(), (double)(this.getSpawnerX() + 1), (double)(this.getSpawnerY() + 1), (double)(this.getSpawnerZ() + 1)).expand((double)(this.spawnRange * 2), 4.0D, (double)(this.spawnRange * 2))).size();
|
||||
// int j = this.getSpawnerWorld().getEntitiesWithinAABB(entity.getClass(),
|
||||
// AxisAlignedBB.getAABBPool().getAABB((double) this.getSpawnerX(), (double) this.getSpawnerY(),
|
||||
// (double) this.getSpawnerZ(), (double) (this.getSpawnerX() + 1), (double) (this.getSpawnerY() + 1),
|
||||
// (double) (this.getSpawnerZ() + 1)).expand((double) (this.spawnRange * 2), 4.0D, (double)
|
||||
// (this.spawnRange * 2))).size();
|
||||
int j = this.getSpawnerWorld()
|
||||
.getEntitiesWithinAABB(
|
||||
entity.getClass(),
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
(double) this.getSpawnerX(),
|
||||
(double) this.getSpawnerY(),
|
||||
(double) this.getSpawnerZ(),
|
||||
(double) (this.getSpawnerX() + 1),
|
||||
(double) (this.getSpawnerY() + 1),
|
||||
(double) (this.getSpawnerZ() + 1))
|
||||
.expand((double) (this.spawnRange * 2), 4.0D, (double) (this.spawnRange * 2)))
|
||||
.size();
|
||||
|
||||
if (j >= this.maxNearbyEntities) {
|
||||
this.updateDelay();
|
||||
return;
|
||||
}
|
||||
|
||||
d0 = (double) this.getSpawnerX() + (this.getSpawnerWorld().rand.nextDouble() - this.getSpawnerWorld().rand.nextDouble()) * (double) this.spawnRange;
|
||||
double d3 = (double) (this.getSpawnerY() + this.getSpawnerWorld().rand.nextInt(3) - 1);
|
||||
double d4 = (double) this.getSpawnerZ() + (this.getSpawnerWorld().rand.nextDouble() - this.getSpawnerWorld().rand.nextDouble()) * (double) this.spawnRange;
|
||||
d0 = (double) this.getSpawnerX()
|
||||
+ (this.getSpawnerWorld().rand.nextDouble()
|
||||
- this.getSpawnerWorld().rand.nextDouble())
|
||||
* (double) this.spawnRange;
|
||||
double d3 = (double)
|
||||
(this.getSpawnerY() + this.getSpawnerWorld().rand.nextInt(3) - 1);
|
||||
double d4 = (double) this.getSpawnerZ()
|
||||
+ (this.getSpawnerWorld().rand.nextDouble()
|
||||
- this.getSpawnerWorld().rand.nextDouble())
|
||||
* (double) this.spawnRange;
|
||||
EntityLiving entityliving = entity instanceof EntityLiving ? (EntityLiving) entity : null;
|
||||
entity.setLocationAndAngles(d0, d3, d4, this.getSpawnerWorld().rand.nextFloat() * 360.0F, 0.0F);
|
||||
entity.setLocationAndAngles(
|
||||
d0, d3, d4, this.getSpawnerWorld().rand.nextFloat() * 360.0F, 0.0F);
|
||||
|
||||
if (
|
||||
// entityliving == null ||
|
||||
@@ -178,7 +209,8 @@ public class WrathSpawnerLogic {
|
||||
// entityliving.getCanSpawnHere())
|
||||
{
|
||||
this.spawnMob(entity);
|
||||
this.getSpawnerWorld().playAuxSFX(2004, this.getSpawnerX(), this.getSpawnerY(), this.getSpawnerZ(), 0);
|
||||
this.getSpawnerWorld()
|
||||
.playAuxSFX(2004, this.getSpawnerX(), this.getSpawnerY(), this.getSpawnerZ(), 0);
|
||||
|
||||
if (entityliving != null) {
|
||||
entityliving.spawnExplosionParticle();
|
||||
@@ -186,10 +218,8 @@ public class WrathSpawnerLogic {
|
||||
}
|
||||
|
||||
this.updateDelay();
|
||||
} else if (entityliving != null)
|
||||
entityliving.isDead = true;
|
||||
} else if (entityliving != null) entityliving.isDead = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +228,11 @@ public class WrathSpawnerLogic {
|
||||
* entity.
|
||||
*/
|
||||
public boolean entityCanSpawn(EntityLiving entity) {
|
||||
return entity.worldObj.checkNoEntityCollision(entity.boundingBox) && entity.worldObj.getCollidingBoundingBoxes(entity, entity.boundingBox).isEmpty() && !entity.worldObj.isAnyLiquid(entity.boundingBox);
|
||||
return entity.worldObj.checkNoEntityCollision(entity.boundingBox)
|
||||
&& entity.worldObj
|
||||
.getCollidingBoundingBoxes(entity, entity.boundingBox)
|
||||
.isEmpty()
|
||||
&& !entity.worldObj.isAnyLiquid(entity.boundingBox);
|
||||
}
|
||||
|
||||
private void updateDelay() {
|
||||
@@ -209,18 +243,15 @@ public class WrathSpawnerLogic {
|
||||
this.spawnDelay = this.minSpawnDelay + this.getSpawnerWorld().rand.nextInt(i);
|
||||
}
|
||||
|
||||
if (slothful)
|
||||
spawnDelay += 200;
|
||||
if (slothful) spawnDelay += 200;
|
||||
|
||||
this.updateSpawnerBlock(1);
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
mobID = par1NBTTagCompound.getString("EntityId");
|
||||
if (Config.spawnerMobs.containsKey(mobID))
|
||||
aspect = Config.spawnerMobs.get(mobID);
|
||||
else
|
||||
aspect = Aspect.GREED;
|
||||
if (Config.spawnerMobs.containsKey(mobID)) aspect = Config.spawnerMobs.get(mobID);
|
||||
else aspect = Aspect.GREED;
|
||||
mobSet = par1NBTTagCompound.getBoolean("MobSet");
|
||||
slothful = par1NBTTagCompound.getBoolean("Slothful");
|
||||
this.fuel = par1NBTTagCompound.getShort("Fuel");
|
||||
@@ -259,7 +290,6 @@ public class WrathSpawnerLogic {
|
||||
// par1NBTTagCompound.setShort("SpawnCount", (short)this.spawnCount);
|
||||
par1NBTTagCompound.setShort("MaxNearbyEntities", (short) this.maxNearbyEntities);
|
||||
par1NBTTagCompound.setShort("SpawnRange", (short) this.spawnRange);
|
||||
|
||||
}
|
||||
|
||||
public Entity spawnMob(Entity par1Entity) {
|
||||
@@ -293,5 +323,4 @@ public class WrathSpawnerLogic {
|
||||
|
||||
return this.renderEntity;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user