From 443958c1cf9f2bf140858f07f2929309a21fe402 Mon Sep 17 00:00:00 2001 From: John Yorke Date: Mon, 24 Jul 2017 18:58:14 -0300 Subject: [PATCH] Bugfixes, cleanup, particle improvements, closes #46, #47 --- .../java/taintedmagic/client/ClientProxy.java | 37 +--- .../java/taintedmagic/common/CommonProxy.java | 4 - .../common/blocks/tile/TileEntityLumos.java | 24 ++- .../common/entities/EntityGlowpet.java | 6 +- .../common/entities/EntityHomingShard.java | 8 +- .../common/handler/WandHandler.java | 2 +- .../items/equipment/ItemVoidwalkerSash.java | 14 +- .../common/items/tools/ItemKatana.java | 8 +- .../items/wand/foci/ItemFocusLumos.java | 188 ++++++++++-------- .../items/wand/foci/ItemFocusMeteorology.java | 36 ++-- .../wand/foci/ItemFocusTaintedShockwave.java | 35 +++- .../common/items/wand/foci/ItemFocusTime.java | 37 ++-- .../items/wand/foci/ItemFocusVisShard.java | 33 ++- .../common/registry/ResearchRegistry.java | 26 +-- 14 files changed, 231 insertions(+), 227 deletions(-) diff --git a/src/main/java/taintedmagic/client/ClientProxy.java b/src/main/java/taintedmagic/client/ClientProxy.java index 7a05983..6bc1b4f 100644 --- a/src/main/java/taintedmagic/client/ClientProxy.java +++ b/src/main/java/taintedmagic/client/ClientProxy.java @@ -19,14 +19,17 @@ import taintedmagic.common.entities.EntityGlowpet; import taintedmagic.common.entities.EntityHomingShard; import taintedmagic.common.entities.EntityTaintBubble; import taintedmagic.common.helper.TaintedMagicHelper; -import taintedmagic.common.items.tools.ItemKatana; import taintedmagic.common.registry.ItemRegistry; import thaumcraft.client.fx.ParticleEngine; +import thaumcraft.client.fx.particles.FXSparkle; import thaumcraft.client.fx.particles.FXWisp; import thaumcraft.client.renderers.entity.RenderEldritchOrb; import thaumcraft.codechicken.lib.vec.Vector3; +import thaumcraft.common.lib.network.PacketHandler; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ClientProxy extends CommonProxy { @@ -62,36 +65,4 @@ public class ClientProxy extends CommonProxy MinecraftForge.EVENT_BUS.register(new HUDHandler()); FMLCommonHandler.instance().bus().register(new HUDHandler()); } - - @Override - public void spawnShockwaveParticles (World w) - { - EntityPlayer p = getClientPlayer(); - - double xp = 0; - double zp = 0; - - for (int i = 1; i < 360; i++) - { - for (int j = 0; j < 5; j++) - { - xp = (Math.cos(i * Math.PI / 180F)); - zp = (Math.sin(i * Math.PI / 180F)); - - float red = (0.05F + p.worldObj.rand.nextFloat() * 0.1F); - float blue = (0.1F + p.worldObj.rand.nextFloat() * 0.1F); - - double off = Math.random() * 0.1; - - FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY - 1, p.posZ + zp + off, 2.0F * (float) Math.random(), red, 0.0F, blue); - ef.setGravity(0.0F); - ef.shrink = true; - ef.noClip = true; - Vector3 movement = TaintedMagicHelper.getDistanceBetween(ef, p); - ef.addVelocity(movement.x * 2.5, 0, movement.z * 2.5); - - ParticleEngine.instance.addEffect(w, ef); - } - } - } } diff --git a/src/main/java/taintedmagic/common/CommonProxy.java b/src/main/java/taintedmagic/common/CommonProxy.java index 200a3f3..756742b 100644 --- a/src/main/java/taintedmagic/common/CommonProxy.java +++ b/src/main/java/taintedmagic/common/CommonProxy.java @@ -19,10 +19,6 @@ public class CommonProxy { } - public void spawnShockwaveParticles (World w) - { - } - public WorldClient getClientWorld () { return null; diff --git a/src/main/java/taintedmagic/common/blocks/tile/TileEntityLumos.java b/src/main/java/taintedmagic/common/blocks/tile/TileEntityLumos.java index 6cf36c1..f349cac 100644 --- a/src/main/java/taintedmagic/common/blocks/tile/TileEntityLumos.java +++ b/src/main/java/taintedmagic/common/blocks/tile/TileEntityLumos.java @@ -4,17 +4,17 @@ import java.util.List; import java.util.Random; import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.AxisAlignedBB; +import taintedmagic.common.TaintedMagic; import taintedmagic.common.blocks.BlockLumos; import taintedmagic.common.entities.EntityGlowpet; import taintedmagic.common.items.wand.foci.ItemFocusLumos; import thaumcraft.client.fx.ParticleEngine; import thaumcraft.client.fx.particles.FXSparkle; import thaumcraft.common.Thaumcraft; -import thaumcraft.common.items.wands.ItemWandCasting; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class TileEntityLumos extends TileEntity { @@ -51,22 +51,26 @@ public class TileEntityLumos extends TileEntity worldObj.setBlockToAir(xCoord, yCoord, zCoord); } - Random r = new Random(); - if ( (meta == 1 && r.nextInt(50) == 0) || (meta == 2 && r.nextInt(9) == 0)) + if ( (meta == 1 && worldObj.rand.nextInt(50) == 0) || (meta == 2 && worldObj.rand.nextInt(9) == 0)) { Thaumcraft.proxy.sparkle((float) xCoord + 0.5F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.25F, (float) yCoord + 0.5F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.25F, (float) zCoord + 0.5F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.25F, 0.5F, 6, -0.05F); } - if ( (meta == 1 || meta == 2) && r.nextInt(512) == 0) + if ( (meta == 1 || meta == 2) && worldObj.rand.nextInt(512) == 0) { for (int a = 0; a < 9; a++) { - FXSparkle fx = new FXSparkle(worldObj, xCoord + worldObj.rand.nextFloat(), yCoord + worldObj.rand.nextFloat(), zCoord + worldObj.rand.nextFloat(), 1.75F, worldObj.rand.nextInt(5), 3 + worldObj.rand.nextInt(3)); - fx.setGravity(0.1F); - ParticleEngine.instance.addEffect(worldObj, fx); - if (r.nextBoolean()) break; + if (worldObj.isRemote) spawnParticles(); } } } } + + @SideOnly (Side.CLIENT) + void spawnParticles () + { + FXSparkle fx = new FXSparkle(worldObj, xCoord + worldObj.rand.nextFloat(), yCoord + worldObj.rand.nextFloat(), zCoord + worldObj.rand.nextFloat(), 1.75F, worldObj.rand.nextInt(5), 3 + worldObj.rand.nextInt(3)); + fx.setGravity(0.1F); + ParticleEngine.instance.addEffect(worldObj, fx); + } } diff --git a/src/main/java/taintedmagic/common/entities/EntityGlowpet.java b/src/main/java/taintedmagic/common/entities/EntityGlowpet.java index 30e8136..edbe1de 100644 --- a/src/main/java/taintedmagic/common/entities/EntityGlowpet.java +++ b/src/main/java/taintedmagic/common/entities/EntityGlowpet.java @@ -128,9 +128,9 @@ public class EntityGlowpet extends EntityThrowable dy /= d; dz /= d; - this.motionX = dx * Math.random(); - this.motionY = dy * Math.random(); - this.motionZ = dz * Math.random(); + this.motionX = dx; + this.motionY = dy; + this.motionZ = dz; this.worldObj.playSoundAtEntity(this, "taintedmagic:shard", 0.1F, 2.0F * this.worldObj.rand.nextFloat()); } diff --git a/src/main/java/taintedmagic/common/entities/EntityHomingShard.java b/src/main/java/taintedmagic/common/entities/EntityHomingShard.java index d2c63c4..04a608c 100644 --- a/src/main/java/taintedmagic/common/entities/EntityHomingShard.java +++ b/src/main/java/taintedmagic/common/entities/EntityHomingShard.java @@ -180,7 +180,7 @@ public class EntityHomingShard extends EntityThrowable implements IEntityAdditio setDead(); } - if (this.ticksExisted % 20 == 0 && this.target != null && !this.target.isDead) + if (this.ticksExisted % 10 == 0 && this.target != null && !this.target.isDead) { double d = getDistanceToEntity(this.target); double dx = this.target.posX - this.posX; @@ -190,9 +190,9 @@ public class EntityHomingShard extends EntityThrowable implements IEntityAdditio dy /= d; dz /= d; - this.motionX = dx * Math.random(); - this.motionY = dy * Math.random(); - this.motionZ = dz * Math.random(); + this.motionX = dx; + this.motionY = dy; + this.motionZ = dz; this.worldObj.playSoundAtEntity(this, "taintedmagic:shard", 0.1F, 2.0F * this.worldObj.rand.nextFloat()); } diff --git a/src/main/java/taintedmagic/common/handler/WandHandler.java b/src/main/java/taintedmagic/common/handler/WandHandler.java index c62509e..4ffcae9 100644 --- a/src/main/java/taintedmagic/common/handler/WandHandler.java +++ b/src/main/java/taintedmagic/common/handler/WandHandler.java @@ -33,7 +33,7 @@ public class WandHandler implements IWandRodOnUpdate double fx = 20 * coth(x / 250.0D); int rfx = Math.min((int) Math.round(fx), 200); - + if (player.ticksExisted % rfx == 0) { for (int i = 0; i < primals.length; i++) diff --git a/src/main/java/taintedmagic/common/items/equipment/ItemVoidwalkerSash.java b/src/main/java/taintedmagic/common/items/equipment/ItemVoidwalkerSash.java index 499952e..30277d1 100644 --- a/src/main/java/taintedmagic/common/items/equipment/ItemVoidwalkerSash.java +++ b/src/main/java/taintedmagic/common/items/equipment/ItemVoidwalkerSash.java @@ -7,12 +7,10 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.LivingEvent; -import net.minecraftforge.event.entity.living.LivingHurtEvent; import taintedmagic.common.TaintedMagic; import thaumcraft.api.IRunicArmor; import thaumcraft.api.IWarpingGear; @@ -24,8 +22,6 @@ import baubles.api.IBauble; import baubles.common.lib.PlayerHandler; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; public class ItemVoidwalkerSash extends ItemRunic implements IRunicArmor, IWarpingGear, IBauble { @@ -100,13 +96,13 @@ public class ItemVoidwalkerSash extends ItemRunic implements IRunicArmor, IWarpi public void onWornTick (ItemStack s, EntityLivingBase e) { EntityPlayer p = (EntityPlayer) e; - if ( (p.inventory.armorItemInSlot(0) != null) && (p.inventory.armorItemInSlot(0).getItem() instanceof ItemVoidwalkerBoots)) + if (p.inventory.armorItemInSlot(0) != null && p.inventory.armorItemInSlot(0).getItem() instanceof ItemVoidwalkerBoots) { if (hasSpeedBoost(s)) { if (p.moveForward > 0.0F) { - if ( (p.worldObj.isRemote) && (!p.isSneaking())) + if (p.worldObj.isRemote && !p.isSneaking()) { if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(Integer.valueOf(p.getEntityId()))) { @@ -138,14 +134,14 @@ public class ItemVoidwalkerSash extends ItemRunic implements IRunicArmor, IWarpi @SubscribeEvent public void onPlayerJump (LivingEvent.LivingJumpEvent event) { - if ( (event.entityLiving instanceof EntityPlayer)) + if (event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; ItemStack sash = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3); ItemStack boots = player.inventory.armorItemInSlot(0); - if ( (sash != null) && ( (sash.getItem() instanceof ItemVoidwalkerSash))) + if (sash != null && sash.getItem() instanceof ItemVoidwalkerSash) { - if ( (boots != null) && ( (boots.getItem() instanceof ItemVoidwalkerBoots))) + if (boots != null && boots.getItem() instanceof ItemVoidwalkerBoots) { if (hasSpeedBoost(sash)) { diff --git a/src/main/java/taintedmagic/common/items/tools/ItemKatana.java b/src/main/java/taintedmagic/common/items/tools/ItemKatana.java index 35604a5..d114d1c 100644 --- a/src/main/java/taintedmagic/common/items/tools/ItemKatana.java +++ b/src/main/java/taintedmagic/common/items/tools/ItemKatana.java @@ -15,7 +15,6 @@ import net.minecraft.item.EnumAction; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; @@ -57,10 +56,10 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable public static final ModelKatana katana = new ModelKatana(); public static final ModelSaya saya = new ModelSaya(); - public static boolean equipped = false; - public static float ticksEquipped = 0F; + static boolean equipped = false; + static float ticksEquipped = 0F; - public int ticksInUse = 0; + int ticksInUse = 0; public ItemKatana () { @@ -134,7 +133,6 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable else e.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) p), getAttackDamage(s)); } p.worldObj.playSoundAtEntity(p, "thaumcraft:swing", 0.5F + (float) Math.random(), 0.5F + (float) Math.random()); - return super.hitEntity(s, e, p); } diff --git a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusLumos.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusLumos.java index 1da90b7..a28fb47 100644 --- a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusLumos.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusLumos.java @@ -1,7 +1,6 @@ package taintedmagic.common.items.wand.foci; import java.util.List; -import java.util.Random; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.player.EntityPlayer; @@ -20,7 +19,9 @@ import thaumcraft.api.wands.FocusUpgradeType; import thaumcraft.api.wands.ItemFocusBasic; import thaumcraft.client.fx.ParticleEngine; import thaumcraft.client.fx.particles.FXSparkle; +import thaumcraft.client.fx.particles.FXWisp; import thaumcraft.common.items.wands.ItemWandCasting; +import thaumcraft.common.lib.network.PacketHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -92,107 +93,129 @@ public class ItemFocusLumos extends ItemFocusBasic { ItemWandCasting wand = (ItemWandCasting) s.getItem(); - if (!w.isRemote) + if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && !p.isSneaking()) { - if (mop != null && mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && !p.isSneaking()) + if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) + { + int x = mop.blockX; + int y = mop.blockY; + int z = mop.blockZ; + + switch (mop.sideHit) + { + case 0 : + y--; + break; + case 1 : + y++; + break; + case 2 : + z--; + break; + case 3 : + z++; + break; + case 4 : + x--; + break; + case 5 : + x++; + } + if (!w.isRemote) w.setBlock(x, y, z, BlockRegistry.BlockLumos, 2, 3); + w.playSoundAtEntity(p, "thaumcraft:ice", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F); + + for (int a = 0; a < 9; a++) + { + if (w.isRemote) spawnLumosParticles(w, x, y, z); + } + } + } + else + { + if (isUpgradedWith(wand.getFocusItem(s), FocusUpgrades.glowpet)) { if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) { - int x = mop.blockX; - int y = mop.blockY; - int z = mop.blockZ; + EntityGlowpet pet = new EntityGlowpet(w, p, wand.getFocusExtend(s) + 1); + if (!w.isRemote) w.spawnEntityInWorld(pet); + w.playSoundAtEntity(pet, "taintedmagic:shard", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F); - switch (mop.sideHit) + for (int a = 0; a < 18; a++) { - case 0 : - y--; - break; - case 1 : - y++; - break; - case 2 : - z--; - break; - case 3 : - z++; - break; - case 4 : - x--; - break; - case 5 : - x++; - } - w.setBlock(x, y, z, BlockRegistry.BlockLumos, 2, 3); - w.playSoundAtEntity(p, "thaumcraft:ice", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F); - for (int a = 0; a < 9; a++) - { - spawnParticles(w, x, y, z); + if (w.isRemote) spawnLumosParticles(w, pet.posX, pet.posY, pet.posZ); } } } - else + else if (isUpgradedWith(wand.getFocusItem(s), FocusUpgrades.maxima)) { - if (isUpgradedWith(wand.getFocusItem(s), FocusUpgrades.glowpet)) + int r = 11 + wand.getFocusEnlarge(s); + if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) { - if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) + for (int xOff = -r; xOff <= r; xOff++) { - EntityGlowpet pet = new EntityGlowpet(w, p, wand.getFocusExtend(s) + 1); - w.spawnEntityInWorld(pet); - w.playSoundAtEntity(pet, "taintedmagic:shard", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F); - for (int a = 0; a < 18; a++) + for (int yOff = -r; yOff <= r; yOff++) { - spawnParticles(w, pet.posX, pet.posY, pet.posZ); - } - } - } - else if (isUpgradedWith(wand.getFocusItem(s), FocusUpgrades.maxima)) - { - int r = 11 + wand.getFocusEnlarge(s); - if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) - { - for (int xOff = -r; xOff <= r; xOff++) - { - for (int yOff = -r; yOff <= r; yOff++) + for (int zOff = -r; zOff <= r; zOff++) { - for (int zOff = -r; zOff <= r; zOff++) - { - int x = (int) (p.posX + xOff); - int y = (int) (p.posY + yOff); - int z = (int) (p.posZ + zOff); + int x = (int) (p.posX + xOff); + int y = (int) (p.posY + yOff); + int z = (int) (p.posZ + zOff); - if (w.isAirBlock(x, y, z) && w.getBlock(x, y, z) != BlockRegistry.BlockLumos && w.getBlockLightValue(x, y, z) < 9) - { - BlockLumos src = (BlockLumos) BlockRegistry.BlockLumos; - src.setGlowDuration(200); - w.setBlock(x, y, z, src, 1, 3); - if (w.rand.nextInt(12) == 0) - { - for (int a = 0; a < 9; a++) - { - spawnParticles(w, x, y, z); - } - } - } + if (w.isAirBlock(x, y, z) && w.getBlock(x, y, z) != BlockRegistry.BlockLumos && w.getBlockLightValue(x, y, z) < 9) + { + BlockLumos src = (BlockLumos) BlockRegistry.BlockLumos; + src.setGlowDuration(200); + if (!w.isRemote) w.setBlock(x, y, z, src, 1, 3); } } } - w.playSoundAtEntity(p, "thaumcraft:ice", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F); + if (w.isRemote) spawnMaximaParticles(w, p, wand.getFocusEnlarge(s)); } + w.playSoundAtEntity(p, "thaumcraft:runicShieldCharge", 0.3F, 1.0F + w.rand.nextFloat() * 0.5F); } } } p.swingItem(); return s; } - - @SideOnly(Side.CLIENT) - void spawnParticles(World w, double x, double y, double z) + + @SideOnly (Side.CLIENT) + void spawnLumosParticles (World w, double x, double y, double z) { - FXSparkle fx = new FXSparkle(w, x + w.rand.nextFloat(), y + w.rand.nextFloat(), z + w.rand.nextFloat(), 1.75F, w.rand.nextInt(5), 3 + w.rand.nextInt(3)); + FXSparkle fx = new FXSparkle(w, x + w.rand.nextFloat(), y + w.rand.nextFloat(), z + w.rand.nextFloat(), 1.75F, 6, 3 + w.rand.nextInt(3)); fx.setGravity(0.1F); ParticleEngine.instance.addEffect(w, fx); } + @SideOnly (Side.CLIENT) + void spawnMaximaParticles (World w, EntityPlayer p, float ex) + { + for (int i = 1; i < 100 + (25 * ex); i++) + { + double t = 2 * Math.PI * Math.random(); + double r = (-Math.random() + Math.random()) * (11 + ex); + + double xp = r * Math.cos(t); + double zp = r * Math.sin(t); + double yp = -Math.random() + Math.random(); + + double off = Math.random() * 0.1; + + float red = 0.9F + (float) Math.random() * 0.1F; + float green = 0.8F + (float) Math.random() * 0.1F; + float blue = 0.8F + (float) Math.random() * 0.1F; + + FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY + 15.0D + yp + off, p.posZ + zp + off, 0.5F + (float) Math.random() * 0.25F, red, green, blue); + ef.setGravity(0.0F); + ef.shrink = true; + ef.noClip = true; + + ef.addVelocity(xp * 0.2D, 0.0D, zp * 0.2D); + + ParticleEngine.instance.addEffect(w, ef); + } + } + public FocusUpgradeType[] getPossibleUpgradesByRank (ItemStack s, int r) { switch (r) @@ -200,19 +223,22 @@ public class ItemFocusLumos extends ItemFocusBasic case 1 : return new FocusUpgradeType[]{ FocusUpgrades.glowpet, FocusUpgrades.maxima, FocusUpgradeType.frugal }; case 2 : - return new FocusUpgradeType[]{ FocusUpgradeType.frugal, isUpgradedWith(s, FocusUpgrades.glowpet) ? FocusUpgradeType.extend : isUpgradedWith(s, FocusUpgrades.maxima) ? FocusUpgradeType.enlarge : null }; + if (isUpgradedWith(s, FocusUpgrades.glowpet)) return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.extend }; + else if (isUpgradedWith(s, FocusUpgrades.maxima)) return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge }; + else return new FocusUpgradeType[]{ FocusUpgradeType.frugal }; case 3 : - return new FocusUpgradeType[]{ FocusUpgradeType.frugal, isUpgradedWith(s, FocusUpgrades.glowpet) ? FocusUpgradeType.extend : isUpgradedWith(s, FocusUpgrades.maxima) ? FocusUpgradeType.enlarge : null }; + if (isUpgradedWith(s, FocusUpgrades.glowpet)) return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.extend }; + else if (isUpgradedWith(s, FocusUpgrades.maxima)) return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge }; + else return new FocusUpgradeType[]{ FocusUpgradeType.frugal }; case 4 : - return new FocusUpgradeType[]{ FocusUpgradeType.frugal, isUpgradedWith(s, FocusUpgrades.glowpet) ? FocusUpgradeType.extend : isUpgradedWith(s, FocusUpgrades.maxima) ? FocusUpgradeType.enlarge : null }; + if (isUpgradedWith(s, FocusUpgrades.glowpet)) return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.extend }; + else if (isUpgradedWith(s, FocusUpgrades.maxima)) return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge }; + else return new FocusUpgradeType[]{ FocusUpgradeType.frugal }; case 5 : - return new FocusUpgradeType[]{ FocusUpgradeType.frugal, isUpgradedWith(s, FocusUpgrades.glowpet) ? FocusUpgradeType.extend : isUpgradedWith(s, FocusUpgrades.maxima) ? FocusUpgradeType.enlarge : null }; + if (isUpgradedWith(s, FocusUpgrades.glowpet)) return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.extend }; + else if (isUpgradedWith(s, FocusUpgrades.maxima)) return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.enlarge }; + else return new FocusUpgradeType[]{ FocusUpgradeType.frugal }; } return null; } - - public boolean canApplyUpgrade (ItemStack s, EntityPlayer p, FocusUpgradeType t, int rank) - { - return !t.equals(FocusUpgradeType.enlarge) || ((ItemFocusBasic) s.getItem()).isUpgradedWith(s, FocusUpgrades.maxima); - } } diff --git a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMeteorology.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMeteorology.java index 18ff926..41cec94 100644 --- a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMeteorology.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMeteorology.java @@ -106,8 +106,10 @@ public class ItemFocusMeteorology extends ItemFocusBasic { w.getWorldInfo().setRainTime(w.isRaining() ? 24000 : 0); w.getWorldInfo().setRaining(!w.isRaining()); - p.playSound("thaumcraft:wand", 0.5F, 1.0F); - spawnParticles(w, p); + p.playSound("thaumcraft:runicShieldCharge", 0.3F, 1.0F + w.rand.nextFloat() * 0.5F); + p.playSound("thaumcraft:wand", 0.3F, 1.0F + w.rand.nextFloat() * 0.5F); + + if (w.isRemote) spawnParticles(w, p); } return s; } @@ -121,28 +123,24 @@ public class ItemFocusMeteorology extends ItemFocusBasic @SideOnly (Side.CLIENT) void spawnParticles (World w, EntityPlayer p) { - if (w.isRemote) + for (int i = 1; i < 200; i++) { - for (int i = 1; i < 200; i++) - { - double xp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); - double zp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); - double yp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); - double off = Math.random() * 0.1; + double xp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); + double zp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); + double yp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); + double off = Math.random() * 0.1; - float green = p.worldObj.rand.nextFloat(); - float blue = p.worldObj.rand.nextFloat(); + float green = p.worldObj.rand.nextFloat(); + float blue = p.worldObj.rand.nextFloat(); - FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY + 10 + yp + off, p.posZ + zp + off, 0.5F + ((float) Math.random() * 0.25F), 0.25F, green, blue); - ef.setGravity(0.75F); - ef.shrink = true; - ef.noClip = true; + FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY + 10 + yp + off, p.posZ + zp + off, 0.5F + ((float) Math.random() * 0.25F), 0.25F, green, blue); + ef.setGravity(-1.5F); + ef.shrink = true; + ef.noClip = true; - Vector3 movement = TaintedMagicHelper.getDistanceBetween(ef, p); - ef.addVelocity(movement.x * 0.5, movement.y * 0.5, movement.z * 0.5); + ef.addVelocity(xp * 0.5D, 0.0D, zp * 0.5D); - ParticleEngine.instance.addEffect(w, ef); - } + ParticleEngine.instance.addEffect(w, ef); } } } diff --git a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaintedShockwave.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaintedShockwave.java index 786d787..559cddf 100644 --- a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaintedShockwave.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaintedShockwave.java @@ -19,6 +19,8 @@ import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.wands.FocusUpgradeType; import thaumcraft.api.wands.ItemFocusBasic; +import thaumcraft.client.fx.ParticleEngine; +import thaumcraft.client.fx.particles.FXWisp; import thaumcraft.codechicken.lib.vec.Vector3; import thaumcraft.common.items.wands.ItemWandCasting; import cpw.mods.fml.relauncher.Side; @@ -116,13 +118,42 @@ public class ItemFocusTaintedShockwave extends ItemFocusBasic } } } - w.playSoundAtEntity(p, "taintedmagic:shockwave", 5.0F, 1.0F * (float) Math.random()); - TaintedMagic.proxy.spawnShockwaveParticles(p.worldObj); + w.playSoundAtEntity(p, "taintedmagic:shockwave", 5.0F, 1.5F * (float) Math.random()); + if (w.isRemote) spawnParticles(w, p); return s; } return null; } + @SideOnly (Side.CLIENT) + public void spawnParticles (World w, EntityPlayer p) + { + for (int i = 1; i < 360; i++) + { + for (int j = 0; j < 4; j++) + { + double r = 4.0D; + double xp = (Math.cos(i * Math.PI / 180.0D)) * r; + double zp = (Math.sin(i * Math.PI / 180.0D)) * r; + + float red = 0.75F + w.rand.nextFloat() * 0.25F; + float green = w.rand.nextFloat() * 0.5F; + float blue = 0.75F + w.rand.nextFloat() * 0.25F; + + double off = j * 0.25F; + + FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY - 1, p.posZ + zp + off, 0.5F + (float) Math.random() * 0.25F, red, green, blue); + ef.setGravity(0.0F); + ef.shrink = true; + ef.noClip = true; + + ef.addVelocity(xp * 0.3D, 0, zp * 0.3D); + + ParticleEngine.instance.addEffect(w, ef); + } + } + } + public FocusUpgradeType[] getPossibleUpgradesByRank (ItemStack s, int rank) { switch (rank) diff --git a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTime.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTime.java index 158d85c..db56cd1 100644 --- a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTime.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTime.java @@ -119,9 +119,10 @@ public class ItemFocusTime extends ItemFocusBasic if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) { w.setWorldTime(w.isDaytime() ? 14000 : 24000); - p.playSound("thaumcraft:wand", 0.5F, 1.0F); + p.playSound("thaumcraft:runicShieldCharge", 0.3F, 1.0F + w.rand.nextFloat() * 0.5F); + p.playSound("thaumcraft:wand", 0.3F, 1.0F + w.rand.nextFloat() * 0.5F); - spawnParticles(w, p); + if (w.isRemote) spawnParticles(w, p); } return s; } @@ -135,29 +136,25 @@ public class ItemFocusTime extends ItemFocusBasic @SideOnly (Side.CLIENT) void spawnParticles (World w, EntityPlayer p) { - if (w.isRemote) + for (int i = 1; i < 200; i++) { - for (int i = 1; i < 200; i++) - { - double xp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); - double zp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); - double yp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); - double off = Math.random() * 0.1; + double xp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); + double zp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); + double yp = (-Math.random() * 2.0F) + (Math.random() * 2.0F); + double off = Math.random() * 0.1; - float red = p.worldObj.rand.nextFloat(); - float green = p.worldObj.rand.nextFloat(); - float blue = p.worldObj.rand.nextFloat(); + float red = p.worldObj.rand.nextFloat(); + float green = p.worldObj.rand.nextFloat(); + float blue = p.worldObj.rand.nextFloat(); - FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY + 10 + yp + off, p.posZ + zp + off, 0.5F + ((float) Math.random() * 0.25F), red, green, blue); - ef.setGravity(0.75F); - ef.shrink = true; - ef.noClip = true; + FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY + 10 + yp + off, p.posZ + zp + off, 0.5F + ((float) Math.random() * 0.25F), red, green, blue); + ef.setGravity(-1.5F); + ef.shrink = true; + ef.noClip = true; - Vector3 movement = TaintedMagicHelper.getDistanceBetween(ef, p); - ef.addVelocity(movement.x * 0.5, movement.y * 0.5, movement.z * 0.5); + ef.addVelocity(xp * 0.5D, 0.0D, zp * 0.5D); - ParticleEngine.instance.addEffect(w, ef); - } + ParticleEngine.instance.addEffect(w, ef); } } } diff --git a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusVisShard.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusVisShard.java index edc4da0..d1213a1 100644 --- a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusVisShard.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusVisShard.java @@ -67,13 +67,15 @@ public class ItemFocusVisShard extends ItemFocusBasic Entity look = EntityUtils.getPointedEntity(p.worldObj, p, 0.0D, 32.0D, 1.1F); if (look != null && look instanceof EntityLivingBase) { - if (!w.isRemote) + if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) { - if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) + EntityHomingShard shard = new EntityHomingShard(w, p, (EntityLivingBase) look, wand.getFocusPotency(s), isUpgradedWith(wand.getFocusItem(s), FocusUpgrades.persistent)); + if (!w.isRemote) w.spawnEntityInWorld(shard); + w.playSoundAtEntity(shard, "taintedmagic:shard", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F); + + for (int a = 0; a < 18; a++) { - EntityHomingShard blast = new EntityHomingShard(w, p, (EntityLivingBase) look, wand.getFocusPotency(s), isUpgradedWith(wand.getFocusItem(s), FocusUpgrades.persistent)); - w.spawnEntityInWorld(blast); - w.playSoundAtEntity(blast, "taintedmagic:shard", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F); + TaintedMagic.proxy.spawnLumosParticles(w, shard.posX, shard.posY, shard.posZ, 0); } } p.swingItem(); @@ -91,26 +93,15 @@ public class ItemFocusVisShard extends ItemFocusBasic switch (r) { case 1 : - return new FocusUpgradeType[]{ - FocusUpgradeType.frugal, - FocusUpgradeType.potency }; + return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.potency }; case 2 : - return new FocusUpgradeType[]{ - FocusUpgradeType.frugal, - FocusUpgradeType.potency }; + return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.potency }; case 3 : - return new FocusUpgradeType[]{ - FocusUpgradeType.frugal, - FocusUpgradeType.potency }; + return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.potency }; case 4 : - return new FocusUpgradeType[]{ - FocusUpgradeType.frugal, - FocusUpgradeType.potency }; + return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.potency }; case 5 : - return new FocusUpgradeType[]{ - FocusUpgradeType.frugal, - FocusUpgradeType.potency, - FocusUpgrades.persistent }; + return new FocusUpgradeType[]{ FocusUpgradeType.frugal, FocusUpgradeType.potency, FocusUpgrades.persistent }; } return null; } diff --git a/src/main/java/taintedmagic/common/registry/ResearchRegistry.java b/src/main/java/taintedmagic/common/registry/ResearchRegistry.java index 88f38db..9ba1c35 100644 --- a/src/main/java/taintedmagic/common/registry/ResearchRegistry.java +++ b/src/main/java/taintedmagic/common/registry/ResearchRegistry.java @@ -54,60 +54,55 @@ public class ResearchRegistry new TaintedMagicResearchItem("SHADOWMETAL", TM, new AspectList().add(Aspect.METAL, 1).add(Aspect.DARKNESS, 1).add(Aspect.MAGIC, 1), 0, 1, 0, new ItemStack(BlockRegistry.BlockShadowOre)).setParents("TAINTEDMAGIC").setConcealed().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((CrucibleRecipe) recipes.get("BlockShadowOre")), new ResearchPage(new ItemStack(BlockRegistry.BlockShadowOre)), new ResearchPage((IRecipe) recipes.get("ItemShadowmetalPick")), new ResearchPage((IRecipe) recipes.get("ItemShadowmetalSpade")), new ResearchPage((IRecipe) recipes.get("ItemShadowmetalAxe")), new ResearchPage((IRecipe) recipes.get("ItemShadowmetalHoe")), new ResearchPage((IRecipe) recipes.get("ItemShadowmetalSword")) }).registerResearchItem(); - ThaumcraftApi.addWarpToResearch("SHADOWMETAL", 2); - new TaintedMagicResearchItem("CAP_shadowmetal", TM, new AspectList().add(Aspect.METAL, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4).add(Aspect.MAGIC, 4), -3, 2, 0, new ItemStack(ItemRegistry.ItemWandCap, 1, 0)).setParents(new String[]{ "SHADOWMETAL", "CAP_void", "PRIMPEARL" }).setComplexity(2).setParentsHidden("SHADOWCLOTH").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemWandCap:0")) }).setConcealed().registerResearchItem(); - - ThaumcraftApi.addWarpToResearch("CAPSHADOWMETAL", 5); + ThaumcraftApi.addWarpToResearch("CAP_shadowmetal", 4); new TaintedMagicResearchItem("SHADOWCLOTH", TM, new AspectList().add(Aspect.CLOTH, 1).add(Aspect.DARKNESS, 1), -1, 4, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 1)).setConcealed().setSecondary().setParents(new String[]{ "ENCHFABRIC", "SHADOWMETAL" }).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemMaterial:1")) }).registerResearchItem(); new TaintedMagicResearchItem("ROD_warpwood", TM, new AspectList().add(Aspect.TREE, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4), 8, 0, 0, new ItemStack(ItemRegistry.ItemWandRod, 1, 0)).setParents(new String[]{ "WARPTREE", "VOIDMETAL", "PRIMPEARL", "ROD_primal_staff" }).setParentsHidden("SHADOWMETAL").setConcealed().setComplexity(3).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemWandRod:0")), new ResearchPage("2") }).registerResearchItem(); - ThaumcraftApi.addWarpToResearch("WANDRODWARP", 3); + ThaumcraftApi.addWarpToResearch("ROD_warpwood", 5); new TaintedMagicResearchItem("ROD_warpwood_staff", TM, new AspectList().add(Aspect.TREE, 4).add(Aspect.DARKNESS, 4).add(Aspect.ELDRITCH, 4), 10, -1, 0, new ItemStack(ItemRegistry.ItemWandRod, 1, 1)).setConcealed().setParents("ROD_warpwood").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemWandRod:1")) }).setSecondary().registerResearchItem(); new TaintedMagicResearchItem("EVILSHARDS", TM, new AspectList().add(Aspect.CRYSTAL, 4).add(Aspect.DARKNESS, 4), 4, -1, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 4)).setParents("TAINTEDMAGIC").setConcealed().setSecondary().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((CrucibleRecipe) recipes.get("ItemMaterial:3")), new ResearchPage((CrucibleRecipe) recipes.get("ItemMaterial:4")) }).registerResearchItem(); new TaintedMagicResearchItem("WARPTREE", TM, new AspectList().add(Aspect.ELDRITCH, 4).add(Aspect.DARKNESS, 4).add(Aspect.TAINT, 4).add(Aspect.TREE, 4), 6, -2, 0, new ItemStack(BlockRegistry.BlockWarpwoodSapling)).setParentsHidden("SHADOWMETAL").setParents("EVILSHARDS").setConcealed().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("BlockWarpwoodSapling")), new ResearchPage((IRecipe) recipes.get("BlockWarpwoodPlanks")) }).registerResearchItem(); - ThaumcraftApi.addWarpToResearch("WARPTREE", 3); new TaintedMagicResearchItem("CRIMSONROBES", TM, new AspectList().add(Aspect.CLOTH, 4).add(Aspect.EXCHANGE, 4).add(Aspect.ARMOR, 4), -2, -1, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 2)).setParents("CRYSTALDAGGER").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemMaterial:2")), new ResearchPage((IArcaneRecipe) recipes.get("ItemHelmetCultistRobe")), new ResearchPage((IArcaneRecipe) recipes.get("ItemChestCultistRobe")), new ResearchPage((IArcaneRecipe) recipes.get("ItemLegsCultistRobe")), new ResearchPage((IArcaneRecipe) recipes.get("ItemBootsCultist")) }).setConcealed().registerResearchItem(); new TaintedMagicResearchItem("VOIDFORTRESS", TM, new AspectList().add(Aspect.ARMOR, 5).add(Aspect.ELDRITCH, 3).add(Aspect.DARKNESS, 3).add(Aspect.VOID, 5), 4, -9, 0, new ItemStack(ItemRegistry.ItemVoidFortressHelmet)).setParentsHidden(new String[]{ "ARMORVOIDFORTRESS", "ARMORFORTRESS", }).setParents(new String[]{ "TMELDRITCHMAJOR" }).setConcealed().setSecondary().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemVoidFortressHelmet")), new ResearchPage((InfusionRecipe) recipes.get("ItemVoidFortressChestplate")), new ResearchPage((InfusionRecipe) recipes.get("ItemVoidFortressLeggings")) }).registerResearchItem(); + ThaumcraftApi.addWarpToResearch("VOIDFORTRESS", 2); new TaintedMagicResearchItem("WARPEDGOGGLES", TM, new AspectList().add(Aspect.ARMOR, 4).add(Aspect.ELDRITCH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4), 1, 4, 0, new ItemStack(ItemRegistry.ItemWarpedGoggles)).setParentsHidden(new String[]{ "TAINTEDMAGIC", "GOGGLES", }).setConcealed().setSecondary().setParents("SHADOWMETAL").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemWarpedGoggles")) }).registerResearchItem(); new TaintedMagicResearchItem("TAINTFOCUS", TM, new AspectList().add(Aspect.TAINT, 4).add(Aspect.WATER, 4).add(Aspect.SLIME, 4).add(Aspect.AIR, 4), 9, 4, 0, new ItemStack(ItemRegistry.ItemFocusTaint)).setParentsHidden(new String[]{ "SHADOWMETAL", "INFUSION", "BOTTLETAINT", "FOCUSFIRE", "EVILSHARDS" }).setParents(new String[]{ "TMFOCUSFIRE" }).setConcealed().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFocusTaint")) }).registerResearchItem(); - ThaumcraftApi.addWarpToResearch("TAINTFOCUS", 4); + ThaumcraftApi.addWarpToResearch("TAINTFOCUS", 3); new TaintedMagicResearchItem("ELDRITCHFOCUS", TM, new AspectList().add(Aspect.ELDRITCH, 22).add(Aspect.ENTROPY, 14).add(Aspect.AIR, 4).add(Aspect.DARKNESS, 6), 7, 5, 0, new ItemStack(ItemRegistry.ItemFocusDarkMatter)).setParentsHidden(new String[]{ "OUTERREV" }).setParents(new String[]{ "TMFOCUSFIRE", "TAINTFOCUS", "FOCUSSHARD", "FOCUSLUMOS", "MACEFOCUS", "FOCUSTAINTEDBLAST", "BLOODLUSTUPGRADE" }).setConcealed().setSecondary().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFocusDarkMatter")) }).registerResearchItem(); - ThaumcraftApi.addWarpToResearch("ELDRITCHFOCUS", 2); + ThaumcraftApi.addWarpToResearch("ELDRITCHFOCUS", 7); new TaintedMagicResearchItem("KNIGHTROBES", TM, new AspectList().add(Aspect.CLOTH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4), -4, -2, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 8)).setParentsHidden("ELDRITCHMINOR").setParents("CRIMSONROBES").setConcealed().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemMaterial:8")), new ResearchPage((IArcaneRecipe) recipes.get("ItemHelmetCultistPlate")), new ResearchPage((IArcaneRecipe) recipes.get("ItemChestCultistPlate")), new ResearchPage((IArcaneRecipe) recipes.get("ItemLegsCultistPlate")) }).registerResearchItem(); new TaintedMagicResearchItem("PRAETORARMOR", TM, new AspectList().add(Aspect.CLOTH, 4).add(Aspect.DARKNESS, 4).add(Aspect.ARMOR, 4).add(Aspect.ELDRITCH, 4), -6, 0, 0, ItemApi.getItem("itemHelmetCultistLeaderPlate", 0)).setParents("KNIGHTROBES").setParentsHidden(new String[]{ "CRIMSONROBES", "TMELDRITCHMAJOR", "VOIDMETAL" }).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemHelmetCultistLeaderPlate")), new ResearchPage((InfusionRecipe) recipes.get("ItemChestCultistLeaderPlate")), new ResearchPage((InfusionRecipe) recipes.get("ItemLegsCultistLeaderPlate")) }).setConcealed().registerResearchItem(); new TaintedMagicResearchItem("VOIDSENTBLOOD", TM, new AspectList().add(Aspect.VOID, 14).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 18).add(Aspect.AURA, 4), -7, -1, 0, new ItemStack(ItemRegistry.ItemVoidsentBlood)).setSecondary().setParents("PRAETORARMOR").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((CrucibleRecipe) recipes.get("ItemVoidsentBlood")) }).registerResearchItem(); + ThaumcraftApi.addWarpToResearch("VOIDSENTBLOOD", 1); new TaintedMagicResearchItem("VOIDWALKERBOOTS", TM, new AspectList().add(Aspect.MAGIC, 4).add(Aspect.DARKNESS, 8).add(Aspect.ARMOR, 8).add(Aspect.ELDRITCH, 8), 4, -5, 0, new ItemStack(ItemRegistry.ItemVoidwalkerBoots)).setParentsHidden(new String[]{ "TMELDRITCHMAJOR", "BOOTSTRAVELLER", "EVILSHARDS", "SHADOWCLOTH", "ARMORVOIDFORTRESS" }).setConcealed().setParents(new String[]{ "TMELDRITCHMAJOR" }).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemVoidwalkerBoots")) }).registerResearchItem(); - ThaumcraftApi.addWarpToResearch("VOIDWALKERBOOTS", 3); new TaintedMagicResearchItem("CREATIONSHARD", TM, TaintedMagicHelper.getPrimals(16), 7, -7, 0, new ItemStack(ItemRegistry.ItemMaterial, 1, 5)).setConcealed().setParents("TMELDRITCHMAJOR").setParentsHidden("PRIMPEARL").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemMaterial:5")) }).setSecondary().registerResearchItem(); - ThaumcraftApi.addWarpToResearch("CREATIONSHARD", 5); + ThaumcraftApi.addWarpToResearch("CREATIONSHARD", 9); new TaintedMagicResearchItem("CREATION", TM, new AspectList().add(Aspect.MAGIC, 4), 8, -7, 0, new ResourceLocation("taintedmagic:textures/misc/IconCREATION.png")).setParents("CREATIONSHARD").setConcealed().setRound().setSpecial().setHidden().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage("2"), new ResearchPage("3"), new ResearchPage("4"), new ResearchPage("5") }).registerResearchItem(); - ThaumcraftApi.addWarpToResearch("CREATION", 5); new TaintedMagicResearchItem("FOCUSTIME", TM, new AspectList().add(Aspect.FIRE, 4).add(Aspect.WATER, 8).add(Aspect.EARTH, 4).add(Aspect.AIR, 4).add(Aspect.ORDER, 4).add(Aspect.ENTROPY, 4).add(Aspect.EXCHANGE, 4), 10, -9, 0, new ItemStack(ItemRegistry.ItemFocusTime)).setConcealed().setParents("CREATION").setParentsHidden("FOCUSPORTABLEHOLE", "FOCUSFIRE").setComplexity(3).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFocusTime")) }).setSecondary().registerResearchItem(); - ThaumcraftApi.addWarpToResearch("FOCUSTIME", 3); new TaintedMagicResearchItem("FOCUSWEATHER", TM, new AspectList().add(Aspect.FIRE, 4).add(Aspect.WATER, 8).add(Aspect.EARTH, 4).add(Aspect.AIR, 4).add(Aspect.ORDER, 4).add(Aspect.ENTROPY, 4).add(Aspect.WEATHER, 4), 10, -5, 0, new ItemStack(ItemRegistry.ItemFocusMeteorology)).setParentsHidden(new String[]{ "FOCUSFROST", "FOCUSSHOCK" }).setConcealed().setParents("CREATION").setComplexity(3).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFocusMeteorology")) }).setSecondary().registerResearchItem(); - ThaumcraftApi.addWarpToResearch("FOCUSWEATHER", 3); new TaintedMagicResearchItem("THAUMICDISASSEMBLER", TM, new AspectList().add(Aspect.METAL, 4).add(Aspect.WEAPON, 8).add(Aspect.TOOL, 4), 3, -7, 0, new ItemStack(ItemRegistry.ItemThaumicDisassembler)).setParentsHidden(new String[]{ "THAUMIUM", "VOIDMETAL" }).setConcealed().setParents("TMELDRITCHMAJOR").setComplexity(2).setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemThaumicDisassembler")), new ResearchPage((IArcaneRecipe) recipes.get("ItemMaterial:6")), new ResearchPage("2") }).registerResearchItem(); new TaintedMagicResearchItem("VOIDSASH", TM, new AspectList().add(Aspect.VOID, 4).add(Aspect.METAL, 8).add(Aspect.ARMOR, 4), 7, -4, 0, new ItemStack(ItemRegistry.ItemVoidwalkerSash)).setParentsHidden("PRIMPEARL").setParents("VOIDWALKERBOOTS").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemVoidwalkerSash")) }).setConcealed().setSecondary().registerResearchItem(); + ThaumcraftApi.addWarpToResearch("VOIDSASH", 4); new TaintedMagicResearchItem("MAGICFUNGUAR", TM, new AspectList().add(Aspect.MAGIC, 2).add(Aspect.HUNGER, 4).add(Aspect.PLANT, 2), 3, -3, 0, new ItemStack(ItemRegistry.ItemMagicFunguar)).setSecondary().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((IArcaneRecipe) recipes.get("ItemMagicFunguar")) }).setConcealed().registerResearchItem(); @@ -130,12 +125,13 @@ public class ResearchRegistry ThaumcraftApi.addWarpToResearch("CAPSHADOWCLOTH", 1); new TaintedMagicResearchItem("FOCUSTAINTEDBLAST", TM, new AspectList().add(Aspect.MAGIC, 20).add(Aspect.TAINT, 12).add(Aspect.AIR, 6).add(Aspect.MOTION, 12), 10, 4, 0, new ItemStack(ItemRegistry.ItemFocusTaintedShockwave)).setParentsHidden("FOCUSFIRE", "ELDRITCHMINOR", "FOCUSSHOCK").setConcealed().setParents("TAINTFOCUS").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemFocusTaintedShockwave")) }).setSecondary().registerResearchItem(); - ThaumcraftApi.addWarpToResearch("FOCUSTAINTEDBLAST", 2); + ThaumcraftApi.addWarpToResearch("FOCUSTAINTEDBLAST", 4); new TaintedMagicResearchItem("PRIMALBLADE", TM, new AspectList().add(Aspect.MAGIC, 1).add(Aspect.ELDRITCH, 1).add(Aspect.WEAPON, 1).add(Aspect.VOID, 1).add(Aspect.AURA, 1), 11, -7, 0, new ItemStack(ItemRegistry.ItemPrimordialEdge)).setParentsHidden("VOIDMETAL", "PRIMALCRUSHER", "EVILSHARDS", "CRYSTALDAGGER").setConcealed().setParents("CREATION").setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemPrimordialEdge")) }).registerResearchItem(); ThaumcraftApi.addWarpToResearch("PRIMALBLADE", 4); new TaintedMagicResearchItem("BLOODLUSTUPGRADE", TM, new AspectList().add(Aspect.MAGIC, 4).add(Aspect.HEAL, 8).add(Aspect.WEAPON, 8), 4, 4, 0, new ResourceLocation("taintedmagic:textures/foci/IconBloodlust.png")).setParentsHidden("CRYSTALDAGGER", "FOCALMANIPULATION").setConcealed().setParents("MACEFOCUS").setSecondary().setPages(new ResearchPage[]{ new ResearchPage("1") }).registerResearchItem(); + ThaumcraftApi.addWarpToResearch("BLOODLUSTUPGRADE", 3); new TaintedMagicResearchItem("THAUMIUMKATANA", TM, new AspectList().add(Aspect.METAL, 8).add(Aspect.MAGIC, 4).add(Aspect.WEAPON, 6), 13, 1, 0, new ItemStack(ItemRegistry.ItemKatana, 1, 0)).setParents("TMARMORFORTRESS").setParentsHidden("ARMORFORTRESS").setConcealed().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemKatana:0")) }).registerResearchItem(); @@ -151,7 +147,7 @@ public class ResearchRegistry ThaumcraftApi.addWarpToResearch("INSCRIPTIONTAINT", 2); new TaintedMagicResearchItem("INSCRIPTIONUNDEAD", TM, new AspectList().add(Aspect.HEAL, 8).add(Aspect.UNDEAD, 4).add(Aspect.METAL, 6), 14, 3, 0, new ResourceLocation("taintedmagic:textures/misc/IconINSCRIPTIONUNDEAD.png")).setParents("THAUMIUMKATANA").setParentsHidden("BATHSALTS").setConcealed().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemKatanaThaumium:inscription2")) }).setSecondary().registerResearchItem(); - ThaumcraftApi.addWarpToResearch("INSCRIPTIONUNDEAD", 5); + ThaumcraftApi.addWarpToResearch("INSCRIPTIONUNDEAD", 4); new TaintedMagicResearchItem("VOIDGOGGLES", TM, new AspectList().add(Aspect.VOID, 8).add(Aspect.DARKNESS, 4).add(Aspect.MAGIC, 6).add(Aspect.SENSES, 12).add(Aspect.CRYSTAL, 2), 2, 3, 0, new ItemStack(ItemRegistry.ItemVoidmetalGoggles)).setParents("WARPEDGOGGLES").setParentsHidden("VOIDMETAL").setConcealed().setPages(new ResearchPage[]{ new ResearchPage("1"), new ResearchPage((InfusionRecipe) recipes.get("ItemVoidmetalGoggles")) }).setSecondary().registerResearchItem(); ThaumcraftApi.addWarpToResearch("VOIDGOGGLES", 2);