diff --git a/build.properties b/build.properties index 0c4df2b..58940f1 100644 --- a/build.properties +++ b/build.properties @@ -1,3 +1,3 @@ -mod_version=r7.5 +mod_version=r7.6 mod_name=Tainted-Magic minecraft_version=1.7.10 \ No newline at end of file diff --git a/src/main/java/taintedmagic/client/ClientProxy.java b/src/main/java/taintedmagic/client/ClientProxy.java index 13e8ae5..dbb6545 100644 --- a/src/main/java/taintedmagic/client/ClientProxy.java +++ b/src/main/java/taintedmagic/client/ClientProxy.java @@ -9,17 +9,19 @@ import net.minecraft.world.World; import net.minecraftforge.client.MinecraftForgeClient; import net.minecraftforge.common.MinecraftForge; import taintedmagic.client.handler.HUDHandler; +import taintedmagic.client.renderer.RenderEntityHomingShard; +import taintedmagic.client.renderer.RenderEntityTaintBubble; import taintedmagic.client.renderer.RenderItemKatana; -import taintedmagic.client.renderer.RenderTaintBubble; import taintedmagic.common.CommonProxy; import taintedmagic.common.entities.EntityEldritchOrbAttack; +import taintedmagic.common.entities.EntityHomingShard; import taintedmagic.common.entities.EntityTaintBubble; import taintedmagic.common.helper.TaintedMagicHelper; -import taintedmagic.common.helper.Vector3; import taintedmagic.common.registry.ItemRegistry; import thaumcraft.client.fx.ParticleEngine; import thaumcraft.client.fx.particles.FXWisp; import thaumcraft.client.renderers.entity.RenderEldritchOrb; +import thaumcraft.codechicken.lib.vec.Vector3; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.ReflectionHelper; @@ -29,8 +31,9 @@ public class ClientProxy extends CommonProxy public void initRenders () { // Entities - RenderingRegistry.registerEntityRenderingHandler(EntityTaintBubble.class, new RenderTaintBubble()); + RenderingRegistry.registerEntityRenderingHandler(EntityTaintBubble.class, new RenderEntityTaintBubble()); RenderingRegistry.registerEntityRenderingHandler(EntityEldritchOrbAttack.class, new RenderEldritchOrb()); + RenderingRegistry.registerEntityRenderingHandler(EntityHomingShard.class, new RenderEntityHomingShard()); // Items MinecraftForgeClient.registerItemRenderer(ItemRegistry.ItemKatana, new RenderItemKatana()); @@ -79,43 +82,4 @@ public class ClientProxy extends CommonProxy } } } - - @Override - public void spawnWindParticles (World w) - { - EntityPlayer p = getClientPlayer(); - Random r = new Random(); - - 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; - - float red = (0.8F + p.worldObj.rand.nextFloat() * 0.5F); - float green = (0.8F + p.worldObj.rand.nextFloat() * 0.5F); - float blue = (0.6F + p.worldObj.rand.nextFloat() * 0.5F); - - FXWisp ef = new FXWisp(w, p.posX + xp + off, p.posY + 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; - - int age = 30 + r.nextInt(50); - - try - { - ReflectionHelper.setPrivateValue(EntityFX.class, ef, age, "particleMaxAge"); - } - catch (Exception e) - { - e.printStackTrace(); - } - Vector3 movement = TaintedMagicHelper.getDistanceBetween(ef, p); - ef.addVelocity(movement.x * 0.5, movement.y * 0.5, movement.z * 0.5); - - ParticleEngine.instance.addEffect(w, ef); - } - } } diff --git a/src/main/java/taintedmagic/client/renderer/RenderEntityHomingShard.java b/src/main/java/taintedmagic/client/renderer/RenderEntityHomingShard.java new file mode 100644 index 0000000..e27b655 --- /dev/null +++ b/src/main/java/taintedmagic/client/renderer/RenderEntityHomingShard.java @@ -0,0 +1,89 @@ +package taintedmagic.client.renderer; + +import java.util.Random; + +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.entity.Render; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.entity.Entity; +import net.minecraft.util.ResourceLocation; + +import org.lwjgl.opengl.GL11; + +import taintedmagic.common.entities.EntityHomingShard; +import thaumcraft.client.fx.ParticleEngine; + +/** + * this class is based off of RenderHomingShard.class created by as + * part of Thaumcraft 5 + */ +public class RenderEntityHomingShard extends Render +{ + public RenderEntityHomingShard () + { + super(); + this.shadowSize = 0.0F; + } + + public void renderEntityAt (EntityHomingShard e, double x, double y, double z, float fq, float pt) + { + Tessellator t = Tessellator.instance; + + GL11.glPushMatrix(); + GL11.glDepthMask(false); + GL11.glEnable(3042); + GL11.glBlendFunc(770, 771); + + bindTexture(ParticleEngine.particleTexture); + + float f2 = (8 + e.ticksExisted % 8) / 16.0F; + float f3 = f2 + 0.0625F; + float f4 = 0.25F; + float f5 = f4 + 0.0625F; + + float f6 = 1.0F; + float f7 = 0.5F; + float f8 = 0.5F; + + GL11.glColor4f(0.405F, 0.075F, 0.525F, 1.0F); + + GL11.glPushMatrix(); + GL11.glTranslated(x, y, z); + GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); + GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); + GL11.glScalef(0.4F + 0.1F * e.getStrength(), 0.4F + 0.1F * e.getStrength(), 0.4F + 0.1F * e.getStrength()); + + t.startDrawingQuads(); + + t.setColorRGBA_F(0.405F, 0.075F, 0.525F, 1.0F); + t.setNormal(0.0F, 1.0F, 0.0F); + t.setBrightness(240); + + t.addVertexWithUV(-f7, -f8, 0.0D, f2, f5); + t.addVertexWithUV(f6 - f7, -f8, 0.0D, f3, f5); + t.addVertexWithUV(f6 - f7, 1.0F - f8, 0.0D, f3, f4); + t.addVertexWithUV(-f7, 1.0F - f8, 0.0D, f2, f4); + + t.draw(); + + GL11.glPopMatrix(); + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glBlendFunc(770, 771); + GL11.glDisable(3042); + GL11.glDisable(32826); + + GL11.glDepthMask(true); + GL11.glPopMatrix(); + } + + public void doRender (Entity e, double x, double y, double z, float f, float pt) + { + renderEntityAt((EntityHomingShard) e, x, y, z, f, pt); + } + + protected ResourceLocation getEntityTexture (Entity e) + { + return TextureMap.locationBlocksTexture; + } +} diff --git a/src/main/java/taintedmagic/client/renderer/RenderTaintBubble.java b/src/main/java/taintedmagic/client/renderer/RenderEntityTaintBubble.java similarity index 94% rename from src/main/java/taintedmagic/client/renderer/RenderTaintBubble.java rename to src/main/java/taintedmagic/client/renderer/RenderEntityTaintBubble.java index d62ebc9..fb2a56c 100644 --- a/src/main/java/taintedmagic/client/renderer/RenderTaintBubble.java +++ b/src/main/java/taintedmagic/client/renderer/RenderEntityTaintBubble.java @@ -12,12 +12,12 @@ import org.lwjgl.opengl.GL11; import taintedmagic.common.entities.EntityTaintBubble; -public class RenderTaintBubble extends Render +public class RenderEntityTaintBubble extends Render { private static final ResourceLocation texture = new ResourceLocation("taintedmagic:textures/entities/EntityTaintBubble.png"); private Random random = new Random(); - public RenderTaintBubble () + public RenderEntityTaintBubble () { this.shadowSize = 0.0F; } @@ -47,7 +47,7 @@ public class RenderTaintBubble extends Render float f7 = 0.5F; float f8 = 0.5F; - float s = 0.5F; + float s = 0.25F; GL11.glScalef(s, s, s); diff --git a/src/main/java/taintedmagic/common/CommonProxy.java b/src/main/java/taintedmagic/common/CommonProxy.java index 3ebcbc9..ab98b55 100644 --- a/src/main/java/taintedmagic/common/CommonProxy.java +++ b/src/main/java/taintedmagic/common/CommonProxy.java @@ -30,8 +30,4 @@ public class CommonProxy public void spawnShockwaveParticles (World w) { } - - public void spawnWindParticles (World w) - { - } } diff --git a/src/main/java/taintedmagic/common/TaintedMagic.java b/src/main/java/taintedmagic/common/TaintedMagic.java index a20a968..379f944 100644 --- a/src/main/java/taintedmagic/common/TaintedMagic.java +++ b/src/main/java/taintedmagic/common/TaintedMagic.java @@ -18,13 +18,13 @@ import taintedmagic.common.handler.ConfigHandler; import taintedmagic.common.handler.TaintedMagicEventHandler; import taintedmagic.common.handler.UpdateHandler; import taintedmagic.common.lib.LibCreativeTab; -import taintedmagic.common.lib.LibRecipes; import taintedmagic.common.lib.LibStrings; import taintedmagic.common.network.PacketHandler; import taintedmagic.common.registry.BlockRegistry; import taintedmagic.common.registry.ItemRegistry; import taintedmagic.common.registry.ModEntityRegistry; import taintedmagic.common.registry.OreDictionaryRegistry; +import taintedmagic.common.registry.RecipeRegistry; import taintedmagic.common.registry.ResearchRegistry; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; @@ -68,7 +68,9 @@ public class TaintedMagic ItemRegistry.init(); BlockRegistry.init(); ModEntityRegistry.init(); - LibRecipes.init(); + RecipeRegistry.init(); + + OreDictionaryRegistry.init(); if (configHandler.useUpdateHandler) UpdateHandler.init(); } @@ -94,7 +96,6 @@ public class TaintedMagic log.info("Almost done... Post-initializing Tainted Magic!"); ResearchRegistry.initResearch(); - OreDictionaryRegistry.init(); log.info("Phew! Tainted Magic has finished loading, enjoy!"); } diff --git a/src/main/java/taintedmagic/common/entities/EntityHomingShard.java b/src/main/java/taintedmagic/common/entities/EntityHomingShard.java new file mode 100644 index 0000000..1be24eb --- /dev/null +++ b/src/main/java/taintedmagic/common/entities/EntityHomingShard.java @@ -0,0 +1,182 @@ +package taintedmagic.common.entities; + +import io.netty.buffer.ByteBuf; + +import java.util.ArrayList; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.projectile.EntityThrowable; +import net.minecraft.util.DamageSource; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; +import net.minecraft.world.World; +import thaumcraft.common.Thaumcraft; +import thaumcraft.common.lib.utils.EntityUtils; +import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +/** + * this class is based off of EntityHomingShard.class created by as + * part of Thaumcraft 5 + */ +public class EntityHomingShard extends EntityThrowable implements IEntityAdditionalSpawnData +{ + Class tClass = null; + boolean persistant = false; + + int targetID = 0; + EntityLivingBase target; + + public EntityHomingShard (World w) + { + super(w); + } + + public EntityHomingShard (World w, EntityLivingBase p, EntityLivingBase t, int strength, boolean b) + { + super(w, p); + this.target = t; + this.tClass = t.getClass(); + this.persistant = b; + setStrength(strength); + Vec3 v = p.getLookVec(); + setLocationAndAngles(p.posX + v.xCoord / 2.0D, p.posY + p.getEyeHeight() + v.yCoord / 2.0D, p.posZ + v.zCoord / 2.0D, p.rotationYaw, p.rotationPitch); + float f = 0.5F; + float ry = p.rotationYaw + (this.rand.nextFloat() - this.rand.nextFloat()) * 60.0F; + float rp = p.rotationPitch + (this.rand.nextFloat() - this.rand.nextFloat()) * 60.0F; + this.motionX = (-MathHelper.sin(ry / 180.0F * (float) Math.PI) * MathHelper.cos(rp / 180.0F * (float) Math.PI) * f); + this.motionZ = (MathHelper.cos(ry / 180.0F * (float) Math.PI) * MathHelper.cos(rp / 180.0F * (float) Math.PI) * f); + this.motionY = (-MathHelper.sin(rp / 180.0F * (float) Math.PI) * f); + } + + @Override + public void entityInit () + { + super.entityInit(); + this.dataWatcher.addObject(17, (byte) 0); + } + + public void setStrength (int str) + { + this.dataWatcher.updateObject(17, Byte.valueOf((byte) str)); + } + + public int getStrength () + { + return this.dataWatcher.getWatchableObjectByte(17); + } + + @Override + protected float getGravityVelocity () + { + return 0.0F; + } + + @Override + public void writeSpawnData (ByteBuf buf) + { + int id = -1; + if (this.target != null) id = this.target.getEntityId(); + buf.writeInt(id); + } + + @Override + public void readSpawnData (ByteBuf buf) + { + int id = buf.readInt(); + try + { + if (id >= 0) this.target = ((EntityLivingBase) this.worldObj.getEntityByID(id)); + } + catch (Exception e) + { + } + } + + @Override + protected void onImpact (MovingObjectPosition mop) + { + if (!this.worldObj.isRemote && mop.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && (getThrower() == null || (getThrower() != null && mop.entityHit != getThrower()))) + { + mop.entityHit.attackEntityFrom(DamageSource.causeIndirectMagicDamage(this, getThrower()), 2.0F + getStrength() * 0.5F); + this.worldObj.playSoundAtEntity(this, "thaumcraft:zap", 1.0F, 1.0F + (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F); + this.worldObj.setEntityState(this, (byte) 16); + setDead(); + } + + if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.worldObj.getBlock(mop.blockX, mop.blockY, mop.blockZ).isOpaqueCube()) + { + this.motionZ *= -0.5D; + this.motionX *= -0.5D; + this.motionY *= -0.5D; + } + } + + @Override + @SideOnly (Side.CLIENT) + public void handleHealthUpdate (byte b) + { + if (b == 16) Thaumcraft.proxy.burst(worldObj, this.posX, this.posY, this.posZ, 0.3F); + else super.handleHealthUpdate(b); + } + + @Override + public void onUpdate () + { + double motion = Math.abs(this.motionX) + Math.abs(this.motionY) + Math.abs(this.motionZ); + if (motion > 0.0D && this.worldObj.isRemote) Thaumcraft.proxy.sparkle((float) this.posX + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.25F, (float) this.posY + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.25F, (float) this.posZ + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.25F, 0.5F, 0, 0.0F); + + super.onUpdate(); + + if (!this.worldObj.isRemote) + { + if (this.persistant && (this.target == null || this.target.isDead || this.target.getDistanceSqToEntity(this) > 1250.0D)) + { + ArrayList ents = EntityUtils.getEntitiesInRange(this.worldObj, this.posX, this.posY, this.posZ, this, this.tClass, 16.0D); + + for (Entity e : ents) + { + if (e instanceof EntityLivingBase && !e.isDead && (getThrower() == null || e.getEntityId() != getThrower().getEntityId())) + { + this.target = ((EntityLivingBase) e); + break; + } + } + } + if (this.target == null || this.target.isDead) + { + this.worldObj.setEntityState(this, (byte) 16); + setDead(); + } + } + + if (this.ticksExisted > 300) + { + this.worldObj.setEntityState(this, (byte) 16); + setDead(); + } + + if (this.ticksExisted % 20 == 0 && this.target != null && !this.target.isDead) + { + double d = getDistanceToEntity(this.target); + double dx = this.target.posX - this.posX; + double dy = this.target.boundingBox.minY + this.target.height * 0.6D - this.posY; + double dz = this.target.posZ - this.posZ; + dx /= d; + dy /= d; + dz /= d; + + this.motionX = dx; + this.motionY = dy; + this.motionZ = dz; + + this.worldObj.playSoundAtEntity(this, "taintedmagic:shard", 0.1F, 2.0F * this.worldObj.rand.nextFloat()); + } + this.motionX *= 0.85D; + this.motionY *= 0.85D; + this.motionZ *= 0.85D; + } +} diff --git a/src/main/java/taintedmagic/common/handler/TaintedMagicEventHandler.java b/src/main/java/taintedmagic/common/handler/TaintedMagicEventHandler.java index a25748b..0e3becf 100644 --- a/src/main/java/taintedmagic/common/handler/TaintedMagicEventHandler.java +++ b/src/main/java/taintedmagic/common/handler/TaintedMagicEventHandler.java @@ -23,7 +23,7 @@ import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import taintedmagic.api.IBloodlust; -import taintedmagic.common.items.wand.ItemFocusMageMace; +import taintedmagic.common.items.wand.foci.ItemFocusMageMace; import taintedmagic.common.registry.ItemRegistry; import thaumcraft.api.ThaumcraftApiHelper; import thaumcraft.api.aspects.Aspect; diff --git a/src/main/java/taintedmagic/common/helper/TaintedMagicHelper.java b/src/main/java/taintedmagic/common/helper/TaintedMagicHelper.java index cac9119..e8da81c 100644 --- a/src/main/java/taintedmagic/common/helper/TaintedMagicHelper.java +++ b/src/main/java/taintedmagic/common/helper/TaintedMagicHelper.java @@ -3,9 +3,11 @@ package taintedmagic.common.helper; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.Vec3; import taintedmagic.api.IBloodlust; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; +import thaumcraft.codechicken.lib.vec.Vector3; public class TaintedMagicHelper { diff --git a/src/main/java/taintedmagic/common/helper/Vector3.java b/src/main/java/taintedmagic/common/helper/Vector3.java deleted file mode 100644 index 7f12830..0000000 --- a/src/main/java/taintedmagic/common/helper/Vector3.java +++ /dev/null @@ -1,297 +0,0 @@ -/** - * This class was created by . It's distributed as - * part of the the Tainted Magic mod. - **/ -package taintedmagic.common.helper; - -import java.math.BigDecimal; -import java.math.MathContext; -import java.math.RoundingMode; - -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.Vec3; - -import org.lwjgl.opengl.GL11; -import org.lwjgl.util.vector.Vector3f; -import org.lwjgl.util.vector.Vector4f; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; - -public class Vector3 -{ - public static Vector3 zero = new Vector3(); - public static Vector3 one = new Vector3(1, 1, 1); - public static Vector3 center = new Vector3(0.5, 0.5, 0.5); - - public double x; - public double y; - public double z; - - public Vector3() { - } - - public Vector3(double d, double d1, double d2) { - x = d; - y = d1; - z = d2; - } - - public Vector3(Vector3 vec) { - x = vec.x; - y = vec.y; - z = vec.z; - } - - public Vector3(Vec3 vec) { - x = vec.xCoord; - y = vec.yCoord; - z = vec.zCoord; - } - - public Vector3 copy() { - return new Vector3(this); - } - - public static Vector3 fromEntity(Entity e) { - return new Vector3(e.posX, e.posY, e.posZ); - } - - public static Vector3 fromEntityCenter(Entity e) { - return new Vector3(e.posX, e.posY - e.yOffset + e.height / 2, e.posZ); - } - - public static Vector3 fromTileEntity(TileEntity e) { - return new Vector3(e.xCoord, e.yCoord, e.zCoord); - } - - public static Vector3 fromTileEntityCenter(TileEntity e) { - return new Vector3(e.xCoord + 0.5, e.yCoord + 0.5, e.zCoord + 0.5); - } - - public Vector3 set(double d, double d1, double d2) { - x = d; - y = d1; - z = d2; - return this; - } - - public Vector3 set(Vector3 vec) { - x = vec.x; - y = vec.y; - z = vec.z; - return this; - } - - public double dotProduct(Vector3 vec) { - double d = vec.x * x + vec.y * y + vec.z * z; - - if(d > 1 && d < 1.00001) - d = 1; - else if(d < -1 && d > -1.00001) - d = -1; - return d; - } - - public double dotProduct(double d, double d1, double d2) { - return d * x + d1 * y + d2 * z; - } - - public Vector3 crossProduct(Vector3 vec) { - double d = y * vec.z - z * vec.y; - double d1 = z * vec.x - x * vec.z; - double d2 = x * vec.y - y * vec.x; - x = d; - y = d1; - z = d2; - return this; - } - - public Vector3 add(double d, double d1, double d2) { - x += d; - y += d1; - z += d2; - return this; - } - - public Vector3 add(Vector3 vec) { - x += vec.x; - y += vec.y; - z += vec.z; - return this; - } - - public Vector3 add(double d) { - return add(d, d, d); - } - - public Vector3 sub(Vector3 vec) { - return subtract(vec); - } - - public Vector3 subtract(Vector3 vec) { - x -= vec.x; - y -= vec.y; - z -= vec.z; - return this; - } - - public Vector3 negate(Vector3 vec) { - x = -x; - y = -y; - z = -z; - return this; - } - - public Vector3 multiply(double d) { - x *= d; - y *= d; - z *= d; - return this; - } - - public Vector3 multiply(Vector3 f) { - x *= f.x; - y *= f.y; - z *= f.z; - return this; - } - - public Vector3 multiply(double fx, double fy, double fz) { - x *= fx; - y *= fy; - z *= fz; - return this; - } - - public double mag() { - return Math.sqrt(x * x + y * y + z * z); - } - - public double magSquared() { - return x * x + y * y + z * z; - } - - public Vector3 normalize() { - double d = mag(); - if(d != 0) - multiply(1 / d); - - return this; - } - - @Override - public String toString() { - MathContext cont = new MathContext(4, RoundingMode.HALF_UP); - return "Vector3(" + new BigDecimal(x, cont) + ", " +new BigDecimal(y, cont) + ", " + new BigDecimal(z, cont) + ")"; - } - - public Vector3 perpendicular() { - if(z == 0) - return zCrossProduct(); - return xCrossProduct(); - } - - public Vector3 xCrossProduct() { - double d = z; - double d1 = -y; - x = 0; - y = d; - z = d1; - return this; - } - - public Vector3 zCrossProduct() { - double d = y; - - double d1 = -x; - x = d; - y = d1; - z = 0; - return this; - } - - public Vector3 yCrossProduct() { - double d = -z; - double d1 = x; - x = d; - y = 0; - z = d1; - return this; - } - - public Vec3 toVec3D() { - return Vec3.createVectorHelper(x, y, z); - } - - public double angle(Vector3 vec) { - return Math.acos(copy().normalize().dotProduct(vec.copy().normalize())); - } - - public boolean isInside(AxisAlignedBB aabb) { - return x >= aabb.minX && y >= aabb.maxY && z >= aabb.minZ && x < aabb.maxX && y < aabb.maxY && z < aabb.maxZ; - } - - public boolean isZero() { - return x == 0 && y == 0 && z == 0; - } - - public boolean isAxial() { - return x == 0 ? y == 0 || z == 0 : y == 0 && z == 0; - } - - @SideOnly(Side.CLIENT) - public Vector3f vector3f() { - return new Vector3f((float)x, (float)y, (float)z); - } - - @SideOnly(Side.CLIENT) - public Vector4f vector4f() { - return new Vector4f((float)x, (float)y, (float)z, 1); - } - - @SideOnly(Side.CLIENT) - public void glVertex() { - GL11.glVertex3d(x, y, z); - } - - public Vector3 negate() { - x = -x; - y = -y; - z = -z; - return this; - } - - public double scalarProject(Vector3 b) { - double l = b.mag(); - return l == 0 ? 0 : dotProduct(b)/l; - } - - public Vector3 project(Vector3 b) { - double l = b.magSquared(); - if(l == 0) { - set(0, 0, 0); - return this; - } - - double m = dotProduct(b)/l; - set(b).multiply(m); - return this; - } - -/* public Vector3 rotate(double angle, Vector3 axis) { - Quat.aroundAxis(axis.copy().normalize(), angle).rotate(this); - return this; - } -*/ - @Override - public boolean equals(Object o) { - if(!(o instanceof Vector3)) - return false; - - Vector3 v = (Vector3)o; - return x == v.x && y == v.y && z == v.z; - } -} \ No newline at end of file diff --git a/src/main/java/taintedmagic/common/items/tools/ItemKatana.java b/src/main/java/taintedmagic/common/items/tools/ItemKatana.java index e9ec580..77ee04d 100644 --- a/src/main/java/taintedmagic/common/items/tools/ItemKatana.java +++ b/src/main/java/taintedmagic/common/items/tools/ItemKatana.java @@ -1,6 +1,7 @@ package taintedmagic.common.items.tools; import java.util.List; +import java.util.Random; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -8,7 +9,6 @@ import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; @@ -19,7 +19,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import net.minecraft.server.MinecraftServer; -import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; @@ -37,16 +36,12 @@ import taintedmagic.client.model.ModelKatana; import taintedmagic.client.model.ModelSaya; import taintedmagic.common.TaintedMagic; import taintedmagic.common.entities.EntityTaintBubble; -import taintedmagic.common.helper.TaintedMagicHelper; -import taintedmagic.common.helper.Vector3; -import taintedmagic.common.network.PacketAttackEntityFromClient; +import taintedmagic.common.network.PacketKatanaAttack; import taintedmagic.common.network.PacketHandler; import thaumcraft.api.IRepairable; import thaumcraft.api.IWarpingGear; -import thaumcraft.api.wands.FocusUpgradeType; -import thaumcraft.common.Thaumcraft; import thaumcraft.common.config.Config; -import thaumcraft.common.entities.projectile.EntityEmber; +import thaumcraft.common.entities.projectile.EntityExplosiveOrb; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -123,7 +118,7 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable } case 2 : { - e.attackEntityFrom(new DamageSource("wind").setMagicDamage().setDamageBypassesArmor(), getAttackDamage(s)); + e.attackEntityFrom(DamageSource.wither.setMagicDamage().setDamageBypassesArmor(), getAttackDamage(s)); try { @@ -234,36 +229,38 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable public void onPlayerStoppedUsing (ItemStack s, World w, EntityPlayer p, int i) { super.onPlayerStoppedUsing(s, w, p, i); + Random r = new Random(); - if (!hasAnyInscription(s) || castType(p) == 0 || p.isSneaking()) + if (!hasAnyInscription(s) || !isFullyCharged(p) || p.isSneaking() || getInscription(s) == 2) { + boolean leech = (getInscription(s) == 2 && isFullyCharged(p)); + boolean b = false; + if (w.isRemote) { MovingObjectPosition mop = Minecraft.getMinecraft().objectMouseOver; float mul = Math.min(1.0F + (float) this.ticksInUse / 40.0F, 2.0F); - if (mop.entityHit != null) PacketHandler.INSTANCE.sendToServer(new PacketAttackEntityFromClient(mop.entityHit, p, this.getAttackDamage(s) * mul)); - + if (mop.entityHit != null) + { + PacketHandler.INSTANCE.sendToServer(new PacketKatanaAttack(mop.entityHit, p, this.getAttackDamage(s) * mul, leech)); + } p.swingItem(); } - p.worldObj.playSoundAtEntity(p, "thaumcraft:swing", 0.5F + (float) Math.random(), 0.5F + (float) Math.random()); + p.worldObj.playSoundAtEntity(p, ("thaumcraft:swing"), 0.5F + (float) Math.random(), 0.5F + (float) Math.random()); } - else if (hasAnyInscription(s) && castType(p) == 1 && !p.isSneaking()) + else if (hasAnyInscription(s) && isFullyCharged(p) && !p.isSneaking()) { switch (getInscription(s)) { case 0 : { - for (int a = 0; a < 50; a++) - { - EntityEmber proj = new EntityEmber(w, p, 5.0F); - proj.posX += proj.motionX; - proj.posY += proj.motionY; - proj.posZ += proj.motionZ; - proj.damage = 10.0F; - w.spawnEntityInWorld(proj); - p.swingItem(); - } + EntityExplosiveOrb proj = new EntityExplosiveOrb(w, p); + proj.posX += proj.motionX; + proj.posY += proj.motionY; + proj.posZ += proj.motionZ; + if (!w.isRemote) w.spawnEntityInWorld(proj); + p.swingItem(); break; } case 1 : @@ -274,45 +271,24 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable proj.posX += proj.motionX; proj.posY += proj.motionY; proj.posZ += proj.motionZ; - proj.damage = 10.0F; - w.spawnEntityInWorld(proj); + proj.damage = getAttackDamage(s) * 0.2F; + if (!w.isRemote) w.spawnEntityInWorld(proj); p.swingItem(); } break; } - case 2 : - { - List ents = w.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(p.posX, p.posY, p.posZ, p.posX + 1, p.posY + 1, p.posZ + 1).expand(5.0D, 5.0D, 5.0D)); - if (ents != null && ents.size() > 0) - { - for (int a = 0; a < ents.size(); a++) - { - EntityLivingBase e = ents.get(a); - - if (e != p && e.isEntityAlive() && !e.isEntityInvulnerable()) - { - double dist = TaintedMagicHelper.getDistanceTo(e.posX, e.posY, e.posZ, p); - if (dist < 2.0D) e.attackEntityFrom(DamageSource.causePlayerDamage(p).setMagicDamage(), 5.0F); - Vector3 movement = TaintedMagicHelper.getDistanceBetween(e, p); - e.addVelocity(movement.x * 3, 0.8, movement.z * 3); - } - } - } - p.worldObj.playSoundAtEntity(p, "taintedmagic:shockwave", 5.0F, 1.0F * (float) Math.random()); - TaintedMagic.proxy.spawnWindParticles(p.worldObj); - p.swingItem(); + default : break; } - } } } - public int castType (EntityPlayer p) + private boolean isFullyCharged (EntityPlayer p) { float f = Math.min((float) this.ticksInUse / 15.0F, 2.0F); - if (f == 2.0F) return 1; - else return 0; + if (f == 2.0F) return true; + else return false; } @SideOnly (Side.CLIENT) diff --git a/src/main/java/taintedmagic/common/items/tools/ItemPrimordialEdge.java b/src/main/java/taintedmagic/common/items/tools/ItemPrimordialEdge.java index 4f840c5..e592198 100644 --- a/src/main/java/taintedmagic/common/items/tools/ItemPrimordialEdge.java +++ b/src/main/java/taintedmagic/common/items/tools/ItemPrimordialEdge.java @@ -39,7 +39,7 @@ public class ItemPrimordialEdge extends ItemSword implements IWarpingGear, IRepa public EnumRarity getRarity (ItemStack s) { - return EnumRarity.epic; + return TaintedMagic.rarityCreation; } public boolean hitEntity (ItemStack s, EntityLivingBase e, EntityLivingBase p) diff --git a/src/main/java/taintedmagic/common/items/wand/ItemFocusEldritch.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusEldritch.java similarity index 98% rename from src/main/java/taintedmagic/common/items/wand/ItemFocusEldritch.java rename to src/main/java/taintedmagic/common/items/wand/foci/ItemFocusEldritch.java index a03332f..9af5403 100644 --- a/src/main/java/taintedmagic/common/items/wand/ItemFocusEldritch.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusEldritch.java @@ -1,4 +1,4 @@ -package taintedmagic.common.items.wand; +package taintedmagic.common.items.wand.foci; import java.util.Random; @@ -63,7 +63,7 @@ public class ItemFocusEldritch extends ItemFocusBasic public String getSortingHelper (ItemStack s) { - return "AM" + super.getSortingHelper(s); + return "ELDRITCH" + super.getSortingHelper(s); } public int getFocusColor (ItemStack s) diff --git a/src/main/java/taintedmagic/common/items/wand/ItemFocusMageMace.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMageMace.java similarity index 97% rename from src/main/java/taintedmagic/common/items/wand/ItemFocusMageMace.java rename to src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMageMace.java index 02dc1a5..38a090f 100644 --- a/src/main/java/taintedmagic/common/items/wand/ItemFocusMageMace.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMageMace.java @@ -1,4 +1,4 @@ -package taintedmagic.common.items.wand; +package taintedmagic.common.items.wand.foci; import java.util.List; @@ -60,7 +60,7 @@ public class ItemFocusMageMace extends ItemFocusBasic public String getSortingHelper (ItemStack s) { - return "MM" + super.getSortingHelper(s); + return "MACE" + super.getSortingHelper(s); } public int getFocusColor (ItemStack s) diff --git a/src/main/java/taintedmagic/common/items/wand/ItemFocusMeteorology.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMeteorology.java similarity index 80% rename from src/main/java/taintedmagic/common/items/wand/ItemFocusMeteorology.java rename to src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMeteorology.java index b3d2b6a..b44f011 100644 --- a/src/main/java/taintedmagic/common/items/wand/ItemFocusMeteorology.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusMeteorology.java @@ -1,33 +1,20 @@ -package taintedmagic.common.items.wand; - -import java.util.Random; +package taintedmagic.common.items.wand.foci; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.command.ICommandManager; -import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; -import net.minecraft.potion.PotionEffect; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.ChunkCoordinates; -import net.minecraft.util.IChatComponent; import net.minecraft.util.IIcon; import net.minecraft.util.MovingObjectPosition; -import net.minecraft.util.Vec3; import net.minecraft.world.World; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import taintedmagic.common.TaintedMagic; -import taintedmagic.common.entities.EntityTaintBubble; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.wands.ItemFocusBasic; -import thaumcraft.common.Thaumcraft; -import thaumcraft.common.config.Config; -import thaumcraft.common.entities.projectile.EntityEmber; import thaumcraft.common.items.wands.ItemWandCasting; import thaumcraft.common.items.wands.WandManager; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; public class ItemFocusMeteorology extends ItemFocusBasic { @@ -55,7 +42,7 @@ public class ItemFocusMeteorology extends ItemFocusBasic public String getSortingHelper (ItemStack s) { - return "WT" + super.getSortingHelper(s); + return "RAIN" + super.getSortingHelper(s); } public int getFocusColor (ItemStack s) @@ -99,6 +86,6 @@ public class ItemFocusMeteorology extends ItemFocusBasic @SideOnly (Side.CLIENT) public EnumRarity getRarity (ItemStack s) { - return EnumRarity.epic; + return TaintedMagic.rarityCreation; } } diff --git a/src/main/java/taintedmagic/common/items/wand/ItemFocusTaint.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaint.java similarity index 96% rename from src/main/java/taintedmagic/common/items/wand/ItemFocusTaint.java rename to src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaint.java index ece88ec..f1e94ad 100644 --- a/src/main/java/taintedmagic/common/items/wand/ItemFocusTaint.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaint.java @@ -1,4 +1,4 @@ -package taintedmagic.common.items.wand; +package taintedmagic.common.items.wand.foci; import java.util.Random; @@ -54,7 +54,7 @@ public class ItemFocusTaint extends ItemFocusBasic public String getSortingHelper (ItemStack s) { - return "BM" + super.getSortingHelper(s); + return "TAINT" + super.getSortingHelper(s); } public int getFocusColor (ItemStack s) @@ -100,7 +100,7 @@ public class ItemFocusTaint extends ItemFocusBasic } int range = 8; Vec3 vec3d = p.getLook(range); - if (!p.worldObj.isRemote && p.ticksExisted % 5 == 0) p.worldObj.playSoundAtEntity(p, "thaumcraft:bubble", 0.33F, 2F * (float)Math.random()); + if (!p.worldObj.isRemote && p.ticksExisted % 5 == 0) p.worldObj.playSoundAtEntity(p, "thaumcraft:bubble", 0.33F, 5.0F * (float) Math.random()); int potency = wand.getFocusPotency(s); if ( (!p.worldObj.isRemote) && (wand.consumeAllVis(s, p, getVisCost(s), true, false))) diff --git a/src/main/java/taintedmagic/common/items/wand/ItemFocusTaintedBlast.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaintedBlast.java similarity index 96% rename from src/main/java/taintedmagic/common/items/wand/ItemFocusTaintedBlast.java rename to src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaintedBlast.java index d36036c..63fb5fb 100644 --- a/src/main/java/taintedmagic/common/items/wand/ItemFocusTaintedBlast.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTaintedBlast.java @@ -1,9 +1,8 @@ -package taintedmagic.common.items.wand; +package taintedmagic.common.items.wand.foci; import java.util.List; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -16,11 +15,11 @@ import net.minecraft.util.StatCollector; import net.minecraft.world.World; import taintedmagic.common.TaintedMagic; import taintedmagic.common.helper.TaintedMagicHelper; -import taintedmagic.common.helper.Vector3; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.wands.FocusUpgradeType; import thaumcraft.api.wands.ItemFocusBasic; +import thaumcraft.codechicken.lib.vec.Vector3; import thaumcraft.common.items.wands.ItemWandCasting; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -58,7 +57,7 @@ public class ItemFocusTaintedBlast extends ItemFocusBasic public String getSortingHelper (ItemStack s) { - return "TB" + super.getSortingHelper(s); + return "SHOCKWAVE" + super.getSortingHelper(s); } public int getFocusColor (ItemStack s) diff --git a/src/main/java/taintedmagic/common/items/wand/ItemFocusTime.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTime.java similarity index 89% rename from src/main/java/taintedmagic/common/items/wand/ItemFocusTime.java rename to src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTime.java index c58503d..5cb8580 100644 --- a/src/main/java/taintedmagic/common/items/wand/ItemFocusTime.java +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusTime.java @@ -1,4 +1,4 @@ -package taintedmagic.common.items.wand; +package taintedmagic.common.items.wand.foci; import java.awt.Color; @@ -13,7 +13,6 @@ import taintedmagic.common.TaintedMagic; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; import thaumcraft.api.wands.ItemFocusBasic; -import thaumcraft.common.Thaumcraft; import thaumcraft.common.items.wands.ItemWandCasting; import thaumcraft.common.items.wands.WandManager; import cpw.mods.fml.relauncher.Side; @@ -45,7 +44,7 @@ public class ItemFocusTime extends ItemFocusBasic public String getSortingHelper (ItemStack s) { - return "TI" + super.getSortingHelper(s); + return "TIME" + super.getSortingHelper(s); } public int getFocusColor (ItemStack s) @@ -79,11 +78,11 @@ public class ItemFocusTime extends ItemFocusBasic WandManager.setCooldown(p, 30000); ItemWandCasting wand = (ItemWandCasting) s.getItem(); - wand.consumeAllVis(s, p, getVisCost(s), true, false); - - w.setWorldTime(w.isDaytime() ? 14000 : 0); - - p.playSound("thaumcraft:wand", 0.5F, 1.0F); + if (wand.consumeAllVis(s, p, getVisCost(s), true, false)) + { + w.setWorldTime(w.isDaytime() ? 14000 : 0); + p.playSound("thaumcraft:wand", 0.5F, 1.0F); + } return s; } @@ -97,6 +96,6 @@ public class ItemFocusTime extends ItemFocusBasic @SideOnly (Side.CLIENT) public EnumRarity getRarity (ItemStack s) { - return EnumRarity.epic; + return TaintedMagic.rarityCreation; } } diff --git a/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusVisShard.java b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusVisShard.java new file mode 100644 index 0000000..a1bc878 --- /dev/null +++ b/src/main/java/taintedmagic/common/items/wand/foci/ItemFocusVisShard.java @@ -0,0 +1,116 @@ +package taintedmagic.common.items.wand.foci; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import taintedmagic.common.TaintedMagic; +import taintedmagic.common.entities.EntityHomingShard; +import thaumcraft.api.aspects.Aspect; +import thaumcraft.api.aspects.AspectList; +import thaumcraft.api.wands.FocusUpgradeType; +import thaumcraft.api.wands.ItemFocusBasic; +import thaumcraft.common.items.wands.ItemWandCasting; +import thaumcraft.common.lib.utils.EntityUtils; + +/** + * this class is based off of ItemFocusShard.class created by as part + * of Thaumcraft 5 + */ +public class ItemFocusVisShard extends ItemFocusBasic +{ + private static final AspectList cost = new AspectList().add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1).add(Aspect.AIR, 1); + private static final AspectList costPersistant = new AspectList().add(Aspect.FIRE, 1).add(Aspect.ENTROPY, 1).add(Aspect.WATER, 1).add(Aspect.AIR, 1); + + public static FocusUpgradeType persistant = new FocusUpgradeType(69, new ResourceLocation("taintedmagic:textures/foci/IconPersistant.png"), "focus.upgrade.persistant.name", "focus.upgrade.persistant.text", new AspectList().add(Aspect.ARMOR, 1).add(Aspect.MOTION, 1).add(Aspect.ENERGY, 1)); + + public ItemFocusVisShard () + { + this.setCreativeTab(TaintedMagic.tabTaintedMagic); + this.setUnlocalizedName("ItemFocusVisShard"); + } + + @SideOnly (Side.CLIENT) + public void registerIcons (IIconRegister ir) + { + this.icon = ir.registerIcon("taintedmagic:ItemFocusVisShard"); + } + + public String getSortingHelper (ItemStack s) + { + return "SHARD" + super.getSortingHelper(s); + } + + public int getFocusColor (ItemStack s) + { + return 10037693; + } + + public int getActivationCooldown (ItemStack s) + { + return 300; + } + + public ItemFocusBasic.WandFocusAnimation getAnimation (ItemStack s) + { + return ItemFocusBasic.WandFocusAnimation.WAVE; + } + + public ItemStack onFocusRightClick (ItemStack s, World w, EntityPlayer p, MovingObjectPosition mop) + { + ItemWandCasting wand = (ItemWandCasting) s.getItem(); + + Entity look = EntityUtils.getPointedEntity(p.worldObj, p, 0.0D, 32.0D, 1.1F); + if (look != null && look instanceof EntityLivingBase) + { + if (!w.isRemote) + { + EntityHomingShard blast = new EntityHomingShard(w, p, (EntityLivingBase) look, wand.getFocusPotency(s), isUpgradedWith(wand.getFocusItem(s), persistant)); + w.spawnEntityInWorld(blast); + w.playSoundAtEntity(blast, "taintedmagic:shard", 0.3F, 1.1F + w.rand.nextFloat() * 0.1F); + } + p.swingItem(); + } + return s; + } + + public AspectList getVisCost (ItemStack s) + { + return isUpgradedWith(s, persistant) ? costPersistant : cost; + } + + public FocusUpgradeType[] getPossibleUpgradesByRank (ItemStack s, int r) + { + switch (r) + { + case 1 : + return new FocusUpgradeType[]{ + FocusUpgradeType.frugal, + FocusUpgradeType.potency }; + case 2 : + return new FocusUpgradeType[]{ + FocusUpgradeType.frugal, + FocusUpgradeType.potency }; + case 3 : + return new FocusUpgradeType[]{ + FocusUpgradeType.frugal, + FocusUpgradeType.potency }; + case 4 : + return new FocusUpgradeType[]{ + FocusUpgradeType.frugal, + FocusUpgradeType.potency }; + case 5 : + return new FocusUpgradeType[]{ + FocusUpgradeType.frugal, + FocusUpgradeType.potency, + persistant }; + } + return null; + } +} diff --git a/src/main/java/taintedmagic/common/lib/LibStrings.java b/src/main/java/taintedmagic/common/lib/LibStrings.java index 6c2c632..0793cb2 100644 --- a/src/main/java/taintedmagic/common/lib/LibStrings.java +++ b/src/main/java/taintedmagic/common/lib/LibStrings.java @@ -4,6 +4,6 @@ public class LibStrings { public static final String MODID = "TaintedMagic"; public static final String NAME = "Tainted Magic"; - public static final String VERSION = "r7.5"; + public static final String VERSION = "r7.6"; public static final String DEPENDENCIES = "required-after:Forge@[10.13.2.1291,);required-after:Thaumcraft@[4.2.3.5,);after:ThaumicTinkerer"; } diff --git a/src/main/java/taintedmagic/common/network/PacketHandler.java b/src/main/java/taintedmagic/common/network/PacketHandler.java index c642f4e..d55bce3 100644 --- a/src/main/java/taintedmagic/common/network/PacketHandler.java +++ b/src/main/java/taintedmagic/common/network/PacketHandler.java @@ -12,6 +12,6 @@ public class PacketHandler public static void init () { int i = 0; - INSTANCE.registerMessage(PacketAttackEntityFromClient.class, PacketAttackEntityFromClient.class, i++, Side.SERVER); + INSTANCE.registerMessage(PacketKatanaAttack.class, PacketKatanaAttack.class, i++, Side.SERVER); } } diff --git a/src/main/java/taintedmagic/common/network/PacketAttackEntityFromClient.java b/src/main/java/taintedmagic/common/network/PacketKatanaAttack.java similarity index 71% rename from src/main/java/taintedmagic/common/network/PacketAttackEntityFromClient.java rename to src/main/java/taintedmagic/common/network/PacketKatanaAttack.java index 5a86765..41a2ebf 100644 --- a/src/main/java/taintedmagic/common/network/PacketAttackEntityFromClient.java +++ b/src/main/java/taintedmagic/common/network/PacketKatanaAttack.java @@ -11,27 +11,29 @@ import cpw.mods.fml.common.network.simpleimpl.IMessage; import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; import cpw.mods.fml.common.network.simpleimpl.MessageContext; -public class PacketAttackEntityFromClient implements IMessage, IMessageHandler +public class PacketKatanaAttack implements IMessage, IMessageHandler { private int entityID; private int playerID; private int dimensionID; private float dmg; + private boolean leech; - public PacketAttackEntityFromClient () + public PacketKatanaAttack () { } - public PacketAttackEntityFromClient (Entity e, EntityPlayer p, float dmg) + public PacketKatanaAttack (Entity e, EntityPlayer p, float dmg, boolean leech) { this.entityID = e.getEntityId(); this.playerID = p.getEntityId(); this.dimensionID = e.dimension; this.dmg = dmg; + this.leech = leech; } @Override - public IMessage onMessage (PacketAttackEntityFromClient message, MessageContext ctx) + public IMessage onMessage (PacketKatanaAttack message, MessageContext ctx) { World w = DimensionManager.getWorld(message.dimensionID); if (w == null) return null; @@ -41,6 +43,12 @@ public class PacketAttackEntityFromClient implements IMessage, IMessageHandler

Since the wood is imbued with warp, you think it's only logical to use a Zombie Brain as a place to store the insanity. And, Using the power of the Primordial Pearl as the core of this rod, the power is immense.
The wood is also extremely dense, making it able to store huge amounts of vis - 250 of each, that is.
(Continued) -tm.text.ROD_warpwood.2=It would also seem that the warp stored within the rod reacts with your own warp, causing it to recharge itself. The more warp you amass, the greater the reaction, and the faster it seems to recharge. Due to this process being fueled by the Primordial Pearl, the influx of vis would put any other core to shame.
Seeing as it wards off all warp, The Warp Ward buff seems to negate the reaction completely.

§oToday my wand started whispering strangely to me. As my insane mind grows stronger, the more my wand reveals to me... +tm.text.ROD_warpwood.2=It would also seem that the warp stored within the rod festers off of your own, creating vis as a byproduct and quickly filling up your wand. The more warp you amass, the greater the reaction, and the faster the wand will recharge itself. Due to this process being fueled by the Primordial Pearl, the influx of vis would put any other core to shame.
Seeing as it wards off all warp, The Warp Ward buff seems to negate the reaction completely.

§oToday my wand started whispering strangely to me. As my insane mind grows stronger, the more my wand reveals to me... #ROD_warpwood_staff @@ -374,7 +378,7 @@ tm.text.SHADOWMETALKATANA.1=After having discovered Shadowmetal Fortress Armor, tm.name.INSCRIPTIONFIRE=Volcanic Inscription tm.tag.INSCRIPTIONFIRE=Thaumium Fortress Blade upgrade -tm.text.INSCRIPTIONFIRE.1=You have upgraded your Fortress Blade by inscribing runes upon it.
This inscription will convert damage dealt into fire damage, which will bypass armor. Any target hit will be set aflame.
Furthermore, when releasing a fully charged strike, a cloud of fire will be emit from your blade. One would hold down shift to cancel this effect and release a normal strike. +tm.text.INSCRIPTIONFIRE.1=You have upgraded your Fortress Blade by inscribing runes upon it.
This inscription will convert damage dealt into fire damage, which will bypass armor. Any target hit will be set aflame.
Furthermore, when releasing a fully charged strike, an explosive fireball will be emit from your blade. One would hold down shift to cancel this effect and release a normal strike. #INSCRIPTIONTAINT @@ -382,14 +386,19 @@ tm.name.INSCRIPTIONTAINT=Tainted Inscription tm.tag.INSCRIPTIONTAINT=Thaumium Fortress Blade upgrade tm.text.INSCRIPTIONTAINT.1=You have upgraded your Fortress Blade by inscribing runes upon it.
This inscription will cause your blade to deal magic damage, bypassing armor. Anything you hit will also be inflicted with Taint Poison.
Moreover, if you release a fully charged strike, a cloud of taint will be emit from your blade. One would hold down shift to cancel this effect and release a normal strike. -#INSCRIPTIONWIND +#INSCRIPTIONUNDEAD -tm.name.INSCRIPTIONWIND=Stormbound Inscription -tm.tag.INSCRIPTIONWIND=Thaumium Fortress Blade upgrade -tm.text.INSCRIPTIONWIND.1=You have upgraded your Fortress Blade by inscribing runes upon it.
This inscription will allow you to deal wind damage, which bypasses armor. Your target will also gain a withering effect.
Incidentally, when releasing a fully charged strike, a burst of charged air will be shot in all directions, knocking back and damaging all nearby enemies. One would hold down shift to cancel this effect and release a normal strike. +tm.name.INSCRIPTIONUNDEAD=Undead Inscription +tm.tag.INSCRIPTIONUNDEAD=Thaumium Fortress Blade upgrade +tm.text.INSCRIPTIONUNDEAD.1=You have upgraded your Fortress Blade by inscribing runes upon it.
This inscription inscribes a formula to deal withering damage, which bypasses armor. Your target will also be inflicted a withering damage over time.
In addition, when releasing a fully charged strike on a target, you will be healed for 25% of damage dealt. #VOIDGOGGLES tm.name.VOIDGOGGLES=Voidmetal Goggles of Revealing tm.tag.VOIDGOGGLES=Who needs 20/20 vision anyway? -tm.text.VOIDGOGGLES.1=By infusing your Warped Goggles of Revealing with Voidmetal, you have created a pair of goggles that repair themselves, and have an extremely high vis discount.
Sadly, they offer inferior protection to the original Warped Goggles of Revealing.
Your vision might become distorted and warped while wearing these goggles, but that's okay...warp is not a bad thing, right? \ No newline at end of file +tm.text.VOIDGOGGLES.1=By infusing your Warped Goggles of Revealing with Voidmetal, you have created a pair of goggles that repair themselves, and have an extremely high vis discount.
Sadly, they offer inferior protection to the original Warped Goggles of Revealing.
Your vision might become distorted and warped while wearing these goggles, but that's okay...warp is not a bad thing, right? + +#FOCUSSHARD +tm.name.FOCUSSHARD=Wand Focus: Vis Shard +tm.tag.FOCUSSHARD=Blip bloop +tm.text.FOCUSSHARD.1=With the study of different types of shards, an incredible idea dawned upon you: what if you could animate a vis shard to be used in combat?
This focus can only be cast if you are looking at an enemy. The shard will float through the air, homing in on its target, and will burst on contact.
It would seem that the shard will also bounce off of solid blocks. \ No newline at end of file diff --git a/src/main/resources/assets/taintedmagic/sounds.json b/src/main/resources/assets/taintedmagic/sounds.json index f235369..d4518b0 100644 --- a/src/main/resources/assets/taintedmagic/sounds.json +++ b/src/main/resources/assets/taintedmagic/sounds.json @@ -1,3 +1,4 @@ { - "shockwave": {"category": "master","sounds": [{"name": "shockwave","stream": false}]} + "shockwave": {"category": "master","sounds": [{"name": "shockwave","stream": false}]}, + "shard": {"category": "master","sounds": [{"name": "shard","stream": false}]} } \ No newline at end of file diff --git a/src/main/resources/assets/taintedmagic/sounds/shard.ogg b/src/main/resources/assets/taintedmagic/sounds/shard.ogg new file mode 100644 index 0000000..4e50663 Binary files /dev/null and b/src/main/resources/assets/taintedmagic/sounds/shard.ogg differ diff --git a/src/main/resources/assets/taintedmagic/textures/blocks/BlockShadowmetal.png b/src/main/resources/assets/taintedmagic/textures/blocks/BlockShadowmetal.png index 3791b0e..df0ffff 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/blocks/BlockShadowmetal.png and b/src/main/resources/assets/taintedmagic/textures/blocks/BlockShadowmetal.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/foci/IconPersistant.png b/src/main/resources/assets/taintedmagic/textures/foci/IconPersistant.png new file mode 100644 index 0000000..60c0feb Binary files /dev/null and b/src/main/resources/assets/taintedmagic/textures/foci/IconPersistant.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemCrystalDagger.png b/src/main/resources/assets/taintedmagic/textures/items/ItemCrystalDagger.png index a644377..2199e46 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/items/ItemCrystalDagger.png and b/src/main/resources/assets/taintedmagic/textures/items/ItemCrystalDagger.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemFocusMageMace.png b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusMageMace.png index d0578a3..850ef69 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/items/ItemFocusMageMace.png and b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusMageMace.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemFocusMeteorology.png b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusMeteorology.png index 10376f8..3c3d0b3 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/items/ItemFocusMeteorology.png and b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusMeteorology.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemFocusTaint.png b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusTaint.png index 6548b0f..7258ee3 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/items/ItemFocusTaint.png and b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusTaint.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemFocusVisShard.png b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusVisShard.png new file mode 100644 index 0000000..e72fcaa Binary files /dev/null and b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusVisShard.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemFocusVisShard.png.mcmeta b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusVisShard.png.mcmeta new file mode 100644 index 0000000..4f0718a --- /dev/null +++ b/src/main/resources/assets/taintedmagic/textures/items/ItemFocusVisShard.png.mcmeta @@ -0,0 +1,3 @@ +{ + "animation": {} +} \ No newline at end of file diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial2.png b/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial2.png index fb88287..806422b 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial2.png and b/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial2.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial4.png b/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial4.png index e181aa6..032ad9d 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial4.png and b/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial4.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial6.png b/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial6.png index 4343796..3b6e82f 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial6.png and b/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial6.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial8.png b/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial8.png index fedcafa..d0c92aa 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial8.png and b/src/main/resources/assets/taintedmagic/textures/items/ItemMaterial8.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/items/ItemWandCap0.png b/src/main/resources/assets/taintedmagic/textures/items/ItemWandCap0.png index aca6ab1..17e5777 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/items/ItemWandCap0.png and b/src/main/resources/assets/taintedmagic/textures/items/ItemWandCap0.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONFIRE.png b/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONFIRE.png index afdbb40..ccc34ab 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONFIRE.png and b/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONFIRE.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONTAINT.png b/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONTAINT.png index 58034dc..d8ca6f1 100644 Binary files a/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONTAINT.png and b/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONTAINT.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONUNDEAD.png b/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONUNDEAD.png new file mode 100644 index 0000000..a644a50 Binary files /dev/null and b/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONUNDEAD.png differ diff --git a/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONWIND.png b/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONWIND.png deleted file mode 100644 index 6ba8277..0000000 Binary files a/src/main/resources/assets/taintedmagic/textures/misc/IconINSCRIPTIONWIND.png and /dev/null differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index d936b89..1676bfd 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "TaintedMagic", "name": "Tainted Magic", "description": "A TC4 addon that brings you to the dark side of Thaumaturgy...", - "version": "r7.5", + "version": "r7.6", "mcversion": "1.7.10", "url": "http://bitly.com/1HV2VSK", "updateUrl": "", diff --git a/version.txt b/version.txt index 81ad780..bc604d5 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -r7.5 \ No newline at end of file +r7.6 \ No newline at end of file