mirror of
https://github.com/GTNewHorizons/ForbiddenMagic.git
synced 2026-11-17 19:05:27 +00:00
Fixing indents
This commit is contained in:
1 parent
b2c73abcb7
commit
c10d6f1769
52 files changed
+2981
-2981
No files matched your search
@@ -2,8 +2,8 @@ package fox.spiteful.forbidden;
|
||||
|
||||
public class CommonProxy {
|
||||
|
||||
public void registerRenderInfo(){
|
||||
|
||||
}
|
||||
public void registerRenderInfo(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,32 +14,32 @@ import thaumcraft.api.ItemApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
public class Config {
|
||||
public static HashMap<String, Aspect> spawnerMobs = new HashMap<String, Aspect>();
|
||||
public static HashMap<String, Aspect> spawnerMobs = new HashMap<String, Aspect>();
|
||||
|
||||
public static int clusterEnchID;
|
||||
public static int wrathEnchID;
|
||||
public static int greedyEnchID;
|
||||
public static int consumingEnchID;
|
||||
public static int educationalEnchID;
|
||||
public static int corruptingEnchID;
|
||||
public static int voidEnchID;
|
||||
public static int clusterEnchID;
|
||||
public static int wrathEnchID;
|
||||
public static int greedyEnchID;
|
||||
public static int consumingEnchID;
|
||||
public static int educationalEnchID;
|
||||
public static int corruptingEnchID;
|
||||
public static int voidEnchID;
|
||||
public static int impactEnchID;
|
||||
|
||||
public static int bloodSealPotionID = 70;
|
||||
|
||||
public static ItemStack thaumcraftResource;
|
||||
public static ItemStack thaumcraftTaintBlock;
|
||||
public static ItemStack thaumcraftOre;
|
||||
public static ItemStack thaumcraftShard;
|
||||
public static ItemStack thaumcraftResource;
|
||||
public static ItemStack thaumcraftTaintBlock;
|
||||
public static ItemStack thaumcraftOre;
|
||||
public static ItemStack thaumcraftShard;
|
||||
|
||||
public static boolean noLust = false;
|
||||
public static boolean silverfishEmeralds = true;
|
||||
public static boolean tagResearch = true;
|
||||
public static boolean wrathCage = true;
|
||||
public static boolean spork = false;
|
||||
public static boolean greedyEnch = true;
|
||||
public static boolean emeraldTrans = true;
|
||||
public static boolean wrathCrazy = false;
|
||||
public static boolean noLust = false;
|
||||
public static boolean silverfishEmeralds = true;
|
||||
public static boolean tagResearch = true;
|
||||
public static boolean wrathCage = true;
|
||||
public static boolean spork = false;
|
||||
public static boolean greedyEnch = true;
|
||||
public static boolean emeraldTrans = true;
|
||||
public static boolean wrathCrazy = false;
|
||||
|
||||
public static boolean crossMod = true;
|
||||
public static boolean crossWand = true;
|
||||
@@ -50,39 +50,39 @@ public class Config {
|
||||
public static boolean tc = true;
|
||||
public static boolean special = true;
|
||||
|
||||
public static int wrathCost = 5;
|
||||
public static int wrathEff = 4;
|
||||
public static int wrathCost = 5;
|
||||
public static int wrathEff = 4;
|
||||
|
||||
public static Material taintMaterial;
|
||||
public static Material taintMaterial;
|
||||
|
||||
public static void configurate(File targ) {
|
||||
Configuration conf = new Configuration(targ);
|
||||
public static void configurate(File targ) {
|
||||
Configuration conf = new Configuration(targ);
|
||||
|
||||
try {
|
||||
conf.load();
|
||||
try {
|
||||
conf.load();
|
||||
|
||||
int enchCount = 66;
|
||||
clusterEnchID = conf.get("enchantments", "Fiery Core", enchCount++).getInt();
|
||||
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();
|
||||
voidEnchID = conf.get("enchantments", "Voidtouched", enchCount++).getInt();
|
||||
int enchCount = 66;
|
||||
clusterEnchID = conf.get("enchantments", "Fiery Core", enchCount++).getInt();
|
||||
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();
|
||||
voidEnchID = conf.get("enchantments", "Voidtouched", enchCount++).getInt();
|
||||
impactEnchID = conf.get("enchantments", "Impact", enchCount++).getInt();
|
||||
|
||||
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);
|
||||
spork = conf.get("silly", "Spork of Doom", spork, "What is this? I don't even...").getBoolean(false);
|
||||
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);
|
||||
spork = conf.get("silly", "Spork of Doom", spork, "What is this? I don't even...").getBoolean(false);
|
||||
bloodSealPotionID = conf.get("potions", "Blood Seal", bloodSealPotionID).getInt(bloodSealPotionID);
|
||||
|
||||
crossMod = conf.get("compatibility", "Cross-Mod Interaction", crossMod, "Disable to keep mods segregated.").getBoolean(true);
|
||||
@@ -93,64 +93,64 @@ public class Config {
|
||||
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);
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, e, "Had a problem loading its configuration.");
|
||||
} finally {
|
||||
conf.save();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, e, "Had a problem loading its configuration.");
|
||||
} finally {
|
||||
conf.save();
|
||||
}
|
||||
|
||||
try {
|
||||
thaumcraftResource = ItemApi.getItem("itemResource", 0);
|
||||
thaumcraftShard = ItemApi.getItem("itemShard", 0);
|
||||
thaumcraftTaintBlock = ItemApi.getBlock("blockTaint", 0);
|
||||
thaumcraftOre = ItemApi.getBlock("blockCustomOre", 0);
|
||||
taintMaterial = Block.getBlockFromItem(thaumcraftTaintBlock.getItem()).getMaterial();
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, e, "There was problem when retrieving information from Thaumcraft.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
try {
|
||||
thaumcraftResource = ItemApi.getItem("itemResource", 0);
|
||||
thaumcraftShard = ItemApi.getItem("itemShard", 0);
|
||||
thaumcraftTaintBlock = ItemApi.getBlock("blockTaint", 0);
|
||||
thaumcraftOre = ItemApi.getBlock("blockCustomOre", 0);
|
||||
taintMaterial = Block.getBlockFromItem(thaumcraftTaintBlock.getItem()).getMaterial();
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, e, "There was problem when retrieving information from Thaumcraft.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void spawnilify() {
|
||||
if (wrathCage) {
|
||||
spawnerMobs.put("Zombie", Aspect.FLESH);
|
||||
spawnerMobs.put("Skeleton", Aspect.DEATH);
|
||||
spawnerMobs.put("Creeper", Aspect.FIRE);
|
||||
spawnerMobs.put("EntityHorse", Aspect.BEAST);
|
||||
spawnerMobs.put("Pig", Aspect.BEAST);
|
||||
spawnerMobs.put("Sheep", Aspect.CLOTH);
|
||||
spawnerMobs.put("Cow", Aspect.BEAST);
|
||||
spawnerMobs.put("MushroomCow", Aspect.PLANT);
|
||||
spawnerMobs.put("Ozelot", Aspect.BEAST);
|
||||
spawnerMobs.put("Chicken", Aspect.FLIGHT);
|
||||
spawnerMobs.put("Squid", Aspect.SENSES);
|
||||
spawnerMobs.put("Wolf", Aspect.BEAST);
|
||||
spawnerMobs.put("Bat", Aspect.FLIGHT);
|
||||
spawnerMobs.put("Spider", Aspect.CLOTH);
|
||||
spawnerMobs.put("Slime", Aspect.SLIME);
|
||||
spawnerMobs.put("Ghast", DarkAspects.NETHER);
|
||||
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);
|
||||
spawnerMobs.put("Blaze", Aspect.FIRE);
|
||||
spawnerMobs.put("LavaSlime", Aspect.FIRE);
|
||||
spawnerMobs.put("Witch", Aspect.MAGIC);
|
||||
spawnerMobs.put("Thaumcraft.Firebat", Aspect.FIRE);
|
||||
spawnerMobs.put("Thaumcraft.Wisp", Aspect.AURA);
|
||||
spawnerMobs.put("Thaumcraft.ThaumSlime", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.BrainyZombie", Aspect.MIND);
|
||||
spawnerMobs.put("Thaumcraft.TaintSpider", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintSwarm", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedPig", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedSheep", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedCow", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedChicken", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedVillager", Aspect.TAINT);
|
||||
// spawnerMobs.put("Taintacle", DarkAspects.LUST);
|
||||
}
|
||||
}
|
||||
public static void spawnilify() {
|
||||
if (wrathCage) {
|
||||
spawnerMobs.put("Zombie", Aspect.FLESH);
|
||||
spawnerMobs.put("Skeleton", Aspect.DEATH);
|
||||
spawnerMobs.put("Creeper", Aspect.FIRE);
|
||||
spawnerMobs.put("EntityHorse", Aspect.BEAST);
|
||||
spawnerMobs.put("Pig", Aspect.BEAST);
|
||||
spawnerMobs.put("Sheep", Aspect.CLOTH);
|
||||
spawnerMobs.put("Cow", Aspect.BEAST);
|
||||
spawnerMobs.put("MushroomCow", Aspect.PLANT);
|
||||
spawnerMobs.put("Ozelot", Aspect.BEAST);
|
||||
spawnerMobs.put("Chicken", Aspect.FLIGHT);
|
||||
spawnerMobs.put("Squid", Aspect.SENSES);
|
||||
spawnerMobs.put("Wolf", Aspect.BEAST);
|
||||
spawnerMobs.put("Bat", Aspect.FLIGHT);
|
||||
spawnerMobs.put("Spider", Aspect.CLOTH);
|
||||
spawnerMobs.put("Slime", Aspect.SLIME);
|
||||
spawnerMobs.put("Ghast", DarkAspects.NETHER);
|
||||
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);
|
||||
spawnerMobs.put("Blaze", Aspect.FIRE);
|
||||
spawnerMobs.put("LavaSlime", Aspect.FIRE);
|
||||
spawnerMobs.put("Witch", Aspect.MAGIC);
|
||||
spawnerMobs.put("Thaumcraft.Firebat", Aspect.FIRE);
|
||||
spawnerMobs.put("Thaumcraft.Wisp", Aspect.AURA);
|
||||
spawnerMobs.put("Thaumcraft.ThaumSlime", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.BrainyZombie", Aspect.MIND);
|
||||
spawnerMobs.put("Thaumcraft.TaintSpider", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintSwarm", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedPig", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedSheep", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedCow", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedChicken", Aspect.TAINT);
|
||||
spawnerMobs.put("Thaumcraft.TaintedVillager", Aspect.TAINT);
|
||||
// spawnerMobs.put("Taintacle", DarkAspects.LUST);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,234 +16,234 @@ import fox.spiteful.forbidden.blocks.ForbiddenBlocks;
|
||||
import fox.spiteful.forbidden.items.ForbiddenItems;
|
||||
|
||||
public class DarkAspects {
|
||||
public static Aspect NETHER;
|
||||
public static Aspect WRATH;
|
||||
public static Aspect ENVY;
|
||||
public static Aspect GLUTTONY;
|
||||
public static Aspect PRIDE;
|
||||
public static Aspect LUST;
|
||||
public static Aspect SLOTH;
|
||||
public static Aspect NETHER;
|
||||
public static Aspect WRATH;
|
||||
public static Aspect ENVY;
|
||||
public static Aspect GLUTTONY;
|
||||
public static Aspect PRIDE;
|
||||
public static Aspect LUST;
|
||||
public static Aspect SLOTH;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
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) {
|
||||
AspectList list = ThaumcraftApiHelper.getObjectAspects(stack);
|
||||
return list != null ? list : new AspectList();
|
||||
}
|
||||
private static AspectList getAspectList(ItemStack stack) {
|
||||
AspectList list = ThaumcraftApiHelper.getObjectAspects(stack);
|
||||
return list != null ? list : new AspectList();
|
||||
}
|
||||
|
||||
public static void addAspects() {
|
||||
AspectList list;
|
||||
public static void addAspects() {
|
||||
AspectList list;
|
||||
|
||||
list = getAspectList(new ItemStack(Blocks.netherrack));
|
||||
list.add(NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.netherrack, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
list = getAspectList(new ItemStack(Blocks.netherrack));
|
||||
list.add(NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.netherrack, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Blocks.portal));
|
||||
list.add(NETHER, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.portal, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
list = getAspectList(new ItemStack(Blocks.portal));
|
||||
list.add(NETHER, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.portal, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
// list = getAspectList(new ItemStack(Block.oreNetherQuartz));
|
||||
// list.add(NETHER, 2);
|
||||
// ThaumcraftApi.registerObjectTag(Block.oreNetherQuartz.blockID, -1,
|
||||
// list);
|
||||
ThaumcraftApi.registerObjectTag("oreQuartz", (new AspectList()).add(Aspect.CRYSTAL, 3).add(NETHER, 2));
|
||||
// list = getAspectList(new ItemStack(Block.oreNetherQuartz));
|
||||
// list.add(NETHER, 2);
|
||||
// ThaumcraftApi.registerObjectTag(Block.oreNetherQuartz.blockID, -1,
|
||||
// list);
|
||||
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);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.nether_star, 1, 0), list);
|
||||
list = getAspectList(new ItemStack(Items.nether_star));
|
||||
list.add(NETHER, 8).add(PRIDE, 8);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.nether_star, 1, 0), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Items.nether_wart));
|
||||
list.add(NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.nether_wart, 1, 0), list);
|
||||
list = getAspectList(new ItemStack(Items.nether_wart));
|
||||
list.add(NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.nether_wart, 1, 0), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Items.netherbrick));
|
||||
list.add(NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.netherbrick, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
list = getAspectList(new ItemStack(Items.netherbrick));
|
||||
list.add(NETHER, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.netherbrick, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Blocks.nether_brick));
|
||||
list.add(NETHER, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.nether_brick, 1, 0), list);
|
||||
list = getAspectList(new ItemStack(Blocks.nether_brick));
|
||||
list.add(NETHER, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.nether_brick, 1, 0), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Items.ghast_tear));
|
||||
list.add(WRATH, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.ghast_tear, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
list = getAspectList(new ItemStack(Items.ghast_tear));
|
||||
list.add(WRATH, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.ghast_tear, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Items.skull, 1, 1));
|
||||
list.add(NETHER, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.skull, 1, 1), list);
|
||||
list = getAspectList(new ItemStack(Items.skull, 1, 1));
|
||||
list.add(NETHER, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.skull, 1, 1), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Items.skull, 1, 4));
|
||||
list.add(WRATH, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.skull, 1, 4), list);
|
||||
list = getAspectList(new ItemStack(Items.skull, 1, 4));
|
||||
list.add(WRATH, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.skull, 1, 4), list);
|
||||
|
||||
// list = getAspectList(new ItemStack(Item.enderPearl));
|
||||
// list.add(PRIDE, 1);
|
||||
// ThaumcraftApi.registerObjectTag(Item.enderPearl.itemID, -1, list);
|
||||
// list = getAspectList(new ItemStack(Item.enderPearl));
|
||||
// list.add(PRIDE, 1);
|
||||
// ThaumcraftApi.registerObjectTag(Item.enderPearl.itemID, -1, list);
|
||||
|
||||
list = getAspectList(new ItemStack(Blocks.tnt));
|
||||
list.add(WRATH, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.tnt, 1, 0), list);
|
||||
list = getAspectList(new ItemStack(Blocks.tnt));
|
||||
list.add(WRATH, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Blocks.tnt, 1, 0), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Items.golden_helmet));
|
||||
if (list != null) {
|
||||
list.add(PRIDE, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_helmet, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
list = getAspectList(new ItemStack(Items.golden_helmet));
|
||||
if (list != null) {
|
||||
list.add(PRIDE, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_helmet, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
list = getAspectList(new ItemStack(Items.golden_boots));
|
||||
if (list != null) {
|
||||
list.add(PRIDE, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_boots, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
list = getAspectList(new ItemStack(Items.golden_boots));
|
||||
if (list != null) {
|
||||
list.add(PRIDE, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_boots, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
|
||||
list = getAspectList(new ItemStack(Items.golden_sword));
|
||||
if (list != null) {
|
||||
list.add(PRIDE, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_sword, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
list = getAspectList(new ItemStack(Items.golden_sword));
|
||||
if (list != null) {
|
||||
list.add(PRIDE, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.golden_sword, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
|
||||
// list = getAspectList(new ItemStack(Item.bed));
|
||||
// list.add(SLOTH, 4);
|
||||
list = (new AspectList()).add(Aspect.CRAFT, 3).add(Aspect.CLOTH, 6).add(SLOTH, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.bed, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
// list = getAspectList(new ItemStack(Item.bed));
|
||||
// list.add(SLOTH, 4);
|
||||
list = (new AspectList()).add(Aspect.CRAFT, 3).add(Aspect.CLOTH, 6).add(SLOTH, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.bed, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
// list = getAspectList(new ItemStack(Item.eyeOfEnder)).copy();
|
||||
list = (new AspectList()).add(Aspect.SENSES, 4).add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 3);
|
||||
list.add(ENVY, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.ender_eye, 1, 0), list);
|
||||
// ThaumcraftApi.registerComplexObjectTag(Item.eyeOfEnder.itemID, 0,
|
||||
// (new AspectList()).add(Aspect.SENSES, 4).add(ENVY, 86));
|
||||
// list = getAspectList(new ItemStack(Item.eyeOfEnder)).copy();
|
||||
list = (new AspectList()).add(Aspect.SENSES, 4).add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 3);
|
||||
list.add(ENVY, 4);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.ender_eye, 1, 0), list);
|
||||
// ThaumcraftApi.registerComplexObjectTag(Item.eyeOfEnder.itemID, 0,
|
||||
// (new AspectList()).add(Aspect.SENSES, 4).add(ENVY, 86));
|
||||
|
||||
list = getAspectList(new ItemStack(Items.cake));
|
||||
list.add(GLUTTONY, 7);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.cake, 1, 0), list);
|
||||
list = getAspectList(new ItemStack(Items.cake));
|
||||
list.add(GLUTTONY, 7);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.cake, 1, 0), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Items.cookie));
|
||||
list.add(GLUTTONY, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.cookie, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
list = getAspectList(new ItemStack(Items.cookie));
|
||||
list.add(GLUTTONY, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.cookie, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
list = getAspectList(new ItemStack(Items.fire_charge));
|
||||
list.add(WRATH, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.fire_charge, 1, 0), list);
|
||||
list = getAspectList(new ItemStack(Items.fire_charge));
|
||||
list.add(WRATH, 1);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.fire_charge, 1, 0), list);
|
||||
|
||||
// list = getAspectList(new ItemStack(Item.comparator)).copy();
|
||||
// list.add(ENVY, 2);
|
||||
list = (new AspectList()).add(Aspect.MECHANISM, 2).add(Aspect.ORDER, 2).add(ENVY, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.comparator, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
// ThaumcraftApi.registerComplexObjectTag(Block.redstoneComparatorIdle.blockID,
|
||||
// -1, (new AspectList()).merge(Aspect.MECHANISM, 2).merge(Aspect.ORDER,
|
||||
// 2).merge(ENVY, 2));
|
||||
// ThaumcraftApi.registerComplexObjectTag(Block.redstoneComparatorActive.blockID,
|
||||
// -1, (new AspectList()).merge(Aspect.MECHANISM, 2).merge(Aspect.ORDER,
|
||||
// 2).merge(ENVY, 2));
|
||||
// list = getAspectList(new ItemStack(Item.comparator)).copy();
|
||||
// list.add(ENVY, 2);
|
||||
list = (new AspectList()).add(Aspect.MECHANISM, 2).add(Aspect.ORDER, 2).add(ENVY, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.comparator, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
// ThaumcraftApi.registerComplexObjectTag(Block.redstoneComparatorIdle.blockID,
|
||||
// -1, (new AspectList()).merge(Aspect.MECHANISM, 2).merge(Aspect.ORDER,
|
||||
// 2).merge(ENVY, 2));
|
||||
// ThaumcraftApi.registerComplexObjectTag(Block.redstoneComparatorActive.blockID,
|
||||
// -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);
|
||||
ThaumcraftApi.registerObjectTag("itemBacon", list);
|
||||
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) {
|
||||
list = getAspectList(new ItemStack(Items.saddle));
|
||||
list.add(LUST, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.saddle, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
if (!Config.noLust) {
|
||||
list = getAspectList(new ItemStack(Items.saddle));
|
||||
list.add(LUST, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.saddle, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
|
||||
// list = getAspectList(new ItemStack(Item.leash));
|
||||
list = (new AspectList()).add(Aspect.BEAST, 2).add(Aspect.CLOTH, 2).add(Aspect.SLIME, 1);
|
||||
list.add(LUST, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.lead, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
// list = getAspectList(new ItemStack(Item.leash));
|
||||
list = (new AspectList()).add(Aspect.BEAST, 2).add(Aspect.CLOTH, 2).add(Aspect.SLIME, 1);
|
||||
list.add(LUST, 2);
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Items.lead, 1, OreDictionary.WILDCARD_VALUE), list);
|
||||
}
|
||||
|
||||
Iterator mobCount = ThaumcraftApi.scanEntities.iterator();
|
||||
Iterator mobCount = ThaumcraftApi.scanEntities.iterator();
|
||||
|
||||
while (mobCount.hasNext()) {
|
||||
ThaumcraftApi.EntityTags mobTag = (ThaumcraftApi.EntityTags) mobCount.next();
|
||||
if (mobTag.entityName.equals("BrainyZombie")) {
|
||||
mobTag.aspects.add(WRATH, 3);
|
||||
} else if (mobTag.entityName.equals("GiantBrainyZombie")) {
|
||||
mobTag.aspects.add(WRATH, 4);
|
||||
} else if (mobTag.entityName.equals("Firebat")) {
|
||||
mobTag.aspects.add(WRATH, 1).add(NETHER, 2);
|
||||
} 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);
|
||||
} else if (mobTag.entityName.equals("WitherBoss")) {
|
||||
mobTag.aspects.add(NETHER, 7).add(WRATH, 7);
|
||||
} else if (mobTag.entityName.equals("Ozelot")) {
|
||||
mobTag.aspects.add(SLOTH, 3);
|
||||
} else if (mobTag.entityName.equals("Enderman")) {
|
||||
mobTag.aspects.add(PRIDE, 4).add(ENVY, 4);
|
||||
} else if (mobTag.entityName.equals("Ghast")) {
|
||||
mobTag.aspects.add(NETHER, 3).add(WRATH, 3);
|
||||
} else if (mobTag.entityName.equals("PigZombie")) {
|
||||
mobTag.aspects.add(WRATH, 6);
|
||||
} else if (mobTag.entityName.equals("EnderDragon")) {
|
||||
mobTag.aspects.add(PRIDE, 10);
|
||||
} else if (!Config.noLust && mobTag.entityName.equals("Taintacle")) {
|
||||
mobTag.aspects.add(LUST, 3);
|
||||
} else if (mobTag.entityName.equals("Pig")) {
|
||||
mobTag.aspects.add(GLUTTONY, 3);
|
||||
} else if (mobTag.entityName.equals("LavaSlime")) {
|
||||
mobTag.aspects.add(NETHER, 1);
|
||||
} else if (!Config.noLust && mobTag.entityName.equals("TwilightForest.Forest Bunny")) {
|
||||
mobTag.aspects.add(LUST, 5);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.Mini Ghast")) {
|
||||
mobTag.aspects.add(NETHER, 1).add(WRATH, 1);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.Tower Boss")) {
|
||||
mobTag.aspects.add(NETHER, 10).add(WRATH, 10);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.Tower Ghast")) {
|
||||
mobTag.aspects.add(NETHER, 3).add(WRATH, 3);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.Twilight Lich")) {
|
||||
mobTag.aspects.add(PRIDE, 10);
|
||||
} else if (!Config.noLust && mobTag.entityName.equals("TwilightForest.Pinch Beetle")) {
|
||||
mobTag.aspects.add(LUST, 3);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.King Spider")) {
|
||||
mobTag.aspects.add(PRIDE, 4);
|
||||
} else if (mobTag.entityName.equals("witchery.demon")) {
|
||||
mobTag.aspects.add(NETHER, 8);
|
||||
}
|
||||
}
|
||||
while (mobCount.hasNext()) {
|
||||
ThaumcraftApi.EntityTags mobTag = (ThaumcraftApi.EntityTags) mobCount.next();
|
||||
if (mobTag.entityName.equals("BrainyZombie")) {
|
||||
mobTag.aspects.add(WRATH, 3);
|
||||
} else if (mobTag.entityName.equals("GiantBrainyZombie")) {
|
||||
mobTag.aspects.add(WRATH, 4);
|
||||
} else if (mobTag.entityName.equals("Firebat")) {
|
||||
mobTag.aspects.add(WRATH, 1).add(NETHER, 2);
|
||||
} 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);
|
||||
} else if (mobTag.entityName.equals("WitherBoss")) {
|
||||
mobTag.aspects.add(NETHER, 7).add(WRATH, 7);
|
||||
} else if (mobTag.entityName.equals("Ozelot")) {
|
||||
mobTag.aspects.add(SLOTH, 3);
|
||||
} else if (mobTag.entityName.equals("Enderman")) {
|
||||
mobTag.aspects.add(PRIDE, 4).add(ENVY, 4);
|
||||
} else if (mobTag.entityName.equals("Ghast")) {
|
||||
mobTag.aspects.add(NETHER, 3).add(WRATH, 3);
|
||||
} else if (mobTag.entityName.equals("PigZombie")) {
|
||||
mobTag.aspects.add(WRATH, 6);
|
||||
} else if (mobTag.entityName.equals("EnderDragon")) {
|
||||
mobTag.aspects.add(PRIDE, 10);
|
||||
} else if (!Config.noLust && mobTag.entityName.equals("Taintacle")) {
|
||||
mobTag.aspects.add(LUST, 3);
|
||||
} else if (mobTag.entityName.equals("Pig")) {
|
||||
mobTag.aspects.add(GLUTTONY, 3);
|
||||
} else if (mobTag.entityName.equals("LavaSlime")) {
|
||||
mobTag.aspects.add(NETHER, 1);
|
||||
} else if (!Config.noLust && mobTag.entityName.equals("TwilightForest.Forest Bunny")) {
|
||||
mobTag.aspects.add(LUST, 5);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.Mini Ghast")) {
|
||||
mobTag.aspects.add(NETHER, 1).add(WRATH, 1);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.Tower Boss")) {
|
||||
mobTag.aspects.add(NETHER, 10).add(WRATH, 10);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.Tower Ghast")) {
|
||||
mobTag.aspects.add(NETHER, 3).add(WRATH, 3);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.Twilight Lich")) {
|
||||
mobTag.aspects.add(PRIDE, 10);
|
||||
} else if (!Config.noLust && mobTag.entityName.equals("TwilightForest.Pinch Beetle")) {
|
||||
mobTag.aspects.add(LUST, 3);
|
||||
} else if (mobTag.entityName.equals("TwilightForest.King Spider")) {
|
||||
mobTag.aspects.add(PRIDE, 4);
|
||||
} else if (mobTag.entityName.equals("witchery.demon")) {
|
||||
mobTag.aspects.add(NETHER, 8);
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
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));
|
||||
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.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));
|
||||
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));
|
||||
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));
|
||||
}
|
||||
}
|
||||
@@ -9,43 +9,43 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class DarkResearchItem extends ResearchItem {
|
||||
String inter = null;
|
||||
String inter = null;
|
||||
|
||||
public DarkResearchItem(String par1, String x) {
|
||||
super(par1, x);
|
||||
}
|
||||
public DarkResearchItem(String par1, String x) {
|
||||
super(par1, x);
|
||||
}
|
||||
|
||||
public DarkResearchItem(String par1, String x, AspectList tags, int y, int z, int par5, ResourceLocation icon) {
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
}
|
||||
public DarkResearchItem(String par1, String x, AspectList tags, int y, int z, int par5, ResourceLocation icon) {
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
}
|
||||
|
||||
public DarkResearchItem(String par1, String x, AspectList tags, int y, int z, int par5, ItemStack icon) {
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
}
|
||||
public DarkResearchItem(String par1, String x, AspectList tags, int y, int z, int par5, ItemStack icon) {
|
||||
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) {
|
||||
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, 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) {
|
||||
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) {
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
inter = mod;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getName() {
|
||||
return StatCollector.translateToLocal("forbidden.research_name." + key);
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getName() {
|
||||
return StatCollector.translateToLocal("forbidden.research_name." + key);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
@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);
|
||||
}
|
||||
}
|
||||
@@ -69,34 +69,34 @@ import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
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 };
|
||||
Random randy = new Random();
|
||||
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) {
|
||||
ItemStack stack = event.entityPlayer.getCurrentEquippedItem();
|
||||
if (stack.getItem() instanceof ItemTaintPickaxe) {
|
||||
World world = event.entityPlayer.worldObj;
|
||||
int x = event.x;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void onPlayerBreaking(BreakSpeed event) {
|
||||
if (event.entityPlayer.getCurrentEquippedItem() != null) {
|
||||
ItemStack stack = event.entityPlayer.getCurrentEquippedItem();
|
||||
if (stack.getItem() instanceof ItemTaintPickaxe) {
|
||||
World world = event.entityPlayer.worldObj;
|
||||
int x = event.x;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onLivingDrops(LivingDropsEvent event) {
|
||||
@SubscribeEvent
|
||||
public void onLivingDrops(LivingDropsEvent event) {
|
||||
if (event.source.getDamageType().equals("player") && event.entityLiving instanceof ITaintedMob)
|
||||
{
|
||||
PotionEffect effect = event.entityLiving.getActivePotionEffect(Potion.weakness);
|
||||
@@ -112,291 +112,291 @@ 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))
|
||||
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)) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.resource, 1, 0));
|
||||
}
|
||||
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)) {
|
||||
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) {
|
||||
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 (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 (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))) {
|
||||
addDrop(event, new ItemStack(Items.skull, 1, ((EntitySkeleton) event.entityLiving).getSkeletonType()));
|
||||
}
|
||||
}
|
||||
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))) {
|
||||
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) {
|
||||
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))) {
|
||||
addDrop(event, new ItemStack(Items.skull, 1, 2));
|
||||
}
|
||||
}
|
||||
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))) {
|
||||
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) {
|
||||
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))) {
|
||||
addDrop(event, new ItemStack(Items.skull, 1, 4));
|
||||
}
|
||||
}
|
||||
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))) {
|
||||
addDrop(event, new ItemStack(Items.skull, 1, 4));
|
||||
}
|
||||
}
|
||||
|
||||
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))) {
|
||||
ItemStack head = new ItemStack(Items.skull, 1, 3);
|
||||
NBTTagCompound nametag = new NBTTagCompound();
|
||||
nametag.setString("SkullOwner", ((EntityPlayer) event.entityLiving).getCommandSenderName());
|
||||
head.setTagInfo("SkullOwner", nametag);
|
||||
addDrop(event, head);
|
||||
}
|
||||
}
|
||||
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))) {
|
||||
ItemStack head = new ItemStack(Items.skull, 1, 3);
|
||||
NBTTagCompound nametag = new NBTTagCompound();
|
||||
nametag.setString("SkullOwner", ((EntityPlayer) event.entityLiving).getCommandSenderName());
|
||||
head.setTagInfo("SkullOwner", nametag);
|
||||
addDrop(event, head);
|
||||
}
|
||||
}
|
||||
|
||||
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 (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 (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.entityLiving instanceof IMob) {
|
||||
int wrath = 2;
|
||||
ItemStack heldItem = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
|
||||
if (heldItem != null) {
|
||||
if (heldItem.getItem() instanceof ItemTool) {
|
||||
Multimap map = heldItem.getItem().getAttributeModifiers(heldItem);
|
||||
Collection collect = map.get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName());
|
||||
if (collect instanceof AttributeModifier) {
|
||||
wrath += (int) ((AttributeModifier) collect).getAmount();
|
||||
}
|
||||
} else if (heldItem.getItem() instanceof ItemSword) {
|
||||
wrath += (int) (((ItemSword) heldItem.getItem()).func_150931_i() + 4.0F);
|
||||
}
|
||||
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;
|
||||
ItemStack heldItem = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
|
||||
if (heldItem != null) {
|
||||
if (heldItem.getItem() instanceof ItemTool) {
|
||||
Multimap map = heldItem.getItem().getAttributeModifiers(heldItem);
|
||||
Collection collect = map.get(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName());
|
||||
if (collect instanceof AttributeModifier) {
|
||||
wrath += (int) ((AttributeModifier) collect).getAmount();
|
||||
}
|
||||
} else if (heldItem.getItem() instanceof ItemSword) {
|
||||
wrath += (int) (((ItemSword) heldItem.getItem()).func_150931_i() + 4.0F);
|
||||
}
|
||||
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.sharpness.effectId, heldItem);
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, heldItem);
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.sharpness.effectId, heldItem);
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, heldItem);
|
||||
|
||||
if (!event.entityLiving.isImmuneToFire()) {
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, heldItem);
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, heldItem);
|
||||
}
|
||||
if (!event.entityLiving.isImmuneToFire()) {
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, heldItem);
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, heldItem);
|
||||
}
|
||||
|
||||
if (event.entityLiving.isEntityUndead()) {
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.smite.effectId, heldItem);
|
||||
}
|
||||
if (event.entityLiving.isEntityUndead()) {
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.smite.effectId, heldItem);
|
||||
}
|
||||
|
||||
if (event.entityLiving.getCreatureAttribute() == EnumCreatureAttribute.ARTHROPOD) {
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.baneOfArthropods.effectId, heldItem);
|
||||
}
|
||||
}
|
||||
if (event.entityLiving.getCreatureAttribute() == EnumCreatureAttribute.ARTHROPOD) {
|
||||
wrath += EnchantmentHelper.getEnchantmentLevel(Enchantment.baneOfArthropods.effectId, heldItem);
|
||||
}
|
||||
}
|
||||
|
||||
if (randy.nextInt(61) <= wrath) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 0));
|
||||
}
|
||||
if (randy.nextInt(61) <= wrath) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 0));
|
||||
}
|
||||
|
||||
if (event.entityLiving instanceof IBossDisplayData) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 2 + randy.nextInt(1 + event.lootingLevel), 3));
|
||||
}
|
||||
}
|
||||
if (event.entityLiving instanceof IBossDisplayData) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 2 + randy.nextInt(1 + event.lootingLevel), 3));
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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) {
|
||||
addDrop(event, new ItemStack(ForbiddenItems.deadlyShards, 1, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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.delayBeforeCanPickup = 10;
|
||||
event.drops.add(entityitem);
|
||||
}
|
||||
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.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) {
|
||||
ItemStack equip = ((EntityPlayer) event.source.getEntity()).getCurrentEquippedItem();
|
||||
if (equip.getItem() == ForbiddenItems.fork) {
|
||||
String name = null;
|
||||
try {
|
||||
name = EntityList.getEntityString(event.entityLiving);
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
name = event.entityLiving.getCommandSenderName();
|
||||
} catch (Exception ee) {
|
||||
return;
|
||||
}
|
||||
} finally {
|
||||
if (name == null)
|
||||
return;
|
||||
}
|
||||
@SubscribeEvent
|
||||
public void onDeath(LivingDeathEvent event) {
|
||||
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;
|
||||
try {
|
||||
name = EntityList.getEntityString(event.entityLiving);
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
name = event.entityLiving.getCommandSenderName();
|
||||
} catch (Exception ee) {
|
||||
return;
|
||||
}
|
||||
} finally {
|
||||
if (name == null)
|
||||
return;
|
||||
}
|
||||
|
||||
if (Config.spawnerMobs.containsKey(name) || (Config.wrathCrazy && !(event.entityLiving instanceof IBossDisplayData)))
|
||||
imprintCrystal((EntityPlayer) (event.source.getEntity()), name);
|
||||
}
|
||||
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) {
|
||||
try {
|
||||
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));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, "Failed to educate!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
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));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogHandler.log(Level.ERROR, "Failed to educate!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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());
|
||||
item.stackTagCompound.setString("mob", mob);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
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());
|
||||
item.stackTagCompound.setString("mob", mob);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onHarvest(HarvestDropsEvent event) {
|
||||
EntityPlayer player = event.harvester;
|
||||
if (player != null && player.inventory.getCurrentItem() != null) {
|
||||
ItemStack equip = player.inventory.getCurrentItem();
|
||||
if (equip.getItem() == ForbiddenItems.taintShovel && event.block.getMaterial() == Config.taintMaterial && !(event.block == Block.getBlockFromItem(Config.thaumcraftTaintBlock.getItem()) && event.blockMetadata == 2)) {
|
||||
int fortune = EnchantmentHelper.getFortuneModifier(player);
|
||||
int chance = 1 + (2 * fortune);
|
||||
if (event.isSilkTouching)
|
||||
chance += 6;
|
||||
@SubscribeEvent
|
||||
public void onHarvest(HarvestDropsEvent event) {
|
||||
EntityPlayer player = event.harvester;
|
||||
if (player != null && player.inventory.getCurrentItem() != null) {
|
||||
ItemStack equip = player.inventory.getCurrentItem();
|
||||
if (equip.getItem() == ForbiddenItems.taintShovel && event.block.getMaterial() == Config.taintMaterial && !(event.block == Block.getBlockFromItem(Config.thaumcraftTaintBlock.getItem()) && event.blockMetadata == 2)) {
|
||||
int fortune = EnchantmentHelper.getFortuneModifier(player);
|
||||
int chance = 1 + (2 * fortune);
|
||||
if (event.isSilkTouching)
|
||||
chance += 6;
|
||||
|
||||
if (randy.nextInt(51) <= chance) {
|
||||
event.drops.add(new ItemStack(ForbiddenItems.deadlyShards, 1, 2));
|
||||
}
|
||||
}
|
||||
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;
|
||||
if (randy.nextInt(51) <= chance) {
|
||||
event.drops.add(new ItemStack(ForbiddenItems.deadlyShards, 1, 2));
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
||||
for (int a = 0; a < event.drops.size(); ++a) {
|
||||
ItemStack is = (ItemStack) event.drops.get(a);
|
||||
ItemStack smr = Utils.findSpecialMiningResult(is, chance, event.world.rand);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.consuming.effectId, equip) > 0) {
|
||||
for (int x = 0; x < event.drops.size(); x++) {
|
||||
ItemStack drop = (ItemStack) event.drops.get(x);
|
||||
if (drop != null && (drop.getItem() == Item.getItemFromBlock(Blocks.cobblestone) || drop.getItem() == Item.getItemFromBlock(Blocks.dirt) || drop.getItem() == Item.getItemFromBlock(Blocks.netherrack) || drop.getItem() == Item.getItemFromBlock(Blocks.gravel)))
|
||||
event.drops.remove(x);
|
||||
}
|
||||
}
|
||||
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();
|
||||
while (current.hasNext()) {
|
||||
ItemStack curDrop = (ItemStack) current.next();
|
||||
if (curDrop != null && curDrop.getItem() == Config.thaumcraftShard.getItem()) {
|
||||
int x = curDrop.stackSize;
|
||||
for (int i = 0; i < x; i++) {
|
||||
moarDrops.add(getSinShard());
|
||||
}
|
||||
deadDrops.add(curDrop);
|
||||
}
|
||||
}
|
||||
current = deadDrops.iterator();
|
||||
while (current.hasNext()) {
|
||||
event.drops.remove((ItemStack) (current.next()));
|
||||
}
|
||||
current = moarDrops.iterator();
|
||||
while (current.hasNext()) {
|
||||
event.drops.add((ItemStack) (current.next()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int a = 0; a < event.drops.size(); ++a) {
|
||||
ItemStack is = (ItemStack) event.drops.get(a);
|
||||
ItemStack smr = Utils.findSpecialMiningResult(is, chance, event.world.rand);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (EnchantmentHelper.getEnchantmentLevel(DarkEnchantments.consuming.effectId, equip) > 0) {
|
||||
for (int x = 0; x < event.drops.size(); x++) {
|
||||
ItemStack drop = (ItemStack) event.drops.get(x);
|
||||
if (drop != null && (drop.getItem() == Item.getItemFromBlock(Blocks.cobblestone) || drop.getItem() == Item.getItemFromBlock(Blocks.dirt) || drop.getItem() == Item.getItemFromBlock(Blocks.netherrack) || drop.getItem() == Item.getItemFromBlock(Blocks.gravel)))
|
||||
event.drops.remove(x);
|
||||
}
|
||||
}
|
||||
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();
|
||||
while (current.hasNext()) {
|
||||
ItemStack curDrop = (ItemStack) current.next();
|
||||
if (curDrop != null && curDrop.getItem() == Config.thaumcraftShard.getItem()) {
|
||||
int x = curDrop.stackSize;
|
||||
for (int i = 0; i < x; i++) {
|
||||
moarDrops.add(getSinShard());
|
||||
}
|
||||
deadDrops.add(curDrop);
|
||||
}
|
||||
}
|
||||
current = deadDrops.iterator();
|
||||
while (current.hasNext()) {
|
||||
event.drops.remove((ItemStack) (current.next()));
|
||||
}
|
||||
current = moarDrops.iterator();
|
||||
while (current.hasNext()) {
|
||||
event.drops.add((ItemStack) (current.next()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack getSinShard() {
|
||||
int x = randy.nextInt(7);
|
||||
switch (x) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
return new ItemStack(ForbiddenItems.deadlyShards, 1, x);
|
||||
case 2:
|
||||
return new ItemStack(ForbiddenItems.gluttonyShard, 1, 0);
|
||||
case 4:
|
||||
if (Config.noLust)
|
||||
return getSinShard();
|
||||
else
|
||||
return new ItemStack(ForbiddenItems.deadlyShards, 1, 4);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public ItemStack getSinShard() {
|
||||
int x = randy.nextInt(7);
|
||||
switch (x) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
return new ItemStack(ForbiddenItems.deadlyShards, 1, x);
|
||||
case 2:
|
||||
return new ItemStack(ForbiddenItems.gluttonyShard, 1, 0);
|
||||
case 4:
|
||||
if (Config.noLust)
|
||||
return getSinShard();
|
||||
else
|
||||
return new ItemStack(ForbiddenItems.deadlyShards, 1, 4);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onSpawn(LivingSpawnEvent event) {
|
||||
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 onSpawn(LivingSpawnEvent event) {
|
||||
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) {
|
||||
@SubscribeEvent
|
||||
public void onGetHurt(LivingHurtEvent event) {
|
||||
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")) {
|
||||
ItemStack wand = ((EntityPlayer) event.entityLiving).getCurrentEquippedItem();
|
||||
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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
||||
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")) {
|
||||
event.entityLiving.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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")) {
|
||||
event.entityLiving.addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void onFeelPain(LivingHurtEvent event){
|
||||
@@ -426,16 +426,16 @@ 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")) {
|
||||
event.toolTip.add(StatCollector.translateToLocal("tooltip.creativeonly"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@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")) {
|
||||
event.toolTip.add(StatCollector.translateToLocal("tooltip.creativeonly"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityUpdate(LivingUpdateEvent event){
|
||||
|
||||
@@ -11,62 +11,62 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class FauxResearchItem extends ResearchItem {
|
||||
public ResearchItem original;
|
||||
public ResearchItem original;
|
||||
|
||||
public FauxResearchItem(String name, String cat, String origin, String originCategory, int x, int y, ResourceLocation icon) {
|
||||
super(name, cat, new AspectList(), x, y, 1, icon);
|
||||
original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin);
|
||||
bindToOriginal();
|
||||
setStub();
|
||||
setHidden();
|
||||
}
|
||||
public FauxResearchItem(String name, String cat, String origin, String originCategory, int x, int y, ResourceLocation icon) {
|
||||
super(name, cat, new AspectList(), x, y, 1, icon);
|
||||
original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin);
|
||||
bindToOriginal();
|
||||
setStub();
|
||||
setHidden();
|
||||
}
|
||||
|
||||
public FauxResearchItem(String name, String cat, String origin, String originCategory, int x, int y, ItemStack icon) {
|
||||
super(name, cat, new AspectList(), x, y, 1, icon);
|
||||
original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin);
|
||||
bindToOriginal();
|
||||
setStub();
|
||||
setHidden();
|
||||
}
|
||||
public FauxResearchItem(String name, String cat, String origin, String originCategory, int x, int y, ItemStack icon) {
|
||||
super(name, cat, new AspectList(), x, y, 1, icon);
|
||||
original = ((ResearchCategoryList) ResearchCategories.researchCategories.get(originCategory)).research.get(origin);
|
||||
bindToOriginal();
|
||||
setStub();
|
||||
setHidden();
|
||||
}
|
||||
|
||||
private void bindToOriginal() {
|
||||
if (original.siblings == null)
|
||||
original.setSiblings(new String[] { key });
|
||||
else {
|
||||
String[] family = original.siblings;
|
||||
String[] newFamily = new String[family.length + 1];
|
||||
for (int x = 0; x < family.length; x++) {
|
||||
newFamily[x] = family[x];
|
||||
}
|
||||
newFamily[family.length] = key;
|
||||
original.setSiblings(newFamily);
|
||||
}
|
||||
}
|
||||
private void bindToOriginal() {
|
||||
if (original.siblings == null)
|
||||
original.setSiblings(new String[] { key });
|
||||
else {
|
||||
String[] family = original.siblings;
|
||||
String[] newFamily = new String[family.length + 1];
|
||||
for (int x = 0; x < family.length; x++) {
|
||||
newFamily[x] = family[x];
|
||||
}
|
||||
newFamily[family.length] = key;
|
||||
original.setSiblings(newFamily);
|
||||
}
|
||||
}
|
||||
|
||||
public ResearchPage[] getPages() {
|
||||
return original.getPages();
|
||||
}
|
||||
public ResearchPage[] getPages() {
|
||||
return original.getPages();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getName() {
|
||||
return original.getName();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getName() {
|
||||
return original.getName();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getText() {
|
||||
return original.getText();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getText() {
|
||||
return original.getText();
|
||||
}
|
||||
|
||||
public boolean isStub() {
|
||||
return true;
|
||||
}
|
||||
public boolean isStub() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isHidden() {
|
||||
return true;
|
||||
}
|
||||
public boolean isHidden() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getComplexity() {
|
||||
return 1;
|
||||
}
|
||||
public int getComplexity() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,14 +5,14 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
public class LogHandler {
|
||||
public static final Logger logger = LogManager.getLogger("Forbidden Magic");
|
||||
public static final Logger logger = LogManager.getLogger("Forbidden Magic");
|
||||
|
||||
public static void log(Level level, Throwable e, String message) {
|
||||
log(level, message);
|
||||
e.printStackTrace();
|
||||
}
|
||||
public static void log(Level level, Throwable e, String message) {
|
||||
log(level, message);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
public static void log(Level level, String message) {
|
||||
logger.log(level, message);
|
||||
}
|
||||
public static void log(Level level, String message) {
|
||||
logger.log(level, message);
|
||||
}
|
||||
}
|
||||
@@ -11,23 +11,23 @@ import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
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);
|
||||
return false;
|
||||
}
|
||||
@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);
|
||||
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;
|
||||
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.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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -5,36 +5,36 @@ import java.lang.reflect.Field;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
||||
public class XPReflectionHelper {
|
||||
private static Field getField(Class clazz, String field) throws NoSuchFieldException {
|
||||
try {
|
||||
return clazz.getDeclaredField(field);
|
||||
} catch (NoSuchFieldException e) {
|
||||
Class superClass = clazz.getSuperclass();
|
||||
if (superClass == null) {
|
||||
throw e;
|
||||
} else {
|
||||
return getField(superClass, field);
|
||||
}
|
||||
}
|
||||
}
|
||||
private static Field getField(Class clazz, String field) throws NoSuchFieldException {
|
||||
try {
|
||||
return clazz.getDeclaredField(field);
|
||||
} catch (NoSuchFieldException e) {
|
||||
Class superClass = clazz.getSuperclass();
|
||||
if (superClass == null) {
|
||||
throw e;
|
||||
} else {
|
||||
return getField(superClass, field);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int getXP(EntityLiving entityLiving) {
|
||||
try {
|
||||
Field f = getField(entityLiving.getClass(), "experienceValue");
|
||||
f.setAccessible(true);
|
||||
return (Integer) f.get(entityLiving);
|
||||
} catch (NoSuchFieldException e) {
|
||||
try {
|
||||
Field f = getField(entityLiving.getClass(), "field_70728_aV");
|
||||
f.setAccessible(true);
|
||||
return (Integer) f.get(entityLiving);
|
||||
} catch (Exception e2) {
|
||||
return 0;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
public static int getXP(EntityLiving entityLiving) {
|
||||
try {
|
||||
Field f = getField(entityLiving.getClass(), "experienceValue");
|
||||
f.setAccessible(true);
|
||||
return (Integer) f.get(entityLiving);
|
||||
} catch (NoSuchFieldException e) {
|
||||
try {
|
||||
Field f = getField(entityLiving.getClass(), "field_70728_aV");
|
||||
f.setAccessible(true);
|
||||
return (Integer) f.get(entityLiving);
|
||||
} catch (Exception e2) {
|
||||
return 0;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -17,148 +17,148 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockArcaneCake extends Block {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon cakeTopIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon cakeBottomIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon cakeInsideIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon cakeTopIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon cakeBottomIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon cakeInsideIcon;
|
||||
|
||||
protected BlockArcaneCake() {
|
||||
super(Material.cake);
|
||||
this.setTickRandomly(true);
|
||||
}
|
||||
protected BlockArcaneCake() {
|
||||
super(Material.cake);
|
||||
this.setTickRandomly(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
float f = 0.0625F;
|
||||
float f1 = (float) (1 + l) / 12.0F;
|
||||
this.setBlockBounds(f1, 0.0F, f, 1.0F - f, 0.5F, 1.0F - f);
|
||||
}
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
float f = 0.0625F;
|
||||
float f1 = (float) (1 + l) / 12.0F;
|
||||
this.setBlockBounds(f1, 0.0F, f, 1.0F - f, 0.5F, 1.0F - f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsForItemRender() {
|
||||
float f = 0.0625F;
|
||||
float f1 = 0.5F;
|
||||
this.setBlockBounds(f, 0.0F, f, 1.0F - f, f1, 1.0F - f);
|
||||
}
|
||||
@Override
|
||||
public void setBlockBoundsForItemRender() {
|
||||
float f = 0.0625F;
|
||||
float f1 = 0.5F;
|
||||
this.setBlockBounds(f, 0.0F, f, 1.0F - f, f1, 1.0F - f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
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));
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
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));
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
@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));
|
||||
}
|
||||
@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));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
this.blockIcon = ir.registerIcon("forbidden:cake_side");
|
||||
this.cakeInsideIcon = ir.registerIcon("forbidden:cake_inner");
|
||||
this.cakeTopIcon = ir.registerIcon("forbidden:cake_top");
|
||||
this.cakeBottomIcon = ir.registerIcon("forbidden:cake_bottom");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
this.blockIcon = ir.registerIcon("forbidden:cake_side");
|
||||
this.cakeInsideIcon = ir.registerIcon("forbidden:cake_inner");
|
||||
this.cakeTopIcon = ir.registerIcon("forbidden:cake_top");
|
||||
this.cakeBottomIcon = ir.registerIcon("forbidden:cake_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
|
||||
this.eatCakeSlice(world, x, y, z, player);
|
||||
}
|
||||
@Override
|
||||
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
|
||||
this.eatCakeSlice(world, x, y, z, player);
|
||||
}
|
||||
|
||||
private void eatCakeSlice(World world, int x, int y, int z, EntityPlayer player) {
|
||||
if (player.canEat(false)) {
|
||||
player.getFoodStats().addStats(2, 1.0F);
|
||||
int l = world.getBlockMetadata(x, y, z) + 1;
|
||||
private void eatCakeSlice(World world, int x, int y, int z, EntityPlayer player) {
|
||||
if (player.canEat(false)) {
|
||||
player.getFoodStats().addStats(2, 1.0F);
|
||||
int l = world.getBlockMetadata(x, y, z) + 1;
|
||||
|
||||
if (l >= 12) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
} else {
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
}
|
||||
if (l >= 12) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
} else {
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random par5Random) {
|
||||
super.updateTick(world, x, y, z, par5Random);
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random par5Random) {
|
||||
super.updateTick(world, x, y, z, par5Random);
|
||||
int l = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if (l > 0) {
|
||||
// if (par5Random.nextInt((int)(25.0F / f) + 1) == 0)
|
||||
// {
|
||||
--l;
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
// }
|
||||
}
|
||||
}
|
||||
if (l > 0) {
|
||||
// if (par5Random.nextInt((int)(25.0F / f) + 1) == 0)
|
||||
// {
|
||||
--l;
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return !super.canPlaceBlockAt(world, x, y, z) ? false : this.canBlockStay(world, x, y, z);
|
||||
}
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return !super.canPlaceBlockAt(world, x, y, z) ? false : this.canBlockStay(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
if (!this.canBlockStay(world, x, y, z)) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
if (!this.canBlockStay(world, x, y, z)) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockStay(World world, int x, int y, int z) {
|
||||
return world.getBlock(x, y - 1, z).getMaterial().isSolid();
|
||||
}
|
||||
@Override
|
||||
public boolean canBlockStay(World world, int x, int y, int z) {
|
||||
return world.getBlock(x, y - 1, z).getMaterial().isSolid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random par1Random) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int quantityDropped(Random par1Random) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
return new ItemStack(this);
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
return new ItemStack(this);
|
||||
}
|
||||
}
|
||||
@@ -19,80 +19,80 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockBlackFlower extends BlockFlower {
|
||||
protected BlockBlackFlower() {
|
||||
super(1);
|
||||
float f = 0.2F;
|
||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
protected BlockBlackFlower() {
|
||||
super(1);
|
||||
float f = 0.2F;
|
||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
public void spreadFlowers(World world, int x, int y, int z, Random rand) {
|
||||
int l = 10;
|
||||
int i1;
|
||||
int j1;
|
||||
int k1;
|
||||
public void spreadFlowers(World world, int x, int y, int z, Random rand) {
|
||||
int l = 10;
|
||||
int i1;
|
||||
int j1;
|
||||
int k1;
|
||||
|
||||
for (i1 = x - 2; i1 <= x + 2; ++i1) {
|
||||
for (j1 = z - 2; j1 <= z + 2; ++j1) {
|
||||
for (k1 = y - 1; k1 <= y + 1; ++k1) {
|
||||
if (world.getBlock(i1, k1, j1) == this) {
|
||||
--l;
|
||||
for (i1 = x - 2; i1 <= x + 2; ++i1) {
|
||||
for (j1 = z - 2; j1 <= z + 2; ++j1) {
|
||||
for (k1 = y - 1; k1 <= y + 1; ++k1) {
|
||||
if (world.getBlock(i1, k1, j1) == this) {
|
||||
--l;
|
||||
|
||||
if (l <= 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (l <= 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
i1 = x + rand.nextInt(3) - 1;
|
||||
j1 = y + rand.nextInt(2) - rand.nextInt(2);
|
||||
k1 = z + rand.nextInt(3) - 1;
|
||||
i1 = x + rand.nextInt(3) - 1;
|
||||
j1 = y + rand.nextInt(2) - rand.nextInt(2);
|
||||
k1 = z + rand.nextInt(3) - 1;
|
||||
|
||||
for (int l1 = 0; l1 < 4; ++l1) {
|
||||
if (world.isAirBlock(i1, j1, k1) && this.canBlockStay(world, i1, j1, k1)) {
|
||||
x = i1;
|
||||
y = j1;
|
||||
z = k1;
|
||||
}
|
||||
for (int l1 = 0; l1 < 4; ++l1) {
|
||||
if (world.isAirBlock(i1, j1, k1) && this.canBlockStay(world, i1, j1, k1)) {
|
||||
x = i1;
|
||||
y = j1;
|
||||
z = k1;
|
||||
}
|
||||
|
||||
i1 = x + rand.nextInt(3) - 1;
|
||||
j1 = y + rand.nextInt(2) - rand.nextInt(2);
|
||||
k1 = z + rand.nextInt(3) - 1;
|
||||
}
|
||||
i1 = x + rand.nextInt(3) - 1;
|
||||
j1 = y + rand.nextInt(2) - rand.nextInt(2);
|
||||
k1 = z + rand.nextInt(3) - 1;
|
||||
}
|
||||
|
||||
if (world.isAirBlock(i1, j1, k1) && this.canBlockStay(world, i1, j1, k1)) {
|
||||
world.setBlock(i1, j1, k1, this, 0, 2);
|
||||
}
|
||||
}
|
||||
if (world.isAirBlock(i1, j1, k1) && this.canBlockStay(world, i1, j1, k1)) {
|
||||
world.setBlock(i1, j1, k1, this, 0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
|
||||
return this.blockIcon;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return super.canPlaceBlockAt(world, x, y, z) && this.canBlockStay(world, x, y, z);
|
||||
}
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return super.canPlaceBlockAt(world, x, y, z) && this.canBlockStay(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBlockStay(World world, int x, int y, int z) {
|
||||
Block block = world.getBlock(x, y - 1, z);
|
||||
return block.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this);
|
||||
}
|
||||
@Override
|
||||
public boolean canBlockStay(World world, int x, int y, int z) {
|
||||
Block block = world.getBlock(x, y - 1, z);
|
||||
return block.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
this.blockIcon = ir.registerIcon(this.getTextureName());
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister ir) {
|
||||
this.blockIcon = ir.registerIcon(this.getTextureName());
|
||||
}
|
||||
}
|
||||
@@ -23,99 +23,99 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWrathCage extends BlockContainer {
|
||||
protected BlockWrathCage() {
|
||||
super(Material.iron);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
protected BlockWrathCage() {
|
||||
super(Material.iron);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityWrathCage();
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityWrathCage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
return Item.getItemFromBlock(ForbiddenBlocks.wrathCage);
|
||||
}
|
||||
@Override
|
||||
public Item getItem(World world, int x, int y, int z) {
|
||||
return Item.getItemFromBlock(ForbiddenBlocks.wrathCage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random rand) {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public int quantityDropped(Random rand) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
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;
|
||||
@Override
|
||||
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;
|
||||
String string = nbttagcompound.getString("mob");
|
||||
if (string != null) {
|
||||
if (!world.isRemote) {
|
||||
TileEntityWrathCage spawner = (TileEntityWrathCage) world.getTileEntity(x, y, z);
|
||||
String mob = null;
|
||||
ItemStack crystal = null;
|
||||
if (spawner.getSpawnerLogic().isMobSet()) {
|
||||
mob = spawner.getSpawnerLogic().getEntityNameToSpawn();
|
||||
crystal = new ItemStack(ForbiddenItems.mobCrystal, 1);
|
||||
NBTTagString mobTag = new NBTTagString(mob);
|
||||
crystal.setTagInfo("mob", mobTag);
|
||||
}
|
||||
spawner.getSpawnerLogic().setMobID(string);
|
||||
spawner.getSpawnerLogic().mobIsSet(true);
|
||||
spawner.checkAspect();
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
player.setCurrentItemOrArmor(0, crystal);
|
||||
}
|
||||
player.swingItem();
|
||||
return true;
|
||||
}
|
||||
} 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;
|
||||
player.swingItem();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
String string = nbttagcompound.getString("mob");
|
||||
if (string != null) {
|
||||
if (!world.isRemote) {
|
||||
TileEntityWrathCage spawner = (TileEntityWrathCage) world.getTileEntity(x, y, z);
|
||||
String mob = null;
|
||||
ItemStack crystal = null;
|
||||
if (spawner.getSpawnerLogic().isMobSet()) {
|
||||
mob = spawner.getSpawnerLogic().getEntityNameToSpawn();
|
||||
crystal = new ItemStack(ForbiddenItems.mobCrystal, 1);
|
||||
NBTTagString mobTag = new NBTTagString(mob);
|
||||
crystal.setTagInfo("mob", mobTag);
|
||||
}
|
||||
spawner.getSpawnerLogic().setMobID(string);
|
||||
spawner.getSpawnerLogic().mobIsSet(true);
|
||||
spawner.checkAspect();
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
player.setCurrentItemOrArmor(0, crystal);
|
||||
}
|
||||
player.swingItem();
|
||||
return true;
|
||||
}
|
||||
} 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;
|
||||
player.swingItem();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPreDestroy(World world, int x, int y, int z, int side) {
|
||||
TileEntityWrathCage spawner = (TileEntityWrathCage) world.getTileEntity(x, y, z);
|
||||
@Override
|
||||
public void onBlockPreDestroy(World world, int x, int y, int z, int side) {
|
||||
TileEntityWrathCage spawner = (TileEntityWrathCage) world.getTileEntity(x, y, z);
|
||||
|
||||
if (spawner != null && spawner.getSpawnerLogic().isMobSet()) {
|
||||
float f = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
if (spawner != null && spawner.getSpawnerLogic().isMobSet()) {
|
||||
float f = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
ItemStack crystal = new ItemStack(ForbiddenItems.mobCrystal);
|
||||
crystal.setTagCompound(new NBTTagCompound());
|
||||
String mob = spawner.getSpawnerLogic().getEntityNameToSpawn();
|
||||
crystal.stackTagCompound.setString("mob", mob);
|
||||
ItemStack crystal = new ItemStack(ForbiddenItems.mobCrystal);
|
||||
crystal.setTagCompound(new NBTTagCompound());
|
||||
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);
|
||||
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);
|
||||
}
|
||||
super.onBlockPreDestroy(world, x, y, z, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
return new ItemStack(getItem(null, x, y, z));
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
return new ItemStack(getItem(null, x, y, z));
|
||||
}
|
||||
}
|
||||
@@ -8,28 +8,28 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ForbiddenBlocks {
|
||||
public static Block arcaneCake;
|
||||
public static Block blackFlower;
|
||||
public static Block wrathCage;
|
||||
public static Block starBlock;
|
||||
public static Block arcaneCake;
|
||||
public static Block blackFlower;
|
||||
public static Block wrathCage;
|
||||
public static Block starBlock;
|
||||
public static Block roseBush;
|
||||
|
||||
public static void addBlocks() {
|
||||
arcaneCake = new BlockArcaneCake().setHardness(0.5F).setStepSound(Block.soundTypeCloth).setBlockName("ArcaneCake");
|
||||
GameRegistry.registerBlock(arcaneCake, "ArcaneCake");
|
||||
public static void addBlocks() {
|
||||
arcaneCake = new BlockArcaneCake().setHardness(0.5F).setStepSound(Block.soundTypeCloth).setBlockName("ArcaneCake");
|
||||
GameRegistry.registerBlock(arcaneCake, "ArcaneCake");
|
||||
|
||||
wrathCage = new BlockWrathCage().setHardness(5.0F).setResistance(2000.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("forbidden:spirit_box").setBlockName("WrathCage");
|
||||
GameRegistry.registerBlock(wrathCage, "WrathCage");
|
||||
GameRegistry.registerTileEntity(TileEntityWrathCage.class, "WrathCage");
|
||||
wrathCage = new BlockWrathCage().setHardness(5.0F).setResistance(2000.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("forbidden:spirit_box").setBlockName("WrathCage");
|
||||
GameRegistry.registerBlock(wrathCage, "WrathCage");
|
||||
GameRegistry.registerTileEntity(TileEntityWrathCage.class, "WrathCage");
|
||||
|
||||
blackFlower = new BlockBlackFlower().setStepSound(Block.soundTypeGrass).setBlockTextureName("forbidden:flower_black").setBlockName("InkFlower");
|
||||
GameRegistry.registerBlock(blackFlower, "InkFlower");
|
||||
blackFlower = new BlockBlackFlower().setStepSound(Block.soundTypeGrass).setBlockTextureName("forbidden:flower_black").setBlockName("InkFlower");
|
||||
GameRegistry.registerBlock(blackFlower, "InkFlower");
|
||||
|
||||
starBlock = new BlockResource().setHardness(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("forbidden:starblock").setBlockName("StarBlock");
|
||||
GameRegistry.registerBlock(starBlock, "StarBlock");
|
||||
OreDictionary.registerOre("blockNetherStar", new ItemStack(starBlock, 1, 0));
|
||||
starBlock = new BlockResource().setHardness(5.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("forbidden:starblock").setBlockName("StarBlock");
|
||||
GameRegistry.registerBlock(starBlock, "StarBlock");
|
||||
OreDictionary.registerOre("blockNetherStar", new ItemStack(starBlock, 1, 0));
|
||||
|
||||
roseBush = new BlockRoseBush();
|
||||
GameRegistry.registerBlock(roseBush, "UmbralBush");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,9 @@ import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
@Override
|
||||
public void registerRenderInfo() {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWrathCage.class, new TileEntityWrathCageRenderer());
|
||||
}
|
||||
@Override
|
||||
public void registerRenderInfo() {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWrathCage.class, new TileEntityWrathCageRenderer());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,39 +14,39 @@ 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;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) z, (float) par6 + 0.5F);
|
||||
renderMob(wrathCage.getSpawnerLogic(), x, z, par6, par8);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
public void renderTileEntityWrathCage(TileEntityWrathCage wrathCage, double x, double z, double par6, float par8) {
|
||||
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);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public static void renderMob(WrathSpawnerLogic spawnLogic, double par1, double y, double par5, float par7) {
|
||||
Entity entity = spawnLogic.getEntityForRender();
|
||||
public static void renderMob(WrathSpawnerLogic spawnLogic, double par1, double y, double par5, float par7) {
|
||||
Entity entity = spawnLogic.getEntityForRender();
|
||||
|
||||
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;
|
||||
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);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
|
||||
GL11.glScalef(f1, f1, f1);
|
||||
entity.setLocationAndAngles(par1, y, par5, 0.0F, 0.0F);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, par7);
|
||||
}
|
||||
}
|
||||
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;
|
||||
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);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
|
||||
GL11.glScalef(f1, f1, f1);
|
||||
entity.setLocationAndAngles(par1, y, par5, 0.0F, 0.0F);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, par7);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderTileEntityAt(TileEntity par1TileEntity, double x, double z, double par6, float par8) {
|
||||
this.renderTileEntityWrathCage((TileEntityWrathCage) par1TileEntity, x, z, par6, par8);
|
||||
}
|
||||
public void renderTileEntityAt(TileEntity par1TileEntity, double x, double z, double par6, float par8) {
|
||||
this.renderTileEntityWrathCage((TileEntityWrathCage) par1TileEntity, x, z, par6, par8);
|
||||
}
|
||||
}
|
||||
@@ -9,37 +9,37 @@ import thaumic.tinkerer.common.enchantment.core.EnchantmentManager;
|
||||
import fox.spiteful.forbidden.Config;
|
||||
|
||||
public class DarkEnchantments {
|
||||
public static Enchantment cluster;
|
||||
public static Enchantment wrath;
|
||||
public static Enchantment greedy;
|
||||
public static Enchantment consuming;
|
||||
public static Enchantment educational;
|
||||
public static Enchantment corrupting;
|
||||
public static Enchantment voidtouched;
|
||||
public static Enchantment cluster;
|
||||
public static Enchantment wrath;
|
||||
public static Enchantment greedy;
|
||||
public static Enchantment consuming;
|
||||
public static Enchantment educational;
|
||||
public static Enchantment corrupting;
|
||||
public static Enchantment voidtouched;
|
||||
public static Enchantment impact;
|
||||
|
||||
public static void hex() {
|
||||
cluster = new EnchantmentCluster(Config.clusterEnchID);
|
||||
wrath = new EnchantmentWrath(Config.wrathEnchID);
|
||||
greedy = new EnchantmentGreedy(Config.greedyEnchID);
|
||||
consuming = new EnchantmentConsuming(Config.consumingEnchID);
|
||||
educational = new EnchantmentEducational(Config.educationalEnchID);
|
||||
corrupting = new EnchantmentCorrupting(Config.corruptingEnchID);
|
||||
voidtouched = new EnchantmentVoid(Config.voidEnchID);
|
||||
public static void hex() {
|
||||
cluster = new EnchantmentCluster(Config.clusterEnchID);
|
||||
wrath = new EnchantmentWrath(Config.wrathEnchID);
|
||||
greedy = new EnchantmentGreedy(Config.greedyEnchID);
|
||||
consuming = new EnchantmentConsuming(Config.consumingEnchID);
|
||||
educational = new EnchantmentEducational(Config.educationalEnchID);
|
||||
corrupting = new EnchantmentCorrupting(Config.corruptingEnchID);
|
||||
voidtouched = new EnchantmentVoid(Config.voidEnchID);
|
||||
impact = new EnchantmentImpact(Config.impactEnchID);
|
||||
|
||||
if (Compat.tt) {
|
||||
try {
|
||||
EnchantmentManager.registerExponentialCostData(wrath, "forbidden:textures/misc/pigbane.png", false, (new AspectList()).add(Aspect.ENTROPY, 6).add(Aspect.FIRE, 6), "WRATH");
|
||||
EnchantmentManager.registerExponentialCostData(cluster, "forbidden:textures/misc/lucrative.png", false, (new AspectList()).add(Aspect.FIRE, 5).add(Aspect.EARTH, 5).add(Aspect.ORDER, 5), "CLUSTER");
|
||||
EnchantmentManager.registerExponentialCostData(greedy, "forbidden:textures/misc/greedy.png", false, (new AspectList()).add(Aspect.ENTROPY, 50).add(Aspect.EARTH, 30).add(Aspect.ORDER, 20), "GREEDY");
|
||||
EnchantmentManager.registerExponentialCostData(educational, "forbidden:textures/misc/educational.png", false, new AspectList().add(Aspect.AIR, 10).add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 15).add(Aspect.ENTROPY, 15), "EDUCATIONAL");
|
||||
EnchantmentManager.registerExponentialCostData(consuming, "forbidden:textures/misc/consuming.png", false, (new AspectList()).add(Aspect.ENTROPY, 10), "CONSUMING");
|
||||
EnchantmentManager.registerExponentialCostData(corrupting, "forbidden:textures/misc/corrupting.png", false, (new AspectList()).add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 15).add(Aspect.EARTH, 10), "CORRUPTING");
|
||||
if (Compat.tt) {
|
||||
try {
|
||||
EnchantmentManager.registerExponentialCostData(wrath, "forbidden:textures/misc/pigbane.png", false, (new AspectList()).add(Aspect.ENTROPY, 6).add(Aspect.FIRE, 6), "WRATH");
|
||||
EnchantmentManager.registerExponentialCostData(cluster, "forbidden:textures/misc/lucrative.png", false, (new AspectList()).add(Aspect.FIRE, 5).add(Aspect.EARTH, 5).add(Aspect.ORDER, 5), "CLUSTER");
|
||||
EnchantmentManager.registerExponentialCostData(greedy, "forbidden:textures/misc/greedy.png", false, (new AspectList()).add(Aspect.ENTROPY, 50).add(Aspect.EARTH, 30).add(Aspect.ORDER, 20), "GREEDY");
|
||||
EnchantmentManager.registerExponentialCostData(educational, "forbidden:textures/misc/educational.png", false, new AspectList().add(Aspect.AIR, 10).add(Aspect.FIRE, 10).add(Aspect.WATER, 10).add(Aspect.EARTH, 10).add(Aspect.ORDER, 15).add(Aspect.ENTROPY, 15), "EDUCATIONAL");
|
||||
EnchantmentManager.registerExponentialCostData(consuming, "forbidden:textures/misc/consuming.png", false, (new AspectList()).add(Aspect.ENTROPY, 10), "CONSUMING");
|
||||
EnchantmentManager.registerExponentialCostData(corrupting, "forbidden:textures/misc/corrupting.png", false, (new AspectList()).add(Aspect.ENTROPY, 20).add(Aspect.FIRE, 15).add(Aspect.EARTH, 10), "CORRUPTING");
|
||||
EnchantmentManager.registerExponentialCostData(voidtouched, "forbidden:textures/misc/voidtouched.png", false, (new AspectList()).add(Aspect.ENTROPY, 70), "VOIDTOUCHED");
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,31 +6,31 @@ import net.minecraft.enchantment.EnumEnchantmentType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class EnchantmentCluster extends Enchantment {
|
||||
public EnchantmentCluster(int id) {
|
||||
super(id, 0, EnumEnchantmentType.digger);
|
||||
setName("cluster");
|
||||
}
|
||||
public EnchantmentCluster(int id) {
|
||||
super(id, 0, EnumEnchantmentType.digger);
|
||||
setName("cluster");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 4;
|
||||
}
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.fortune.effectId;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.fortune.effectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemMorphPickaxe)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemMorphPickaxe)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -7,31 +7,31 @@ import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class EnchantmentConsuming extends Enchantment {
|
||||
public EnchantmentConsuming(int id) {
|
||||
super(id, 0, EnumEnchantmentType.digger);
|
||||
setName("consuming");
|
||||
}
|
||||
public EnchantmentConsuming(int id) {
|
||||
super(id, 0, EnumEnchantmentType.digger);
|
||||
setName("consuming");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.silkTouch.effectId;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.silkTouch.effectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemSpade)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemSpade)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -6,36 +6,36 @@ import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class EnchantmentCorrupting extends Enchantment {
|
||||
public EnchantmentCorrupting(int id) {
|
||||
super(id, 0, EnumEnchantmentType.digger);
|
||||
setName("corrupting");
|
||||
}
|
||||
public EnchantmentCorrupting(int id) {
|
||||
super(id, 0, EnumEnchantmentType.digger);
|
||||
setName("corrupting");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinEnchantability(int par1) {
|
||||
return 20;
|
||||
}
|
||||
@Override
|
||||
public int getMinEnchantability(int par1) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnchantability(int par1) {
|
||||
return super.getMinEnchantability(par1) + 50;
|
||||
}
|
||||
@Override
|
||||
public int getMaxEnchantability(int par1) {
|
||||
return super.getMinEnchantability(par1) + 50;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemPickaxe)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
if (item.getItem() instanceof ItemPickaxe)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -5,23 +5,23 @@ import net.minecraft.enchantment.EnumEnchantmentType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class EnchantmentEducational extends Enchantment {
|
||||
public EnchantmentEducational(int id) {
|
||||
super(id, 0, EnumEnchantmentType.weapon);
|
||||
setName("educational");
|
||||
}
|
||||
public EnchantmentEducational(int id) {
|
||||
super(id, 0, EnumEnchantmentType.weapon);
|
||||
setName("educational");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 5;
|
||||
}
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.greedy.effectId;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.greedy.effectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -5,33 +5,33 @@ import net.minecraft.enchantment.EnumEnchantmentType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class EnchantmentGreedy extends Enchantment {
|
||||
public EnchantmentGreedy(int id) {
|
||||
super(id, 0, EnumEnchantmentType.weapon);
|
||||
setName("greedy");
|
||||
}
|
||||
public EnchantmentGreedy(int id) {
|
||||
super(id, 0, EnumEnchantmentType.weapon);
|
||||
setName("greedy");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinEnchantability(int par1) {
|
||||
return 20;
|
||||
}
|
||||
@Override
|
||||
public int getMinEnchantability(int par1) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnchantability(int par1) {
|
||||
return super.getMinEnchantability(par1) + 50;
|
||||
}
|
||||
@Override
|
||||
public int getMaxEnchantability(int par1) {
|
||||
return super.getMinEnchantability(par1) + 50;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.educational.effectId;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyTogether(Enchantment ench) {
|
||||
return super.canApplyTogether(ench) && ench.effectId != Enchantment.looting.effectId && ench.effectId != DarkEnchantments.educational.effectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -10,33 +10,33 @@ import net.minecraft.item.ItemStack;
|
||||
import fox.spiteful.forbidden.items.ItemMorphShovel;
|
||||
|
||||
public class EnchantmentVoid extends Enchantment {
|
||||
public EnchantmentVoid(int id) {
|
||||
super(id, 0, EnumEnchantmentType.digger);
|
||||
setName("voidtouched");
|
||||
}
|
||||
public EnchantmentVoid(int id) {
|
||||
super(id, 0, EnumEnchantmentType.digger);
|
||||
setName("voidtouched");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public int getMaxLevel() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMinEnchantability(int par1) {
|
||||
return 30;
|
||||
}
|
||||
@Override
|
||||
public int getMinEnchantability(int par1) {
|
||||
return 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnchantability(int par1) {
|
||||
return super.getMinEnchantability(par1) + 30;
|
||||
}
|
||||
@Override
|
||||
public int getMaxEnchantability(int par1) {
|
||||
return super.getMinEnchantability(par1) + 30;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
return (item.getItem() instanceof ItemMorphPickaxe || item.getItem() instanceof ItemMorphAxe || item.getItem() instanceof ItemMorphSword || item.getItem() instanceof ItemMorphShovel);
|
||||
}
|
||||
@Override
|
||||
public boolean canApply(ItemStack item) {
|
||||
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;
|
||||
}
|
||||
@Override
|
||||
public boolean canApplyAtEnchantingTable(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -31,158 +31,158 @@ import fox.spiteful.forbidden.items.wands.YandereWandUpdate;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ForbiddenItems {
|
||||
public static Item deadlyShards;
|
||||
public static Item gluttonyShard;
|
||||
public static Item skullAxe;
|
||||
public static Item arcaneCakeItem;
|
||||
public static Item taintShovel;
|
||||
public static Item wandCore;
|
||||
public static Item wandCap;
|
||||
public static Item resource;
|
||||
public static Item taintPickaxe;
|
||||
public static Item mobCrystal;
|
||||
public static Item fork;
|
||||
public static Item morphPickaxe;
|
||||
public static Item morphSword;
|
||||
public static Item morphShovel;
|
||||
public static Item morphAxe;
|
||||
public static Item crystalwell;
|
||||
public static Item ridingCrop;
|
||||
public static Item deadlyShards;
|
||||
public static Item gluttonyShard;
|
||||
public static Item skullAxe;
|
||||
public static Item arcaneCakeItem;
|
||||
public static Item taintShovel;
|
||||
public static Item wandCore;
|
||||
public static Item wandCap;
|
||||
public static Item resource;
|
||||
public static Item taintPickaxe;
|
||||
public static Item mobCrystal;
|
||||
public static Item fork;
|
||||
public static Item morphPickaxe;
|
||||
public static Item morphSword;
|
||||
public static Item morphShovel;
|
||||
public static Item morphAxe;
|
||||
public static Item crystalwell;
|
||||
public static Item ridingCrop;
|
||||
public static Item subCollar;
|
||||
|
||||
public static Item boundShears;
|
||||
public static Item bloodRapier;
|
||||
public static Item bloodwell;
|
||||
public static Item bloodOrb;
|
||||
public static Item bloodwell;
|
||||
public static Item bloodOrb;
|
||||
public static Item boundwell;
|
||||
|
||||
public static WandRod WAND_ROD_TAINTED;
|
||||
public static WandRod WAND_ROD_INFERNAL;
|
||||
public static WandRod WAND_ROD_NEUTRONIUM;
|
||||
public static WandRod WAND_ROD_BLOOD;
|
||||
public static WandRod WAND_ROD_WITCHWOOD;
|
||||
public static WandRod WAND_ROD_LIVINGWOOD;
|
||||
public static WandRod WAND_ROD_TAINTED;
|
||||
public static WandRod WAND_ROD_INFERNAL;
|
||||
public static WandRod WAND_ROD_NEUTRONIUM;
|
||||
public static WandRod WAND_ROD_BLOOD;
|
||||
public static WandRod WAND_ROD_WITCHWOOD;
|
||||
public static WandRod WAND_ROD_LIVINGWOOD;
|
||||
public static WandRod WAND_ROD_DREAMWOOD;
|
||||
public static StaffRod STAFF_ROD_BLOOD;
|
||||
public static StaffRod STAFF_ROD_NEUTRONIUM;
|
||||
public static StaffRod STAFF_ROD_WITCHWOOD;
|
||||
public static StaffRod STAFF_ROD_BLOOD;
|
||||
public static StaffRod STAFF_ROD_NEUTRONIUM;
|
||||
public static StaffRod STAFF_ROD_WITCHWOOD;
|
||||
public static StaffRod STAFF_ROD_DREAMWOOD;
|
||||
public static WandCap WAND_CAP_ORICHALCUM;
|
||||
public static WandCap WAND_CAP_ALCHEMICAL;
|
||||
public static WandCap WAND_CAP_VINTEUM;
|
||||
public static WandCap WAND_CAP_MANASTEEL;
|
||||
public static WandCap WAND_CAP_ORICHALCUM;
|
||||
public static WandCap WAND_CAP_ALCHEMICAL;
|
||||
public static WandCap WAND_CAP_VINTEUM;
|
||||
public static WandCap WAND_CAP_MANASTEEL;
|
||||
public static WandCap WAND_CAP_ELEMENTIUM;
|
||||
|
||||
public static void addItems() {
|
||||
deadlyShards = new ItemDeadlyShard().setUnlocalizedName("NetherShard");
|
||||
GameRegistry.registerItem(deadlyShards, "NetherShard");
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 0));
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 1));
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 3));
|
||||
if (!Config.noLust)
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 4));
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 5));
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 6));
|
||||
public static void addItems() {
|
||||
deadlyShards = new ItemDeadlyShard().setUnlocalizedName("NetherShard");
|
||||
GameRegistry.registerItem(deadlyShards, "NetherShard");
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 0));
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 1));
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 3));
|
||||
if (!Config.noLust)
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 4));
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 5));
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(deadlyShards, 1, 6));
|
||||
|
||||
gluttonyShard = new ItemGluttonyShard().setUnlocalizedName("GluttonyShard");
|
||||
GameRegistry.registerItem(gluttonyShard, "GluttonyShard");
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(gluttonyShard, 1, 0));
|
||||
gluttonyShard = new ItemGluttonyShard().setUnlocalizedName("GluttonyShard");
|
||||
GameRegistry.registerItem(gluttonyShard, "GluttonyShard");
|
||||
OreDictionary.registerOre("shardNether", new ItemStack(gluttonyShard, 1, 0));
|
||||
|
||||
taintShovel = new ItemTaintShovel(ThaumcraftApi.toolMatElemental).setUnlocalizedName("TaintShovel");
|
||||
GameRegistry.registerItem(taintShovel, "TaintShovel");
|
||||
taintShovel = new ItemTaintShovel(ThaumcraftApi.toolMatElemental).setUnlocalizedName("TaintShovel");
|
||||
GameRegistry.registerItem(taintShovel, "TaintShovel");
|
||||
|
||||
taintPickaxe = new ItemTaintPickaxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("TaintPickaxe");
|
||||
GameRegistry.registerItem(taintPickaxe, "TaintPickaxe");
|
||||
taintPickaxe = new ItemTaintPickaxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("TaintPickaxe");
|
||||
GameRegistry.registerItem(taintPickaxe, "TaintPickaxe");
|
||||
|
||||
arcaneCakeItem = new ItemArcaneCake().setUnlocalizedName("ArcaneCake");
|
||||
GameRegistry.registerItem(arcaneCakeItem, "ArcaneCakeItem");
|
||||
arcaneCakeItem = new ItemArcaneCake().setUnlocalizedName("ArcaneCake");
|
||||
GameRegistry.registerItem(arcaneCakeItem, "ArcaneCakeItem");
|
||||
|
||||
skullAxe = new ItemSkullAxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("SkullAxe");
|
||||
GameRegistry.registerItem(skullAxe, "SkullAxe");
|
||||
skullAxe = new ItemSkullAxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("SkullAxe");
|
||||
GameRegistry.registerItem(skullAxe, "SkullAxe");
|
||||
|
||||
morphPickaxe = new ItemMorphPickaxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphPickaxe");
|
||||
GameRegistry.registerItem(morphPickaxe, "MorphPickaxe");
|
||||
morphPickaxe = new ItemMorphPickaxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphPickaxe");
|
||||
GameRegistry.registerItem(morphPickaxe, "MorphPickaxe");
|
||||
|
||||
morphSword = new ItemMorphSword(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphSword");
|
||||
GameRegistry.registerItem(morphSword, "MorphSword");
|
||||
morphSword = new ItemMorphSword(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphSword");
|
||||
GameRegistry.registerItem(morphSword, "MorphSword");
|
||||
|
||||
morphShovel = new ItemMorphShovel(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphShovel");
|
||||
GameRegistry.registerItem(morphShovel, "MorphShovel");
|
||||
morphShovel = new ItemMorphShovel(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphShovel");
|
||||
GameRegistry.registerItem(morphShovel, "MorphShovel");
|
||||
|
||||
morphAxe = new ItemMorphAxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphAxe");
|
||||
GameRegistry.registerItem(morphAxe, "MorphAxe");
|
||||
morphAxe = new ItemMorphAxe(ThaumcraftApi.toolMatElemental).setUnlocalizedName("MorphAxe");
|
||||
GameRegistry.registerItem(morphAxe, "MorphAxe");
|
||||
|
||||
if (Config.wrathCage) {
|
||||
mobCrystal = new ItemMobCrystal().setUnlocalizedName("MobCrystal");
|
||||
GameRegistry.registerItem(mobCrystal, "MobCrystal");
|
||||
}
|
||||
if (Config.wrathCage) {
|
||||
mobCrystal = new ItemMobCrystal().setUnlocalizedName("MobCrystal");
|
||||
GameRegistry.registerItem(mobCrystal, "MobCrystal");
|
||||
}
|
||||
|
||||
fork = new ItemDiabolistFork(ThaumcraftApi.toolMatThaumium).setUnlocalizedName("DiabolistFork");
|
||||
if (Config.spork)
|
||||
fork.setUnlocalizedName("DiabolistSpork");
|
||||
GameRegistry.registerItem(fork, "DiabolistFork");
|
||||
fork = new ItemDiabolistFork(ThaumcraftApi.toolMatThaumium).setUnlocalizedName("DiabolistFork");
|
||||
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_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"));
|
||||
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_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"));
|
||||
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_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), 32, 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_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"));
|
||||
|
||||
|
||||
resource = new ItemResource().setUnlocalizedName("FMResource");
|
||||
GameRegistry.registerItem(resource, "FMResource");
|
||||
OreDictionary.registerOre("nuggetEmerald", new ItemStack(resource, 1, 0));
|
||||
OreDictionary.registerOre("dyeBlack", new ItemStack(resource, 1, 1));
|
||||
resource = new ItemResource().setUnlocalizedName("FMResource");
|
||||
GameRegistry.registerItem(resource, "FMResource");
|
||||
OreDictionary.registerOre("nuggetEmerald", new ItemStack(resource, 1, 0));
|
||||
OreDictionary.registerOre("dyeBlack", new ItemStack(resource, 1, 1));
|
||||
|
||||
if (Compat.bm) {
|
||||
try {
|
||||
bloodwell = new ItemBloodwell().setUnlocalizedName("Bloodwell");
|
||||
GameRegistry.registerItem(bloodwell, "Bloodwell");
|
||||
if (Compat.bm) {
|
||||
try {
|
||||
bloodwell = new ItemBloodwell().setUnlocalizedName("Bloodwell");
|
||||
GameRegistry.registerItem(bloodwell, "Bloodwell");
|
||||
|
||||
bloodOrb = new ItemDivineOrb().setUnlocalizedName("EldritchOrb");
|
||||
GameRegistry.registerItem(bloodOrb, "EldritchOrb");
|
||||
bloodOrb = new ItemDivineOrb().setUnlocalizedName("EldritchOrb");
|
||||
GameRegistry.registerItem(bloodOrb, "EldritchOrb");
|
||||
|
||||
boundwell = new ItemBoundwell().setUnlocalizedName("Boundwell");
|
||||
GameRegistry.registerItem(boundwell, "Boundwell");
|
||||
|
||||
bloodRapier = new ItemBloodRapier().setUnlocalizedName("BloodRapier");
|
||||
GameRegistry.registerItem(bloodRapier, "BloodRapier");
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
crystalwell = new ItemCrystalwell().setUnlocalizedName("Crystalwell");
|
||||
GameRegistry.registerItem(crystalwell, "Crystalwell");
|
||||
crystalwell = new ItemCrystalwell().setUnlocalizedName("Crystalwell");
|
||||
GameRegistry.registerItem(crystalwell, "Crystalwell");
|
||||
|
||||
ridingCrop = new ItemRidingCrop(ToolMaterial.WOOD).setUnlocalizedName("RidingCrop");
|
||||
GameRegistry.registerItem(ridingCrop, "RidingCrop");
|
||||
ridingCrop = new ItemRidingCrop(ToolMaterial.WOOD).setUnlocalizedName("RidingCrop");
|
||||
GameRegistry.registerItem(ridingCrop, "RidingCrop");
|
||||
|
||||
if(!Config.noLust) {
|
||||
subCollar = new ItemSubCollar().setUnlocalizedName("SubCollar");
|
||||
GameRegistry.registerItem(subCollar, "SubCollar");
|
||||
}
|
||||
|
||||
// boundShears = new ItemBoundShears(Config.boundShearsID,
|
||||
// ThaumcraftApi.toolMatThaumium).setUnlocalizedName("BoundShears");
|
||||
// GameRegistry.registerItem(boundShears, "BoundSHears");
|
||||
}
|
||||
// boundShears = new ItemBoundShears(Config.boundShearsID,
|
||||
// ThaumcraftApi.toolMatThaumium).setUnlocalizedName("BoundShears");
|
||||
// GameRegistry.registerItem(boundShears, "BoundSHears");
|
||||
}
|
||||
}
|
||||
@@ -16,69 +16,69 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemArcaneCake extends Item {
|
||||
public ItemArcaneCake() {
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
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) {
|
||||
Block block = yWorld.getBlock(z, par5, par6);
|
||||
@Override
|
||||
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) {
|
||||
par7 = 1;
|
||||
} else if (block != Blocks.vine && block != Blocks.tallgrass && block != Blocks.deadbush) {
|
||||
if (par7 == 0) {
|
||||
--par5;
|
||||
}
|
||||
if (block == Blocks.snow_layer && (yWorld.getBlockMetadata(z, par5, par6) & 7) < 1) {
|
||||
par7 = 1;
|
||||
} else if (block != Blocks.vine && block != Blocks.tallgrass && block != Blocks.deadbush) {
|
||||
if (par7 == 0) {
|
||||
--par5;
|
||||
}
|
||||
|
||||
if (par7 == 1) {
|
||||
++par5;
|
||||
}
|
||||
if (par7 == 1) {
|
||||
++par5;
|
||||
}
|
||||
|
||||
if (par7 == 2) {
|
||||
--par6;
|
||||
}
|
||||
if (par7 == 2) {
|
||||
--par6;
|
||||
}
|
||||
|
||||
if (par7 == 3) {
|
||||
++par6;
|
||||
}
|
||||
if (par7 == 3) {
|
||||
++par6;
|
||||
}
|
||||
|
||||
if (par7 == 4) {
|
||||
--z;
|
||||
}
|
||||
if (par7 == 4) {
|
||||
--z;
|
||||
}
|
||||
|
||||
if (par7 == 5) {
|
||||
++z;
|
||||
}
|
||||
}
|
||||
if (par7 == 5) {
|
||||
++z;
|
||||
}
|
||||
}
|
||||
|
||||
if (!player.canPlayerEdit(z, par5, par6, par7, stack)) {
|
||||
return false;
|
||||
} else if (stack.stackSize == 0) {
|
||||
return false;
|
||||
} else {
|
||||
Block cake = ForbiddenBlocks.arcaneCake;
|
||||
if (yWorld.canPlaceEntityOnSide(cake, z, par5, par6, false, par7, (Entity) null, stack)) {
|
||||
int j1 = cake.onBlockPlaced(yWorld, z, par5, par6, par7, par8, par9, par10, 0);
|
||||
if (!player.canPlayerEdit(z, par5, par6, par7, stack)) {
|
||||
return false;
|
||||
} else if (stack.stackSize == 0) {
|
||||
return false;
|
||||
} else {
|
||||
Block cake = ForbiddenBlocks.arcaneCake;
|
||||
if (yWorld.canPlaceEntityOnSide(cake, z, par5, par6, false, par7, (Entity) null, stack)) {
|
||||
int j1 = cake.onBlockPlaced(yWorld, z, par5, par6, par7, par8, par9, par10, 0);
|
||||
|
||||
if (yWorld.setBlock(z, par5, par6, cake, j1, 3)) {
|
||||
if (yWorld.getBlock(z, par5, par6) == cake) {
|
||||
cake.onBlockPlacedBy(yWorld, z, par5, par6, player, stack);
|
||||
cake.onPostBlockPlaced(yWorld, z, par5, par6, j1);
|
||||
}
|
||||
if (yWorld.setBlock(z, par5, par6, cake, j1, 3)) {
|
||||
if (yWorld.getBlock(z, par5, par6) == cake) {
|
||||
cake.onBlockPlacedBy(yWorld, z, par5, par6, player, stack);
|
||||
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);
|
||||
--stack.stackSize;
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.itemIcon = ir.registerIcon("forbidden:cake");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.itemIcon = ir.registerIcon("forbidden:cake");
|
||||
}
|
||||
}
|
||||
@@ -21,37 +21,37 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBloodwell extends Item implements IScribeTools, IBindable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon icon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon icon;
|
||||
|
||||
public ItemBloodwell() {
|
||||
maxStackSize = 1;
|
||||
canRepair = false;
|
||||
setMaxDamage(5);
|
||||
setCreativeTab(Forbidden.tab);
|
||||
setHasSubtypes(false);
|
||||
}
|
||||
public ItemBloodwell() {
|
||||
maxStackSize = 1;
|
||||
canRepair = false;
|
||||
setMaxDamage(5);
|
||||
setCreativeTab(Forbidden.tab);
|
||||
setHasSubtypes(false);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:bloodwell");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:bloodwell");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
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;
|
||||
@Override
|
||||
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 (player.capabilities.isCreativeMode)
|
||||
stack.setItemDamage(0);
|
||||
@@ -61,31 +61,31 @@ public class ItemBloodwell extends Item implements IScribeTools, IBindable {
|
||||
player.setHealth(player.getHealth() - 2);
|
||||
stack.setItemDamage(stack.getItemDamage() - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
return itemstack;
|
||||
}
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
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"));
|
||||
}
|
||||
}
|
||||
@Override
|
||||
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"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDamage(ItemStack stack, int damage) {
|
||||
if (damage > 0) {
|
||||
if (SoulNetworkHandler.syphonFromNetwork(stack, 25 * damage) > 0)
|
||||
@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);
|
||||
}
|
||||
} else
|
||||
super.setDamage(stack, damage);
|
||||
}
|
||||
}
|
||||
@@ -17,47 +17,47 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBoundShears extends ItemSword implements IBindable {
|
||||
|
||||
public IIcon icon;
|
||||
public IIcon icon;
|
||||
|
||||
public ItemBoundShears(ToolMaterial mat) {
|
||||
super(mat);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
public ItemBoundShears(ToolMaterial mat) {
|
||||
super(mat);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:bound_shears");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:bound_shears");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.icon;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
return block != Blocks.web && block != Blocks.leaves && block != Blocks.leaves2 ? (block == Blocks.wool ? 5.0F : super.func_150893_a(stack, block)) : 15.0F;
|
||||
}
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
return block != Blocks.web && block != Blocks.leaves && block != Blocks.leaves2 ? (block == Blocks.wool ? 5.0F : super.func_150893_a(stack, block)) : 15.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
return EnumAction.none;
|
||||
}
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
return EnumAction.none;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
return stack;
|
||||
}
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack stack) {
|
||||
return block == Blocks.web || block == Blocks.redstone_wire || block == Blocks.tripwire;
|
||||
}
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack stack) {
|
||||
return block == Blocks.web || block == Blocks.redstone_wire || block == Blocks.tripwire;
|
||||
}
|
||||
}
|
||||
@@ -23,34 +23,34 @@ import thaumcraft.common.lib.research.ResearchManager;
|
||||
|
||||
public class ItemCrystalwell extends Item implements IScribeTools {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon icon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon icon;
|
||||
|
||||
public ItemCrystalwell() {
|
||||
maxStackSize = 1;
|
||||
canRepair = false;
|
||||
setMaxDamage(100);
|
||||
setCreativeTab(Forbidden.tab);
|
||||
setHasSubtypes(false);
|
||||
public ItemCrystalwell() {
|
||||
maxStackSize = 1;
|
||||
canRepair = false;
|
||||
setMaxDamage(100);
|
||||
setCreativeTab(Forbidden.tab);
|
||||
setHasSubtypes(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:crystalwell");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:crystalwell");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if (stack.getItemDamage() >= 100) {
|
||||
if (!world.isRemote) {
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if (stack.getItemDamage() >= 100) {
|
||||
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))
|
||||
@@ -60,20 +60,20 @@ public class ItemCrystalwell extends Item implements IScribeTools {
|
||||
Thaumcraft.proxy.playerKnowledge.addAspectPool(player.getCommandSenderName(), aspect, amount);
|
||||
ResearchManager.scheduleSave(player);
|
||||
}
|
||||
}
|
||||
player.swingItem();
|
||||
return new ItemStack(ConfigItems.itemInkwell, 1, 100);
|
||||
} else
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
player.swingItem();
|
||||
return new ItemStack(ConfigItems.itemInkwell, 1, 100);
|
||||
} else
|
||||
return stack;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render Pass sensitive version of hasEffect()
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack stack, int pass) {
|
||||
return stack.getItemDamage() >= 100;
|
||||
}
|
||||
/**
|
||||
* Render Pass sensitive version of hasEffect()
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public boolean hasEffect(ItemStack stack, int pass) {
|
||||
return stack.getItemDamage() >= 100;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,45 +16,45 @@ 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;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] icons;
|
||||
|
||||
public ItemDeadlyShard() {
|
||||
this.setMaxStackSize(64);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
if (Config.noLust)
|
||||
vices[4] = "despair";
|
||||
}
|
||||
public ItemDeadlyShard() {
|
||||
this.setMaxStackSize(64);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
if (Config.noLust)
|
||||
vices[4] = "despair";
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons = new IIcon[7];
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons = new IIcon[7];
|
||||
|
||||
for (int x = 0; x < 7; x++) {
|
||||
icons[x] = ir.registerIcon("forbidden:" + vices[x] + "shard");
|
||||
}
|
||||
}
|
||||
for (int x = 0; x < 7; x++) {
|
||||
icons[x] = ir.registerIcon("forbidden:" + vices[x] + "shard");
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int dam) {
|
||||
return this.icons[dam];
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int dam) {
|
||||
return this.icons[dam];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
int i = MathHelper.clamp_int(stack.getItemDamage(), 0, 6);
|
||||
return super.getUnlocalizedName() + "." + vices[i];
|
||||
}
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
int i = MathHelper.clamp_int(stack.getItemDamage(), 0, 6);
|
||||
return super.getUnlocalizedName() + "." + vices[i];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for (int j = 0; j < 7; ++j) {
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for (int j = 0; j < 7; ++j) {
|
||||
list.add(new ItemStack(item, 1, j));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,55 +19,55 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemDiabolistFork extends ItemSword implements IRepairable {
|
||||
|
||||
public IIcon icon;
|
||||
public IIcon icon;
|
||||
|
||||
public ItemDiabolistFork(ToolMaterial mat) {
|
||||
super(mat);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
public ItemDiabolistFork(ToolMaterial mat) {
|
||||
super(mat);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@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");
|
||||
}
|
||||
@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");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.icon;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
return 1.0F;
|
||||
}
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
return EnumAction.none;
|
||||
}
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
return EnumAction.none;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
return stack;
|
||||
}
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.getItem() == Items.quartz ? true : super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.getItem() == Items.quartz ? true : super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack itemStack) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack itemStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -22,65 +22,65 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
public class ItemDivineOrb extends Item implements IBloodOrb, IBindable, IWarpingGear {
|
||||
public ItemDivineOrb() {
|
||||
setMaxStackSize(1);
|
||||
public ItemDivineOrb() {
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(Forbidden.tab);
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(this), 6, 140);
|
||||
}
|
||||
AltarRecipeRegistry.registerAltarOrbRecipe(new ItemStack(this), 6, 140);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("forbidden:divineorb");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
this.itemIcon = iconRegister.registerIcon("forbidden:divineorb");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(StatCollector.translateToLocal("tooltip.divineorb"));
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
|
||||
list.add(StatCollector.translateToLocal("tooltip.divineorb"));
|
||||
|
||||
if (!(stack.stackTagCompound == null)) {
|
||||
list.add(StatCollector.translateToLocal("tooltip.currentowner") + stack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
if (!(stack.stackTagCompound == null)) {
|
||||
list.add(StatCollector.translateToLocal("tooltip.currentowner") + stack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
if (Compat.bm)
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
|
||||
if (Compat.bm)
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
|
||||
if (world != null) {
|
||||
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);
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
return itemstack;
|
||||
}
|
||||
if (world != null) {
|
||||
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);
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = itemstack.stackTagCompound;
|
||||
NBTTagCompound itemTag = itemstack.stackTagCompound;
|
||||
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals("")) {
|
||||
return itemstack;
|
||||
}
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals("")) {
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
if(!player.capabilities.isCreativeMode)
|
||||
if(!player.capabilities.isCreativeMode)
|
||||
player.setHealth(player.getHealth() - 1);
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 200, 700000000);
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 200, 700000000);
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEssence() {
|
||||
return 80000000;
|
||||
}
|
||||
@Override
|
||||
public int getMaxEssence() {
|
||||
return 80000000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrbLevel() {
|
||||
return 6;
|
||||
}
|
||||
@Override
|
||||
public int getOrbLevel() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp(ItemStack itemstack, EntityPlayer player) {
|
||||
|
||||
@@ -9,22 +9,22 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemGluttonyShard extends ItemFood {
|
||||
IIcon icon;
|
||||
IIcon icon;
|
||||
|
||||
public ItemGluttonyShard() {
|
||||
super(2, 0.1F, false);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
public ItemGluttonyShard() {
|
||||
super(2, 0.1F, false);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:gluttonyshard");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:gluttonyshard");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
}
|
||||
@@ -20,21 +20,21 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemMobCrystal extends Item {
|
||||
|
||||
IIcon[] icons;
|
||||
IIcon[] icons;
|
||||
|
||||
public ItemMobCrystal() {
|
||||
this.setMaxStackSize(1);
|
||||
// this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.crysTab);
|
||||
}
|
||||
public ItemMobCrystal() {
|
||||
this.setMaxStackSize(1);
|
||||
// this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.crysTab);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean z) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
if(nbttagcompound.hasKey("mob")) {
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean z) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
if(nbttagcompound.hasKey("mob")) {
|
||||
String string = nbttagcompound.getString("mob");
|
||||
|
||||
if (string != null) {
|
||||
@@ -43,69 +43,69 @@ public class ItemMobCrystal extends Item {
|
||||
list.add(mobAspect.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons = new IIcon[2];
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons = new IIcon[2];
|
||||
|
||||
icons[0] = ir.registerIcon("forbidden:emptycrystal");
|
||||
icons[1] = ir.registerIcon("forbidden:mobcrystal");
|
||||
}
|
||||
icons[0] = ir.registerIcon("forbidden:emptycrystal");
|
||||
icons[1] = ir.registerIcon("forbidden:mobcrystal");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
String string = nbttagcompound.getString("mob");
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
String string = nbttagcompound.getString("mob");
|
||||
|
||||
if (string != null)
|
||||
return icons[1];
|
||||
}
|
||||
if (string != null)
|
||||
return icons[1];
|
||||
}
|
||||
|
||||
return icons[0];
|
||||
}
|
||||
return icons[0];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
if (nbttagcompound.hasKey("mob"))
|
||||
return icons[1];
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
if (nbttagcompound.hasKey("mob"))
|
||||
return icons[1];
|
||||
}
|
||||
|
||||
return icons[0];
|
||||
}
|
||||
return icons[0];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
|
||||
for (String mob : Config.spawnerMobs.keySet()) {
|
||||
ItemStack crystal = new ItemStack(item, 1, 0);
|
||||
crystal.setTagCompound(new NBTTagCompound());
|
||||
crystal.stackTagCompound.setString("mob", mob);
|
||||
list.add(crystal);
|
||||
}
|
||||
}
|
||||
for (String mob : Config.spawnerMobs.keySet()) {
|
||||
ItemStack crystal = new ItemStack(item, 1, 0);
|
||||
crystal.setTagCompound(new NBTTagCompound());
|
||||
crystal.stackTagCompound.setString("mob", mob);
|
||||
list.add(crystal);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
if(nbttagcompound.hasKey("mob")) {
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
if (stack.hasTagCompound()) {
|
||||
NBTTagCompound nbttagcompound = stack.getTagCompound();
|
||||
if(nbttagcompound.hasKey("mob")) {
|
||||
String string = nbttagcompound.getString("mob");
|
||||
|
||||
if (string != null)
|
||||
return ("" + StatCollector.translateToLocal("entity." + string + ".name") + " " + String.format(StatCollector.translateToLocal("item.MobCrystal.name"))).trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ("" + StatCollector.translateToLocal("item.MobCrystalEmpty.name")).trim();
|
||||
}
|
||||
return ("" + StatCollector.translateToLocal("item.MobCrystalEmpty.name")).trim();
|
||||
}
|
||||
}
|
||||
@@ -22,33 +22,33 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
public class ItemMorphAxe extends ItemAxe implements IRepairable, IWarpingGear {
|
||||
public IIcon[] icon;
|
||||
public IIcon[] icon;
|
||||
|
||||
public ItemMorphAxe(ToolMaterial enumtoolmaterial) {
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
this.setHarvestLevel("axe", 4);
|
||||
}
|
||||
public ItemMorphAxe(ToolMaterial enumtoolmaterial) {
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
this.setHarvestLevel("axe", 4);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icon = new IIcon[2];
|
||||
this.icon[0] = ir.registerIcon("forbidden:chameleonaxe");
|
||||
this.icon[1] = ir.registerIcon("forbidden:eyeaxe");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icon = new IIcon[2];
|
||||
this.icon[0] = ir.registerIcon("forbidden:chameleonaxe");
|
||||
this.icon[1] = ir.registerIcon("forbidden:eyeaxe");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass(int par1, int renderPass) {
|
||||
return renderPass != 1 ? icon[0] : icon[1];
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass(int par1, int renderPass) {
|
||||
return renderPass != 1 ? icon[0] : icon[1];
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack itemstack) {
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
public EnumRarity getRarity(ItemStack itemstack) {
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack 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) {
|
||||
@@ -95,28 +95,28 @@ public class ItemMorphAxe extends ItemAxe implements IRepairable, IWarpingGear {
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
if (renderpass != 1)
|
||||
return 16777215;
|
||||
else {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
if (renderpass != 1)
|
||||
return 16777215;
|
||||
else {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int fuckObfuscation, boolean fuckObfuscation2) {
|
||||
super.onUpdate(stack, world, entity, fuckObfuscation, fuckObfuscation2);
|
||||
|
||||
@@ -22,34 +22,34 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
|
||||
public class ItemMorphSword extends ItemSword implements IRepairable, IWarpingGear {
|
||||
public IIcon[] icon;
|
||||
public IIcon[] icon;
|
||||
|
||||
public ItemMorphSword(ToolMaterial enumtoolmaterial) {
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
public ItemMorphSword(ToolMaterial enumtoolmaterial) {
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icon = new IIcon[2];
|
||||
this.icon[0] = ir.registerIcon("forbidden:chameleonsword");
|
||||
this.icon[1] = ir.registerIcon("forbidden:eyesword");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icon = new IIcon[2];
|
||||
this.icon[0] = ir.registerIcon("forbidden:chameleonsword");
|
||||
this.icon[1] = ir.registerIcon("forbidden:eyesword");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass(int par1, int renderPass) {
|
||||
return renderPass != 1 ? icon[0] : icon[1];
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamageForRenderPass(int par1, int renderPass) {
|
||||
return renderPass != 1 ? icon[0] : icon[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack itemstack) {
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack itemstack) {
|
||||
return EnumRarity.epic;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(ForbiddenItems.deadlyShards, 1, 1)) ? true : super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack 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) {
|
||||
@@ -96,28 +96,28 @@ public class ItemMorphSword extends ItemSword implements IRepairable, IWarpingGe
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
if (renderpass != 1)
|
||||
return 16777215;
|
||||
else {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack itemstack, int renderpass) {
|
||||
if (renderpass != 1)
|
||||
return 16777215;
|
||||
else {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int fuckObfuscation, boolean fuckObfuscation2) {
|
||||
super.onUpdate(stack, world, entity, fuckObfuscation, fuckObfuscation2);
|
||||
|
||||
@@ -17,62 +17,62 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemResource extends Item {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] icons;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon[] icons;
|
||||
|
||||
public ItemResource() {
|
||||
this.setMaxStackSize(64);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
public ItemResource() {
|
||||
this.setMaxStackSize(64);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons = new IIcon[5];
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
icons = new IIcon[5];
|
||||
|
||||
icons[0] = ir.registerIcon("forbidden:emerald_nugget");
|
||||
icons[1] = ir.registerIcon("forbidden:dye_powder_black");
|
||||
icons[2] = ir.registerIcon("forbidden:nuggetmanasteel");
|
||||
icons[0] = ir.registerIcon("forbidden:emerald_nugget");
|
||||
icons[1] = ir.registerIcon("forbidden:dye_powder_black");
|
||||
icons[2] = ir.registerIcon("forbidden:nuggetmanasteel");
|
||||
icons[3] = ir.registerIcon("forbidden:tainted_blood_shard");
|
||||
icons[4] = ir.registerIcon("forbidden:nuggetelementium");
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int dam) {
|
||||
return this.icons[dam % icons.length];
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int dam) {
|
||||
return this.icons[dam % icons.length];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
//int i = MathHelper.clamp_int(stack.getItemDamage(), 0, 3);
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
//int i = MathHelper.clamp_int(stack.getItemDamage(), 0, 3);
|
||||
int i = stack.getItemDamage();
|
||||
return super.getUnlocalizedName() + "." + i;
|
||||
}
|
||||
return super.getUnlocalizedName() + "." + i;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item par1, CreativeTabs xCreativeTabs, List list) {
|
||||
for (int j = 0; j < 5; ++j) {
|
||||
list.add(new ItemStack(par1, 1, j));
|
||||
}
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item par1, CreativeTabs xCreativeTabs, List list) {
|
||||
for (int j = 0; j < 5; ++j) {
|
||||
list.add(new ItemStack(par1, 1, j));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase yEntityLivingBase) {
|
||||
if (yEntityLivingBase instanceof EntitySheep && stack.getItemDamage() == 1) {
|
||||
EntitySheep entitysheep = (EntitySheep) yEntityLivingBase;
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase yEntityLivingBase) {
|
||||
if (yEntityLivingBase instanceof EntitySheep && stack.getItemDamage() == 1) {
|
||||
EntitySheep entitysheep = (EntitySheep) yEntityLivingBase;
|
||||
|
||||
if (!entitysheep.getSheared() && entitysheep.getFleeceColor() != 15) {
|
||||
entitysheep.setFleeceColor(15);
|
||||
--stack.stackSize;
|
||||
}
|
||||
if (!entitysheep.getSheared() && entitysheep.getFleeceColor() != 15) {
|
||||
entitysheep.setFleeceColor(15);
|
||||
--stack.stackSize;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,80 +26,80 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemRidingCrop extends ItemSword {
|
||||
|
||||
public IIcon icon;
|
||||
public IIcon icon;
|
||||
|
||||
public ItemRidingCrop(ToolMaterial mat) {
|
||||
super(mat);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
public ItemRidingCrop(ToolMaterial mat) {
|
||||
super(mat);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:crop");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:crop");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack stack, EntityLivingBase victim, EntityLivingBase player) {
|
||||
stack.damageItem(1, player);
|
||||
if (victim instanceof EntityHorse || victim instanceof EntityPig)
|
||||
victim.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 175, 5));
|
||||
else if (victim instanceof EntityPlayer || victim instanceof EntityGolem) {
|
||||
victim.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 75, 1));
|
||||
victim.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 75, 1));
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack stack, EntityLivingBase victim, EntityLivingBase player) {
|
||||
stack.damageItem(1, player);
|
||||
if (victim instanceof EntityHorse || victim instanceof EntityPig)
|
||||
victim.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 175, 5));
|
||||
else if (victim instanceof EntityPlayer || victim instanceof EntityGolem) {
|
||||
victim.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 75, 1));
|
||||
victim.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 75, 1));
|
||||
victim.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 75, 1));
|
||||
}
|
||||
if (!player.worldObj.isRemote && !Config.noLust && player.worldObj.provider.dimensionId == -1 && player.worldObj.rand.nextInt(30) == 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;
|
||||
ent.motionZ += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!player.worldObj.isRemote && !Config.noLust && player.worldObj.provider.dimensionId == -1 && player.worldObj.rand.nextInt(30) == 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;
|
||||
ent.motionZ += (player.worldObj.rand.nextFloat() - player.worldObj.rand.nextFloat()) * 0.1F;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
return 1.0F;
|
||||
}
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
return EnumAction.none;
|
||||
}
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack) {
|
||||
return EnumAction.none;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if (player.ridingEntity != null && player.ridingEntity instanceof EntityLivingBase) {
|
||||
EntityLivingBase mount = (EntityLivingBase) player.ridingEntity;
|
||||
stack.damageItem(1, player);
|
||||
player.swingItem();
|
||||
// mount.attackEntityFrom(DamageSource.causePlayerDamage(player),
|
||||
// 4.0F);
|
||||
mount.attackEntityFrom(DamageSource.generic, 1.0F);
|
||||
mount.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 175, 5));
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if (player.ridingEntity != null && player.ridingEntity instanceof EntityLivingBase) {
|
||||
EntityLivingBase mount = (EntityLivingBase) player.ridingEntity;
|
||||
stack.damageItem(1, player);
|
||||
player.swingItem();
|
||||
// mount.attackEntityFrom(DamageSource.causePlayerDamage(player),
|
||||
// 4.0F);
|
||||
mount.attackEntityFrom(DamageSource.generic, 1.0F);
|
||||
mount.addPotionEffect(new PotionEffect(Potion.moveSpeed.id, 175, 5));
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.getItem() == Items.leather ? true : super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.getItem() == Items.leather ? true : super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack itemStack) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block block, ItemStack itemStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -15,37 +15,37 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemSkullAxe extends ItemSword implements IRepairable {
|
||||
public IIcon icon;
|
||||
public IIcon icon;
|
||||
|
||||
public ItemSkullAxe(ToolMaterial enumtoolmaterial) {
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
public ItemSkullAxe(ToolMaterial enumtoolmaterial) {
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:skullaxe");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:skullaxe");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack itemstack) {
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack itemstack) {
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2)) ? true : super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
@Override
|
||||
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) {
|
||||
return 1.0F;
|
||||
}
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta) {
|
||||
return 1.0F;
|
||||
}
|
||||
}
|
||||
@@ -14,31 +14,31 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemTaintPickaxe extends ItemPickaxe implements IRepairable {
|
||||
public IIcon icon;
|
||||
public IIcon icon;
|
||||
|
||||
public ItemTaintPickaxe(ToolMaterial enumtoolmaterial) {
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
this.setHarvestLevel("pickaxe", 5);
|
||||
}
|
||||
public ItemTaintPickaxe(ToolMaterial enumtoolmaterial) {
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
this.setHarvestLevel("pickaxe", 5);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:taintpickaxe");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir) {
|
||||
this.icon = ir.registerIcon("forbidden:taintpickaxe");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack itemstack) {
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack itemstack) {
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2)) ? true : super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack stack, ItemStack stack2) {
|
||||
return stack2.isItemEqual(new ItemStack(Config.thaumcraftResource.getItem(), 1, 2)) ? true : super.getIsRepairable(stack, stack2);
|
||||
}
|
||||
}
|
||||
@@ -21,50 +21,50 @@ import thaumcraft.common.config.ConfigBlocks;
|
||||
|
||||
public class ItemTaintShovel extends ItemSpade implements IRepairable
|
||||
{
|
||||
public IIcon icon;
|
||||
public IIcon icon;
|
||||
|
||||
public ItemTaintShovel(ToolMaterial enumtoolmaterial)
|
||||
{
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
this.setHarvestLevel("shovel", 3);
|
||||
}
|
||||
public ItemTaintShovel(ToolMaterial enumtoolmaterial)
|
||||
{
|
||||
super(enumtoolmaterial);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
this.setHarvestLevel("shovel", 3);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("forbidden:taintshovel");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("forbidden:taintshovel");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1)
|
||||
{
|
||||
return this.icon;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1)
|
||||
{
|
||||
return this.icon;
|
||||
}
|
||||
|
||||
public EnumRarity getRarity(ItemStack itemstack)
|
||||
{
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
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)
|
||||
{
|
||||
return efficiencyOnProperMaterial;
|
||||
}
|
||||
@Override
|
||||
public float getDigSpeed(ItemStack stack, Block block, int meta)
|
||||
{
|
||||
if (ForgeHooks.isToolEffective(stack, block, meta) || block.getMaterial() == Config.taintMaterial)
|
||||
{
|
||||
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) {
|
||||
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) {
|
||||
int purified = 0;
|
||||
for(int ex = x - 5;ex < x + 6;ex++){
|
||||
for(int wy = y - 4;wy < y + 5;wy++){
|
||||
@@ -88,6 +88,6 @@ public class ItemTaintShovel extends ItemSpade implements IRepairable
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return super.onItemUse(itemstack, player, world, x, y, z, side, par8, par9, par10);
|
||||
}
|
||||
return super.onItemUse(itemstack, player, world, x, y, z, side, par8, par9, par10);
|
||||
}
|
||||
}
|
||||
@@ -12,71 +12,71 @@ import fox.spiteful.forbidden.compat.Compat;
|
||||
|
||||
public class BloodStaffUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
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;
|
||||
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
|
||||
int cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("alchemical"))
|
||||
cost = 900;
|
||||
else
|
||||
cost = 1000;
|
||||
|
||||
for(int x = 0;x < primals.length;x++)
|
||||
{
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack))
|
||||
{
|
||||
if(player.capabilities.isCreativeMode)
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if(SoulNetworkHandler.syphonFromNetwork(itemstack, cost) > 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)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player)
|
||||
{
|
||||
if(player.getHealth() > 0)
|
||||
{
|
||||
player.setHealth(player.getHealth() - 3);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
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 = 900;
|
||||
else
|
||||
cost = 1000;
|
||||
|
||||
for(int x = 0;x < primals.length;x++)
|
||||
{
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack))
|
||||
{
|
||||
if(player.capabilities.isCreativeMode)
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if(SoulNetworkHandler.syphonFromNetwork(itemstack, cost) > 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)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player)
|
||||
{
|
||||
if(player.getHealth() > 0)
|
||||
{
|
||||
player.setHealth(player.getHealth() - 3);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -11,57 +11,57 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
|
||||
public class BloodWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
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
|
||||
{
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
|
||||
int cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("alchemical"))
|
||||
cost = 900;
|
||||
else
|
||||
cost = 1000;
|
||||
|
||||
for(int x = 0;x < primals.length;x++)
|
||||
{
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack))
|
||||
{
|
||||
if(player.capabilities.isCreativeMode)
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if(SoulNetworkHandler.syphonFromNetwork(itemstack, cost) > 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)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player)
|
||||
{
|
||||
if(player.getHealth() > 6)
|
||||
{
|
||||
player.setHealth(player.getHealth() - 3);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
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 = 900;
|
||||
else
|
||||
cost = 1000;
|
||||
|
||||
for(int x = 0;x < primals.length;x++)
|
||||
{
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack))
|
||||
{
|
||||
if(player.capabilities.isCreativeMode)
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
else if(SoulNetworkHandler.syphonFromNetwork(itemstack, cost) > 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)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player)
|
||||
{
|
||||
if(player.getHealth() > 6)
|
||||
{
|
||||
player.setHealth(player.getHealth() - 3);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -8,13 +8,13 @@ import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class CreativeWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,13 +15,13 @@ import thaumcraft.api.wands.WandCap;
|
||||
*
|
||||
*/
|
||||
public class DarkWandCap extends WandCap {
|
||||
public DarkWandCap(String tag, float discount, ItemStack item, int craftCost, ResourceLocation skin) {
|
||||
super(tag, discount, item, craftCost);
|
||||
setTexture(skin);
|
||||
}
|
||||
public DarkWandCap(String tag, float discount, ItemStack item, int craftCost, ResourceLocation skin) {
|
||||
super(tag, discount, item, craftCost);
|
||||
setTexture(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);
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -9,31 +9,31 @@ import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class InfernalWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = {Aspect.ORDER, Aspect.ENTROPY, Aspect.AIR, Aspect.EARTH, Aspect.WATER};
|
||||
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(((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);
|
||||
}
|
||||
}
|
||||
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(((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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemWandCaps extends Item {
|
||||
|
||||
public final String[] types = {
|
||||
public final String[] types = {
|
||||
"alchemical",
|
||||
"vinteum",
|
||||
"soul",
|
||||
@@ -23,39 +23,39 @@ public class ItemWandCaps extends Item {
|
||||
"elementium",
|
||||
"elementium_inert"
|
||||
};
|
||||
public IIcon[] icon;
|
||||
public IIcon[] icon;
|
||||
|
||||
public ItemWandCaps() {
|
||||
this.setMaxStackSize(64);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
public ItemWandCaps() {
|
||||
this.setMaxStackSize(64);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@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]);
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@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]);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.icon[meta];
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.icon[meta];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs xCreativeTabs, List list) {
|
||||
for(int x = 0; x < types.length; x++){
|
||||
list.add(new ItemStack(this, 1, x));
|
||||
}
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs xCreativeTabs, List list) {
|
||||
for(int x = 0; x < types.length; x++){
|
||||
list.add(new ItemStack(this, 1, x));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName() + "." + types[stack.getItemDamage()];
|
||||
}
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName() + "." + types[stack.getItemDamage()];
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemWandCores extends Item {
|
||||
|
||||
public final String[] types = {
|
||||
public final String[] types = {
|
||||
"tainted",
|
||||
"infernal",
|
||||
"soul",
|
||||
@@ -36,77 +36,77 @@ public class ItemWandCores extends Item {
|
||||
"dreamwood",
|
||||
"dreamwood_inert",
|
||||
"dreamwood_staff" };
|
||||
public IIcon[] icon;
|
||||
public IIcon[] icon;
|
||||
|
||||
public ItemWandCores() {
|
||||
this.setMaxStackSize(64);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
public ItemWandCores() {
|
||||
this.setMaxStackSize(64);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(Forbidden.tab);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@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]);
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@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]);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.icon[meta];
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return this.icon[meta];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs xCreativeTabs, List list) {
|
||||
for (int x = 0; x < types.length; x++) {
|
||||
list.add(new ItemStack(this, 1, x));
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs xCreativeTabs, List list) {
|
||||
for (int x = 0; x < types.length; x++) {
|
||||
list.add(new ItemStack(this, 1, x));
|
||||
}
|
||||
|
||||
ItemStack wand = ItemApi.getItem("itemWandCasting", 72);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("thaumium"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("tainted"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 72);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("thaumium"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("infernal"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 2000);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("orichalcum"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("neutronium"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 2000);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("orichalcum"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("neutronium_staff"));
|
||||
list.add(wand);
|
||||
if (Compat.bm && Config.crossWand) {
|
||||
wand = ItemApi.getItem("itemWandCasting", 84);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("alchemical"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("blood"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 168);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("alchemical"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("blood_staff"));
|
||||
list.add(wand);
|
||||
}
|
||||
if (Compat.am2 && Config.crossWand) {
|
||||
wand = ItemApi.getItem("itemWandCasting", 72);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("vinteum"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("witchwood"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 144);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("vinteum"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("witchwood_staff"));
|
||||
list.add(wand);
|
||||
}
|
||||
if (Compat.botan && Config.crossWand) {
|
||||
wand = ItemApi.getItem("itemWandCasting", 84);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("manasteel"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("livingwood"));
|
||||
list.add(wand);
|
||||
ItemStack wand = ItemApi.getItem("itemWandCasting", 72);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("thaumium"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("tainted"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 72);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("thaumium"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("infernal"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 2000);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("orichalcum"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("neutronium"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 2000);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("orichalcum"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("neutronium_staff"));
|
||||
list.add(wand);
|
||||
if (Compat.bm && Config.crossWand) {
|
||||
wand = ItemApi.getItem("itemWandCasting", 84);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("alchemical"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("blood"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 168);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("alchemical"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("blood_staff"));
|
||||
list.add(wand);
|
||||
}
|
||||
if (Compat.am2 && Config.crossWand) {
|
||||
wand = ItemApi.getItem("itemWandCasting", 72);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("vinteum"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("witchwood"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 144);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("vinteum"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("witchwood_staff"));
|
||||
list.add(wand);
|
||||
}
|
||||
if (Compat.botan && Config.crossWand) {
|
||||
wand = ItemApi.getItem("itemWandCasting", 84);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("manasteel"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("livingwood"));
|
||||
list.add(wand);
|
||||
wand = ItemApi.getItem("itemWandCasting", 84);
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("elementium"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("dreamwood"));
|
||||
@@ -115,11 +115,11 @@ public class ItemWandCores extends Item {
|
||||
((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("elementium"));
|
||||
((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("dreamwood_staff"));
|
||||
list.add(wand);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName() + "." + types[stack.getItemDamage()];
|
||||
}
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
return super.getUnlocalizedName() + "." + types[stack.getItemDamage()];
|
||||
}
|
||||
}
|
||||
@@ -9,42 +9,42 @@ import thaumcraft.api.wands.IWandRodOnUpdate;
|
||||
|
||||
public class ManaStaffUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
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){
|
||||
|
||||
//TODO: Readd ArsMagica Support
|
||||
try
|
||||
{
|
||||
/* IExtendedProperties prop = ArsMagicaApi.instance.getExtendedProperties(player);
|
||||
|
||||
float cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("vinteum"))
|
||||
cost = 50.0F;
|
||||
else
|
||||
cost = 100.0F;
|
||||
|
||||
if(prop == null || prop.getCurrentMana() <= 0)
|
||||
return;
|
||||
|
||||
|
||||
for(int x = 0;x < primals.length;x++){
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack)) {
|
||||
if(prop.getCurrentMana() > cost)
|
||||
{
|
||||
prop.setCurrentMana(prop.getCurrentMana() - cost);
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
catch(Throwable e){}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
if(Compat.am2 && Config.crossWand)
|
||||
{
|
||||
if(player.ticksExisted % 40 == 0){
|
||||
|
||||
//TODO: Readd ArsMagica Support
|
||||
try
|
||||
{
|
||||
/* IExtendedProperties prop = ArsMagicaApi.instance.getExtendedProperties(player);
|
||||
|
||||
float cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("vinteum"))
|
||||
cost = 50.0F;
|
||||
else
|
||||
cost = 100.0F;
|
||||
|
||||
if(prop == null || prop.getCurrentMana() <= 0)
|
||||
return;
|
||||
|
||||
|
||||
for(int x = 0;x < primals.length;x++){
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack)) {
|
||||
if(prop.getCurrentMana() > cost)
|
||||
{
|
||||
prop.setCurrentMana(prop.getCurrentMana() - cost);
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
catch(Throwable e){}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,41 +13,41 @@ import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class ManaWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
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
|
||||
{
|
||||
IExtendedProperties prop = ArsMagicaApi.instance.getExtendedProperties(player);
|
||||
|
||||
float cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("vinteum"))
|
||||
cost = 80.0F;
|
||||
else
|
||||
cost = 140.0F;
|
||||
|
||||
if(prop == null || prop.getCurrentMana() <= 0)
|
||||
return;
|
||||
|
||||
|
||||
for(int x = 0;x < primals.length;x++){
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack)) {
|
||||
if(prop.getCurrentMana() > cost)
|
||||
{
|
||||
prop.setCurrentMana(prop.getCurrentMana() - cost);
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Throwable e){}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player) {
|
||||
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 = 80.0F;
|
||||
else
|
||||
cost = 140.0F;
|
||||
|
||||
if(prop == null || prop.getCurrentMana() <= 0)
|
||||
return;
|
||||
|
||||
|
||||
for(int x = 0;x < primals.length;x++){
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack)) {
|
||||
if(prop.getCurrentMana() > cost)
|
||||
{
|
||||
prop.setCurrentMana(prop.getCurrentMana() - cost);
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Throwable e){}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -10,16 +10,16 @@ import fox.spiteful.forbidden.Config;
|
||||
|
||||
public class TaintedWandUpdate implements IWandRodOnUpdate {
|
||||
|
||||
Aspect primals[] = Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -12,38 +12,38 @@ 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
|
||||
{
|
||||
int cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("manasteel")
|
||||
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
|
||||
{
|
||||
int cost;
|
||||
if(((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("manasteel")
|
||||
||((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("elementium"))
|
||||
cost = 900;
|
||||
else
|
||||
cost = 1100;
|
||||
|
||||
for(int x = 0;x < primals.length;x++)
|
||||
{
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack))
|
||||
{
|
||||
if(ManaItemHandler.requestManaExact(itemstack, player, cost, true))
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch(Throwable e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
cost = 900;
|
||||
else
|
||||
cost = 1100;
|
||||
|
||||
for(int x = 0;x < primals.length;x++)
|
||||
{
|
||||
if(((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]) < ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack))
|
||||
{
|
||||
if(ManaItemHandler.requestManaExact(itemstack, player, cost, true))
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch(Throwable e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean checkHotbar(ItemStack stack, EntityPlayer player)
|
||||
{
|
||||
@@ -55,5 +55,5 @@ public class YandereWandUpdate implements IWandRodOnUpdate {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -18,426 +18,426 @@ import fox.spiteful.forbidden.DarkAspects;
|
||||
|
||||
public class TileEntityWrathCage extends TileEntity implements IAspectContainer, IEssentiaTransport
|
||||
{
|
||||
private final WrathSpawnerLogic spawnLogic = new WrathSpawnerLogic(this);
|
||||
public int wrath = 0;
|
||||
public int sloth = 0;
|
||||
public int special = 0;
|
||||
public byte mode = 0;
|
||||
Aspect aspect = Aspect.GREED;
|
||||
private final WrathSpawnerLogic spawnLogic = new WrathSpawnerLogic(this);
|
||||
public int wrath = 0;
|
||||
public int sloth = 0;
|
||||
public int special = 0;
|
||||
public byte mode = 0;
|
||||
Aspect aspect = Aspect.GREED;
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
super.readFromNBT(par1NBTTagCompound);
|
||||
this.spawnLogic.readFromNBT(par1NBTTagCompound);
|
||||
this.wrath = par1NBTTagCompound.getShort("Wrath");
|
||||
this.sloth = par1NBTTagCompound.getShort("Sloth");
|
||||
this.special = par1NBTTagCompound.getShort("Special");
|
||||
this.mode = par1NBTTagCompound.getByte("Mode");
|
||||
aspect = spawnLogic.getAspect();
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
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.setByte("Mode", this.mode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) {
|
||||
readFromNBT(pkt.func_148857_g());
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
@Override
|
||||
/**
|
||||
* Reads a tile entity from NBT.
|
||||
*/
|
||||
public void readFromNBT(NBTTagCompound par1NBTTagCompound)
|
||||
{
|
||||
super.readFromNBT(par1NBTTagCompound);
|
||||
this.spawnLogic.readFromNBT(par1NBTTagCompound);
|
||||
this.wrath = par1NBTTagCompound.getShort("Wrath");
|
||||
this.sloth = par1NBTTagCompound.getShort("Sloth");
|
||||
this.special = par1NBTTagCompound.getShort("Special");
|
||||
this.mode = par1NBTTagCompound.getByte("Mode");
|
||||
aspect = spawnLogic.getAspect();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
|
||||
@Override
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
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.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() {
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
this.writeToNBT(nbttagcompound);
|
||||
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 0, nbttagcompound);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
|
||||
* ticks and creates a new spawn inside its implementation.
|
||||
*/
|
||||
@Override
|
||||
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();
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
sloth++;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void checkAspect() {
|
||||
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)
|
||||
{
|
||||
return this.spawnLogic.setDelayToMin(par1) ? true : super.receiveClientEvent(par1, x);
|
||||
}
|
||||
/**
|
||||
* Allows the entity to update its state. Overridden in most subclasses, e.g. the mob spawner uses this to count
|
||||
* ticks and creates a new spawn inside its implementation.
|
||||
*/
|
||||
@Override
|
||||
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();
|
||||
|
||||
super.updateEntity();
|
||||
}
|
||||
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
sloth++;
|
||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void checkAspect() {
|
||||
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)
|
||||
{
|
||||
return this.spawnLogic.setDelayToMin(par1) ? true : super.receiveClientEvent(par1, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the spawner logic associated with this spawner
|
||||
*/
|
||||
public WrathSpawnerLogic getSpawnerLogic()
|
||||
{
|
||||
return this.spawnLogic;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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){
|
||||
wrath += amount;
|
||||
return 0;
|
||||
}
|
||||
else if(tag == DarkAspects.SLOTH){
|
||||
sloth += amount;
|
||||
return 0;
|
||||
}
|
||||
else if(tag == aspect){
|
||||
special += amount;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return amount;
|
||||
}
|
||||
/**
|
||||
* Returns the spawner logic associated with this spawner
|
||||
*/
|
||||
public WrathSpawnerLogic getSpawnerLogic()
|
||||
{
|
||||
return this.spawnLogic;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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){
|
||||
wrath += amount;
|
||||
return 0;
|
||||
}
|
||||
else if(tag == DarkAspects.SLOTH){
|
||||
sloth += amount;
|
||||
return 0;
|
||||
}
|
||||
else if(tag == aspect){
|
||||
special += amount;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
return amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a certain amount of a specific aspect from the tile entity
|
||||
* @param tag
|
||||
* @param amount
|
||||
* @return true if that amount of aspect was available and was removed
|
||||
*/
|
||||
public boolean takeFromContainer(Aspect tag, int amount)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Removes a certain amount of a specific aspect from the tile entity
|
||||
* @param tag
|
||||
* @param amount
|
||||
* @return true if that amount of aspect was available and was removed
|
||||
*/
|
||||
public boolean takeFromContainer(Aspect tag, int amount)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the tile entity contains the listed amount (or more) of the aspect
|
||||
* @param tag
|
||||
* @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;
|
||||
}
|
||||
/**
|
||||
* Checks if the tile entity contains the listed amount (or more) of the aspect
|
||||
* @param tag
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns how much of the aspect this tile entity contains
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* Returns how much of the aspect this tile entity contains
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this side used to input essentia?
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public boolean canInputFrom(ForgeDirection face)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Is this side used to input essentia?
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public boolean canInputFrom(ForgeDirection face)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this side used to output essentia?
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public boolean canOutputTo(ForgeDirection face)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Is this side used to output essentia?
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
public boolean canOutputTo(ForgeDirection face)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the amount of suction this block will apply
|
||||
* @param suction
|
||||
*/
|
||||
public void setSuction(Aspect aspect, int amount)
|
||||
{
|
||||
|
||||
}
|
||||
/**
|
||||
* Sets the amount of suction this block will apply
|
||||
* @param suction
|
||||
*/
|
||||
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.
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
special += Math.min(amount, 64);
|
||||
return Math.min(amount, 64);
|
||||
}
|
||||
else if(inp == DarkAspects.WRATH)
|
||||
{
|
||||
wrath += Math.min(amount, 64);
|
||||
return Math.min(amount, 64);
|
||||
}
|
||||
else if(inp == DarkAspects.SLOTH)
|
||||
{
|
||||
sloth += Math.min(amount, 64);
|
||||
return Math.min(amount, 64);
|
||||
}
|
||||
else
|
||||
return amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* What type of essentia this contains
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
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;
|
||||
}
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
special += Math.min(amount, 64);
|
||||
return Math.min(amount, 64);
|
||||
}
|
||||
else if(inp == DarkAspects.WRATH)
|
||||
{
|
||||
wrath += Math.min(amount, 64);
|
||||
return Math.min(amount, 64);
|
||||
}
|
||||
else if(inp == DarkAspects.SLOTH)
|
||||
{
|
||||
sloth += Math.min(amount, 64);
|
||||
return Math.min(amount, 64);
|
||||
}
|
||||
else
|
||||
return amount;
|
||||
}
|
||||
|
||||
/**
|
||||
* What type of essentia this contains
|
||||
* @param face
|
||||
* @return
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Essentia will not be drawn from this container unless the suction exceeds this amount.
|
||||
* @return the amount
|
||||
*/
|
||||
public int getMinimumSuction()
|
||||
{
|
||||
return 9000;
|
||||
}
|
||||
/**
|
||||
* Essentia will not be drawn from this container unless the suction exceeds this amount.
|
||||
* @return the amount
|
||||
*/
|
||||
public int getMinimumSuction()
|
||||
{
|
||||
return 9000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if you want the conduit to extend a little further into the block.
|
||||
* Used by jars and alembics that have smaller than normal hitboxes
|
||||
* @return
|
||||
*/
|
||||
public boolean renderExtendedTube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Return true if you want the conduit to extend a little further into the block.
|
||||
* Used by jars and alembics that have smaller than normal hitboxes
|
||||
* @return
|
||||
*/
|
||||
public boolean renderExtendedTube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -18,280 +18,280 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class WrathSpawnerLogic {
|
||||
/** The mob spawner we deal with */
|
||||
final TileEntityWrathCage mobSpawnerEntity;
|
||||
/** The mob spawner we deal with */
|
||||
final TileEntityWrathCage mobSpawnerEntity;
|
||||
|
||||
public boolean mobSet = false;
|
||||
public boolean mobSet = false;
|
||||
|
||||
/** The delay to spawn. */
|
||||
public int spawnDelay = 20;
|
||||
private String mobID = "Pig";
|
||||
Aspect aspect = Aspect.GREED;
|
||||
private boolean slothful = false;
|
||||
private int fuel = 0;
|
||||
/** The delay to spawn. */
|
||||
public int spawnDelay = 20;
|
||||
private String mobID = "Pig";
|
||||
Aspect aspect = Aspect.GREED;
|
||||
private boolean slothful = false;
|
||||
private int fuel = 0;
|
||||
|
||||
public double field_98287_c;
|
||||
public double field_98284_d;
|
||||
private int minSpawnDelay = 200;
|
||||
private int maxSpawnDelay = 300;
|
||||
public double field_98287_c;
|
||||
public double field_98284_d;
|
||||
private int minSpawnDelay = 200;
|
||||
private int maxSpawnDelay = 300;
|
||||
|
||||
/** A counter for spawn tries. */
|
||||
private int spawnCount = 3;
|
||||
private Entity renderEntity;
|
||||
private int maxNearbyEntities = 6;
|
||||
/** A counter for spawn tries. */
|
||||
private int spawnCount = 3;
|
||||
private Entity renderEntity;
|
||||
private int maxNearbyEntities = 6;
|
||||
|
||||
/** The distance from which a player activates the spawner. */
|
||||
private int activatingRangeFromPlayer = 16;
|
||||
/** The distance from which a player activates the spawner. */
|
||||
private int activatingRangeFromPlayer = 16;
|
||||
|
||||
/** The range coefficient for spawning entities around. */
|
||||
private int spawnRange = 4;
|
||||
/** The range coefficient for spawning entities around. */
|
||||
private int spawnRange = 4;
|
||||
|
||||
WrathSpawnerLogic(TileEntityWrathCage par1TileEntityMobSpawner) {
|
||||
this.mobSpawnerEntity = par1TileEntityMobSpawner;
|
||||
}
|
||||
WrathSpawnerLogic(TileEntityWrathCage par1TileEntityMobSpawner) {
|
||||
this.mobSpawnerEntity = par1TileEntityMobSpawner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the entity name that should be spawned.
|
||||
*/
|
||||
public String getEntityNameToSpawn() {
|
||||
return this.mobID;
|
||||
}
|
||||
/**
|
||||
* Gets the entity name that should be spawned.
|
||||
*/
|
||||
public String getEntityNameToSpawn() {
|
||||
return this.mobID;
|
||||
}
|
||||
|
||||
public Aspect getAspect() {
|
||||
return aspect;
|
||||
}
|
||||
public Aspect getAspect() {
|
||||
return aspect;
|
||||
}
|
||||
|
||||
public void setMobID(String par1Str) {
|
||||
this.mobID = par1Str;
|
||||
if (Config.spawnerMobs.containsKey(mobID))
|
||||
aspect = Config.spawnerMobs.get(mobID);
|
||||
else
|
||||
aspect = Aspect.GREED;
|
||||
}
|
||||
public void setMobID(String par1Str) {
|
||||
this.mobID = par1Str;
|
||||
if (Config.spawnerMobs.containsKey(mobID))
|
||||
aspect = Config.spawnerMobs.get(mobID);
|
||||
else
|
||||
aspect = Aspect.GREED;
|
||||
}
|
||||
|
||||
public void mobIsSet(boolean inp) {
|
||||
mobSet = inp;
|
||||
}
|
||||
public void mobIsSet(boolean inp) {
|
||||
mobSet = inp;
|
||||
}
|
||||
|
||||
public boolean isMobSet() {
|
||||
return mobSet;
|
||||
}
|
||||
public boolean isMobSet() {
|
||||
return mobSet;
|
||||
}
|
||||
|
||||
public void updateSpawnerBlock(int par1) {
|
||||
this.mobSpawnerEntity.getWorldObj().addBlockEvent(this.mobSpawnerEntity.xCoord, this.mobSpawnerEntity.yCoord, this.mobSpawnerEntity.zCoord, Blocks.mob_spawner, par1, 0);
|
||||
}
|
||||
public void updateSpawnerBlock(int par1) {
|
||||
this.mobSpawnerEntity.getWorldObj().addBlockEvent(this.mobSpawnerEntity.xCoord, this.mobSpawnerEntity.yCoord, this.mobSpawnerEntity.zCoord, Blocks.mob_spawner, par1, 0);
|
||||
}
|
||||
|
||||
public World getSpawnerWorld() {
|
||||
return this.mobSpawnerEntity.getWorldObj();
|
||||
}
|
||||
public World getSpawnerWorld() {
|
||||
return this.mobSpawnerEntity.getWorldObj();
|
||||
}
|
||||
|
||||
public int getSpawnerX() {
|
||||
return this.mobSpawnerEntity.xCoord;
|
||||
}
|
||||
public int getSpawnerX() {
|
||||
return this.mobSpawnerEntity.xCoord;
|
||||
}
|
||||
|
||||
public int getSpawnerY() {
|
||||
return this.mobSpawnerEntity.yCoord;
|
||||
}
|
||||
public int getSpawnerY() {
|
||||
return this.mobSpawnerEntity.yCoord;
|
||||
}
|
||||
|
||||
public int getSpawnerZ() {
|
||||
return this.mobSpawnerEntity.zCoord;
|
||||
}
|
||||
public int getSpawnerZ() {
|
||||
return this.mobSpawnerEntity.zCoord;
|
||||
}
|
||||
|
||||
public void updateSpawner() {
|
||||
if (!mobSet)
|
||||
return;
|
||||
public void updateSpawner() {
|
||||
if (!mobSet)
|
||||
return;
|
||||
|
||||
double d0;
|
||||
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());
|
||||
// this.getSpawnerWorld().spawnParticle("smoke", d1, d2, d0, 0.0D,
|
||||
// 0.0D, 0.0D);
|
||||
// this.getSpawnerWorld().spawnParticle("flame", d1, d2, d0, 0.0D,
|
||||
// 0.0D, 0.0D);
|
||||
Thaumcraft.proxy.sparkle((float) d1, (float) d2, (float) d0, 0x870404);
|
||||
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());
|
||||
// this.getSpawnerWorld().spawnParticle("smoke", d1, d2, d0, 0.0D,
|
||||
// 0.0D, 0.0D);
|
||||
// this.getSpawnerWorld().spawnParticle("flame", d1, d2, d0, 0.0D,
|
||||
// 0.0D, 0.0D);
|
||||
Thaumcraft.proxy.sparkle((float) d1, (float) d2, (float) d0, 0x870404);
|
||||
|
||||
if (this.spawnDelay > 0) {
|
||||
--this.spawnDelay;
|
||||
}
|
||||
if (this.spawnDelay > 0) {
|
||||
--this.spawnDelay;
|
||||
}
|
||||
|
||||
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;
|
||||
} else if (Config.wrathCage) {
|
||||
if (Config.wrathCost > 0 && fuel <= 0) {
|
||||
if (mobSpawnerEntity.special >= Config.wrathCost) {
|
||||
mobSpawnerEntity.special -= Config.wrathCost;
|
||||
slothful = false;
|
||||
fuel = Config.wrathEff;
|
||||
mobSpawnerEntity.getWorldObj().markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ());
|
||||
} else if (mobSpawnerEntity.wrath >= Config.wrathCost) {
|
||||
mobSpawnerEntity.wrath -= Config.wrathCost;
|
||||
slothful = false;
|
||||
fuel = Config.wrathEff;
|
||||
mobSpawnerEntity.getWorldObj().markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ());
|
||||
} else if (mobSpawnerEntity.sloth >= Config.wrathCost) {
|
||||
mobSpawnerEntity.sloth -= Config.wrathCost;
|
||||
slothful = true;
|
||||
fuel = Config.wrathEff;
|
||||
mobSpawnerEntity.getWorldObj().markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ());
|
||||
}
|
||||
}
|
||||
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;
|
||||
} else if (Config.wrathCage) {
|
||||
if (Config.wrathCost > 0 && fuel <= 0) {
|
||||
if (mobSpawnerEntity.special >= Config.wrathCost) {
|
||||
mobSpawnerEntity.special -= Config.wrathCost;
|
||||
slothful = false;
|
||||
fuel = Config.wrathEff;
|
||||
mobSpawnerEntity.getWorldObj().markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ());
|
||||
} else if (mobSpawnerEntity.wrath >= Config.wrathCost) {
|
||||
mobSpawnerEntity.wrath -= Config.wrathCost;
|
||||
slothful = false;
|
||||
fuel = Config.wrathEff;
|
||||
mobSpawnerEntity.getWorldObj().markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ());
|
||||
} else if (mobSpawnerEntity.sloth >= Config.wrathCost) {
|
||||
mobSpawnerEntity.sloth -= Config.wrathCost;
|
||||
slothful = true;
|
||||
fuel = Config.wrathEff;
|
||||
mobSpawnerEntity.getWorldObj().markBlockForUpdate(getSpawnerX(), getSpawnerY(), getSpawnerZ());
|
||||
}
|
||||
}
|
||||
|
||||
if (this.spawnDelay == -1) {
|
||||
this.updateDelay();
|
||||
}
|
||||
if (this.spawnDelay == -1) {
|
||||
this.updateDelay();
|
||||
}
|
||||
|
||||
if (fuel <= 0 && Config.wrathCost > 0)
|
||||
return;
|
||||
if (fuel <= 0 && Config.wrathCost > 0)
|
||||
return;
|
||||
|
||||
if (this.spawnDelay > 0) {
|
||||
--this.spawnDelay;
|
||||
return;
|
||||
}
|
||||
if (this.spawnDelay > 0) {
|
||||
--this.spawnDelay;
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < this.spawnCount && (fuel > 0 || Config.wrathCost <= 0); ++i) {
|
||||
Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), this.getSpawnerWorld());
|
||||
for (int i = 0; i < this.spawnCount && (fuel > 0 || Config.wrathCost <= 0); ++i) {
|
||||
Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), this.getSpawnerWorld());
|
||||
|
||||
if (entity == null) {
|
||||
return;
|
||||
}
|
||||
if (entity == null) {
|
||||
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.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;
|
||||
}
|
||||
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;
|
||||
EntityLiving entityliving = entity instanceof EntityLiving ? (EntityLiving) entity : null;
|
||||
entity.setLocationAndAngles(d0, d3, d4, this.getSpawnerWorld().rand.nextFloat() * 360.0F, 0.0F);
|
||||
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);
|
||||
|
||||
if (
|
||||
// entityliving == null ||
|
||||
entityCanSpawn(entityliving))
|
||||
// entityliving.getCanSpawnHere())
|
||||
{
|
||||
this.spawnMob(entity);
|
||||
this.getSpawnerWorld().playAuxSFX(2004, this.getSpawnerX(), this.getSpawnerY(), this.getSpawnerZ(), 0);
|
||||
if (
|
||||
// entityliving == null ||
|
||||
entityCanSpawn(entityliving))
|
||||
// entityliving.getCanSpawnHere())
|
||||
{
|
||||
this.spawnMob(entity);
|
||||
this.getSpawnerWorld().playAuxSFX(2004, this.getSpawnerX(), this.getSpawnerY(), this.getSpawnerZ(), 0);
|
||||
|
||||
if (entityliving != null) {
|
||||
entityliving.spawnExplosionParticle();
|
||||
fuel--;
|
||||
}
|
||||
if (entityliving != null) {
|
||||
entityliving.spawnExplosionParticle();
|
||||
fuel--;
|
||||
}
|
||||
|
||||
this.updateDelay();
|
||||
} else if (entityliving != null)
|
||||
entityliving.isDead = true;
|
||||
}
|
||||
this.updateDelay();
|
||||
} else if (entityliving != null)
|
||||
entityliving.isDead = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the entity's current position is a valid location to spawn this
|
||||
* entity.
|
||||
*/
|
||||
public boolean entityCanSpawn(EntityLiving entity) {
|
||||
return entity.worldObj.checkNoEntityCollision(entity.boundingBox) && entity.worldObj.getCollidingBoundingBoxes(entity, entity.boundingBox).isEmpty() && !entity.worldObj.isAnyLiquid(entity.boundingBox);
|
||||
}
|
||||
/**
|
||||
* Checks if the entity's current position is a valid location to spawn this
|
||||
* entity.
|
||||
*/
|
||||
public boolean entityCanSpawn(EntityLiving entity) {
|
||||
return entity.worldObj.checkNoEntityCollision(entity.boundingBox) && entity.worldObj.getCollidingBoundingBoxes(entity, entity.boundingBox).isEmpty() && !entity.worldObj.isAnyLiquid(entity.boundingBox);
|
||||
}
|
||||
|
||||
private void updateDelay() {
|
||||
if (this.maxSpawnDelay <= this.minSpawnDelay) {
|
||||
this.spawnDelay = this.minSpawnDelay;
|
||||
} else {
|
||||
int i = this.maxSpawnDelay - this.minSpawnDelay;
|
||||
this.spawnDelay = this.minSpawnDelay + this.getSpawnerWorld().rand.nextInt(i);
|
||||
}
|
||||
private void updateDelay() {
|
||||
if (this.maxSpawnDelay <= this.minSpawnDelay) {
|
||||
this.spawnDelay = this.minSpawnDelay;
|
||||
} else {
|
||||
int i = this.maxSpawnDelay - this.minSpawnDelay;
|
||||
this.spawnDelay = this.minSpawnDelay + this.getSpawnerWorld().rand.nextInt(i);
|
||||
}
|
||||
|
||||
if (slothful)
|
||||
spawnDelay += 200;
|
||||
if (slothful)
|
||||
spawnDelay += 200;
|
||||
|
||||
this.updateSpawnerBlock(1);
|
||||
}
|
||||
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;
|
||||
mobSet = par1NBTTagCompound.getBoolean("MobSet");
|
||||
slothful = par1NBTTagCompound.getBoolean("Slothful");
|
||||
this.fuel = par1NBTTagCompound.getShort("Fuel");
|
||||
this.spawnDelay = par1NBTTagCompound.getShort("Delay");
|
||||
public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
mobID = par1NBTTagCompound.getString("EntityId");
|
||||
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");
|
||||
this.spawnDelay = par1NBTTagCompound.getShort("Delay");
|
||||
|
||||
// if (par1NBTTagCompound.hasKey("MinSpawnDelay"))
|
||||
// {
|
||||
// this.minSpawnDelay = par1NBTTagCompound.getShort("MinSpawnDelay");
|
||||
// this.maxSpawnDelay = par1NBTTagCompound.getShort("MaxSpawnDelay");
|
||||
// this.spawnCount = par1NBTTagCompound.getShort("SpawnCount");
|
||||
// }
|
||||
// if (par1NBTTagCompound.hasKey("MinSpawnDelay"))
|
||||
// {
|
||||
// this.minSpawnDelay = par1NBTTagCompound.getShort("MinSpawnDelay");
|
||||
// this.maxSpawnDelay = par1NBTTagCompound.getShort("MaxSpawnDelay");
|
||||
// this.spawnCount = par1NBTTagCompound.getShort("SpawnCount");
|
||||
// }
|
||||
|
||||
if (par1NBTTagCompound.hasKey("MaxNearbyEntities")) {
|
||||
this.maxNearbyEntities = par1NBTTagCompound.getShort("MaxNearbyEntities");
|
||||
}
|
||||
if (par1NBTTagCompound.hasKey("MaxNearbyEntities")) {
|
||||
this.maxNearbyEntities = par1NBTTagCompound.getShort("MaxNearbyEntities");
|
||||
}
|
||||
|
||||
if (par1NBTTagCompound.hasKey("SpawnRange")) {
|
||||
this.spawnRange = par1NBTTagCompound.getShort("SpawnRange");
|
||||
}
|
||||
if (par1NBTTagCompound.hasKey("SpawnRange")) {
|
||||
this.spawnRange = par1NBTTagCompound.getShort("SpawnRange");
|
||||
}
|
||||
|
||||
if (this.getSpawnerWorld() != null && this.getSpawnerWorld().isRemote) {
|
||||
this.renderEntity = null;
|
||||
}
|
||||
}
|
||||
if (this.getSpawnerWorld() != null && this.getSpawnerWorld().isRemote) {
|
||||
this.renderEntity = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
par1NBTTagCompound.setString("EntityId", this.getEntityNameToSpawn());
|
||||
par1NBTTagCompound.setBoolean("MobSet", mobSet);
|
||||
par1NBTTagCompound.setBoolean("Slothful", slothful);
|
||||
par1NBTTagCompound.setShort("Fuel", (short) this.fuel);
|
||||
par1NBTTagCompound.setShort("Delay", (short) this.spawnDelay);
|
||||
// par1NBTTagCompound.setShort("MinSpawnDelay",
|
||||
// (short)this.minSpawnDelay);
|
||||
// par1NBTTagCompound.setShort("MaxSpawnDelay",
|
||||
// (short)this.maxSpawnDelay);
|
||||
// par1NBTTagCompound.setShort("SpawnCount", (short)this.spawnCount);
|
||||
par1NBTTagCompound.setShort("MaxNearbyEntities", (short) this.maxNearbyEntities);
|
||||
par1NBTTagCompound.setShort("SpawnRange", (short) this.spawnRange);
|
||||
public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
par1NBTTagCompound.setString("EntityId", this.getEntityNameToSpawn());
|
||||
par1NBTTagCompound.setBoolean("MobSet", mobSet);
|
||||
par1NBTTagCompound.setBoolean("Slothful", slothful);
|
||||
par1NBTTagCompound.setShort("Fuel", (short) this.fuel);
|
||||
par1NBTTagCompound.setShort("Delay", (short) this.spawnDelay);
|
||||
// par1NBTTagCompound.setShort("MinSpawnDelay",
|
||||
// (short)this.minSpawnDelay);
|
||||
// par1NBTTagCompound.setShort("MaxSpawnDelay",
|
||||
// (short)this.maxSpawnDelay);
|
||||
// par1NBTTagCompound.setShort("SpawnCount", (short)this.spawnCount);
|
||||
par1NBTTagCompound.setShort("MaxNearbyEntities", (short) this.maxNearbyEntities);
|
||||
par1NBTTagCompound.setShort("SpawnRange", (short) this.spawnRange);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Entity spawnMob(Entity par1Entity) {
|
||||
if (par1Entity instanceof EntityLivingBase && par1Entity.worldObj != null) {
|
||||
((EntityLiving) par1Entity).onSpawnWithEgg((IEntityLivingData) null);
|
||||
this.getSpawnerWorld().spawnEntityInWorld(par1Entity);
|
||||
}
|
||||
public Entity spawnMob(Entity par1Entity) {
|
||||
if (par1Entity instanceof EntityLivingBase && par1Entity.worldObj != null) {
|
||||
((EntityLiving) par1Entity).onSpawnWithEgg((IEntityLivingData) null);
|
||||
this.getSpawnerWorld().spawnEntityInWorld(par1Entity);
|
||||
}
|
||||
|
||||
return par1Entity;
|
||||
}
|
||||
return par1Entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the delay to minDelay if parameter given is 1, else return false.
|
||||
*/
|
||||
public boolean setDelayToMin(int par1) {
|
||||
if (par1 == 1 && this.getSpawnerWorld().isRemote) {
|
||||
this.spawnDelay = this.minSpawnDelay;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Sets the delay to minDelay if parameter given is 1, else return false.
|
||||
*/
|
||||
public boolean setDelayToMin(int par1) {
|
||||
if (par1 == 1 && this.getSpawnerWorld().isRemote) {
|
||||
this.spawnDelay = this.minSpawnDelay;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Entity getEntityForRender() {
|
||||
if (this.renderEntity == null) {
|
||||
Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), (World) null);
|
||||
entity = this.spawnMob(entity);
|
||||
this.renderEntity = entity;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Entity getEntityForRender() {
|
||||
if (this.renderEntity == null) {
|
||||
Entity entity = EntityList.createEntityByName(this.getEntityNameToSpawn(), (World) null);
|
||||
entity = this.spawnMob(entity);
|
||||
this.renderEntity = entity;
|
||||
}
|
||||
|
||||
return this.renderEntity;
|
||||
}
|
||||
return this.renderEntity;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user