• 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    wait so then are u still taking requests?
    Posted in: Tutorials
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    Quote from jcm2606

    I thought you mean't readable code, not obfuscated code, but if your wanting to create a gun its really easy, just create a basic entity with similiar code to an arrow, then have your gun item spawn the entity and set the velocity on right click.


    well yes i know that it is quite easy to make a gun but the one they made actually came third dimensional which made it quite interesting thought i didn't really understand how. So i thought you can tell me how it became thir dimensional ._.
    Posted in: Tutorials
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    package HandGun;
    import alf;
    import amr;
    import amu;
    import amw;
    import amx;
    import bh;
    import java.util.List;
    import java.util.Random;
    import jv;
    import ks;
    import lb;
    import ln;
    import qf;
    import qg;
    import tv;
    import xe;
    public class EntityBullet9mm extends lb
    {
      private int xTile = -1;
      private int yTile = -1;
      private int zTile = -1;
      private int inTile = 0;
      private int inData = 0;
      private boolean inGround = false;
      public boolean doesArrowBelongToPlayer = false;
      private double hitPosY = 0.0D;
      public int arrowShake = 0;
      public lb shootingEntity;
      private int ticksInGround;
      private int ticksInAir = 0;
      private double damage = 6.0D;
      private int knockbackStrength;
      public boolean arrowCritical = false;
      public EntityBullet9mm(xe par1World)
      {
        super(par1World);
        a(0.15F, 0.15F);
      }
      public EntityBullet9mm(xe par1World, double par2, double par4, double par6)
      {
        super(par1World);
        a(0.15F, 0.15F);
        b(par2, par4, par6);
        this.M = 0.0F;
      }
      public EntityBullet9mm(xe par1World, ln par2EntityLiving, ln par3EntityLiving, float par4, float par5)
      {
        super(par1World);
        this.shootingEntity = par2EntityLiving;
        this.doesArrowBelongToPlayer = (par2EntityLiving instanceof qg);
        a(0.15F, 0.15F);
        this.u = (par2EntityLiving.u + par2EntityLiving.e() - 0.1000000014901161D);
        double var6 = par3EntityLiving.t - par2EntityLiving.t;
        double var8 = par3EntityLiving.u + par3EntityLiving.e() - 0.699999988079071D - this.u;
        double var10 = par3EntityLiving.v - par2EntityLiving.v;
        double var12 = jv.a(var6 * var6 + var10 * var10);
        if (var12 >= 1.0E-007D)
        {
    	  float var14 = (float)(Math.atan2(var10, var6) * 180.0D / 3.141592653589793D) - 90.0F;
    	  float var15 = (float)(-(Math.atan2(var8, var12) * 180.0D / 3.141592653589793D));
    	  double var16 = var6 / var12;
    	  double var18 = var10 / var12;
    	  b(par2EntityLiving.t + var16, this.u, par2EntityLiving.v + var18, var14, var15);
    	  this.M = 0.0F;
    	  float var20 = (float)var12 * 0.2F;
    	  setArrowHeading(var6, var8 + var20, var10, par4, par5);
        }
      }
      public EntityBullet9mm(xe par1World, ln par2EntityLiving, float par3)
      {
        super(par1World);
        this.shootingEntity = par2EntityLiving;
        this.doesArrowBelongToPlayer = (par2EntityLiving instanceof qg);
        a(0.15F, 0.15F);
        b(par2EntityLiving.t, par2EntityLiving.u + par2EntityLiving.e(), par2EntityLiving.v, par2EntityLiving.z, par2EntityLiving.A);
        this.t -= jv.b(this.z / 180.0F * 3.141593F) * 0.1F;
        this.v -= jv.a(this.z / 180.0F * 3.141593F) * 0.1F;
        b(this.t, this.u, this.v);
        this.M = 0.0F;
        this.w = -jv.a(this.z / 180.0F * 3.141593F) * jv.b(this.A / 180.0F * 3.141593F);
        this.y = jv.b(this.z / 180.0F * 3.141593F) * jv.b(this.A / 180.0F * 3.141593F);
        this.x = -jv.a(this.A / 180.0F * 3.141593F);
        double r = Math.sqrt(this.w * this.w + this.x * this.x + this.y * this.y);
        setArrowHeading(this.w, this.x, this.y, par3 * 1.5F, 0.5F);
      }
      protected void a()
      {
      }
      public void setArrowHeading(double par1, double par3, double par5, float par7, float par8)
      {
        float var9 = jv.a(par1 * par1 + par3 * par3 + par5 * par5);
        par1 /= var9;
        par3 /= var9;
        par5 /= var9;
        par1 += (this.aa.nextGaussian() - 0.5D) * 0.007499999832361937D * par8;
        par3 += (this.aa.nextGaussian() - 0.5D) * 0.007499999832361937D * par8;
        par5 += (this.aa.nextGaussian() - 0.5D) * 0.007499999832361937D * par8;
        par1 *= par7;
        par3 *= par7;
        par5 *= par7;
        this.w = par1;
        this.x = par3;
        this.y = par5;
        float var10 = jv.a(par1 * par1 + par5 * par5);
        this.B = (this.z = (float)(Math.atan2(par1, par5) * 180.0D / 3.141592653589793D));
        this.C = (this.A = (float)(Math.atan2(par3, var10) * 180.0D / 3.141592653589793D));
        this.ticksInGround = 0;
      }
      public void h(double par1, double par3, double par5)
      {
        this.w = par1;
        this.x = par3;
        this.y = par5;
        if ((this.C == 0.0F) && (this.B == 0.0F))
        {
    	  float var7 = jv.a(par1 * par1 + par5 * par5);
    	  this.B = (this.z = (float)(Math.atan2(par1, par5) * 180.0D / 3.141592653589793D));
    	  this.C = (this.A = (float)(Math.atan2(par3, var7) * 180.0D / 3.141592653589793D));
    	  this.C = this.A;
    	  this.B = this.z;
    	  b(this.t, this.u, this.v, this.z, this.A);
    	  this.ticksInGround = 0;
        }
      }
      public void j_()
      {
        super.j_();
        if ((this.C == 0.0F) && (this.B == 0.0F))
        {
    	  float var1 = jv.a(this.w * this.w + this.y * this.y);
    	  this.B = (this.z = (float)(Math.atan2(this.w, this.y) * 180.0D / 3.141592653589793D));
    	  this.C = (this.A = (float)(Math.atan2(this.x, var1) * 180.0D / 3.141592653589793D));
        }
        int var15 = this.p.a(this.xTile, this.yTile, this.zTile);
        if (var15 > 0)
        {
    	  alf.p[var15].a(this.p, this.xTile, this.yTile, this.zTile);
    	  amr var2 = alf.p[var15].e(this.p, this.xTile, this.yTile, this.zTile);
    	  if ((var2 != null) && (var2.a(this.p.R().a(this.t, this.u, this.v))))
    	  {
    	    this.inGround = true;
    	  }
        }
        if (this.arrowShake > 0)
        {
    	  this.arrowShake -= 1;
        }
        if (this.inGround)
        {
    	  var15 = this.p.a(this.xTile, this.yTile, this.zTile);
    	  int var18 = this.p.g(this.xTile, this.yTile, this.zTile);
    	  if ((var15 == this.inTile) && (var18 == this.inData))
    	  {
    	    this.ticksInGround += 1;
    	    if (this.ticksInGround == 1200)
    	    {
    		  x();
    	    }
    	  }
    	  else
    	  {
    	    this.inGround = false;
    	    this.w = (this.aa.nextFloat() - 0.5F) * 0.1F;
    	    this.x = (this.aa.nextFloat() - 0.5F) * 0.05F;
    	    this.y = (this.aa.nextFloat() - 0.5F) * 0.1F;
    	    this.ticksInGround = 0;
    	    this.ticksInAir = 0;
    	  }
        }
        else
        {
    	  this.ticksInAir += 1;
    	  amw var16 = this.p.R().a(this.t, this.u, this.v);
    	  amw var17 = this.p.R().a(this.t + this.w, this.u + this.x, this.v + this.y);
    	  amu var3 = this.p.a(var16, var17, false, true);
    	  var16 = this.p.R().a(this.t, this.u, this.v);
    	  var17 = this.p.R().a(this.t + this.w, this.u + this.x, this.v + this.y);
    	  if (var3 != null)
    	  {
    	    var17 = this.p.R().a(var3.f.c, var3.f.d, var3.f.e);
    	  }
    	  lb var4 = null;
    	  List var5 = this.p.b(this, this.D.a(this.w, this.x, this.y).b(1.0D, 1.0D, 1.0D));
    	  double var6 = 0.0D;
    	  for (int var8 = 0; var8 < var5.size(); var8++)
    	  {
    	    lb var9 = (lb)var5.get(var8);
    	    if ((var9.L()) && ((var9 != this.shootingEntity) || (this.ticksInAir >= 5)))
    	    {
    		  float var10 = 0.3F;
    		  amr var11 = var9.D.b(var10, var10, var10);
    		  amu var12 = var11.a(var16, var17);
    		  if (var12 != null)
    		  {
    		    double var13 = var16.d(var12.f);
    		    if ((var13 < var6) || (var6 == 0.0D))
    		    {
    			  var4 = var9;
    			  var6 = var13;
    		    }
    		  }
    	    }
    	  }
    	  if (var4 != null)
    	  {
    	    var3 = new amu(var4);
    	  }
    	  if (var3 != null)
    	  {
    	    if (var3.g != null)
    	    {
    		  float var19 = jv.a(this.w * this.w + this.x * this.x + this.y * this.y);
    		  int var20 = (int)this.damage;
    		  ks var22 = null;
    		  if (this.shootingEntity != null)
    		    var22 = ks.a(this, this.shootingEntity);
    		  else {
    		    var22 = ks.a(this, this);
    		  }
    		  if (af())
    		  {
    		    var3.g.c(5);
    		  }
    		  if (var3.g.a(var22, var20))
    		  {
    		    if ((var3.g instanceof ln))
    		    {
    			  ((ln)var3.g).bk += 1;
    			  if (this.knockbackStrength > 0)
    			  {
    			    float var21 = jv.a(this.w * this.w + this.y * this.y);
    			    if (var21 > 0.0F)
    			    {
    				  var3.g.g(this.w * this.knockbackStrength * 0.6000000238418579D / var21, 0.1D, this.y * this.knockbackStrength * 0.6000000238418579D / var21);
    			    }
    			  }
    		    }
    		    this.p.a(this, "mob.blaze.hit", 1.0F, 1.2F / (this.aa.nextFloat() * 0.2F + 1.0F));
    		    x();
    		  }
    		  else
    		  {
    		    this.w *= -0.1000000014901161D;
    		    this.x *= -0.1000000014901161D;
    		    this.y *= -0.1000000014901161D;
    		    this.z += 180.0F;
    		    this.B += 180.0F;
    		    this.ticksInAir = 0;
    		  }
    	    }
    	    else
    	    {
    		  this.hitPosY = this.u;
    		  this.xTile = var3.b;
    		  this.yTile = var3.c;
    		  this.zTile = var3.d;
    		  this.inTile = this.p.a(this.xTile, this.yTile, this.zTile);
    		  this.inData = this.p.g(this.xTile, this.yTile, this.zTile);
    		  this.w = (var3.f.c - this.t);
    		  this.x = (var3.f.d - this.u);
    		  this.y = (var3.f.e - this.v);
    		  float var19 = jv.a(this.w * this.w + this.x * this.x + this.y * this.y);
    		  this.t -= this.w / var19 * 0.0500000007450581D;
    		  this.u -= this.x / var19 * 0.0500000007450581D;
    		  this.v -= this.y / var19 * 0.0500000007450581D;
    		  this.p.a(this, "mob.blaze.hit", 1.0F, 1.2F / (this.aa.nextFloat() * 0.2F + 1.0F));
    		  this.inGround = true;
    		  this.arrowShake = 7;
    		  this.arrowCritical = false;
    	    }
    	  }
    	  if (this.arrowCritical)
    	  {
    	    for (var8 = 0; var8 < 4; var8++)
    	    {
    		  this.p.a("crit", this.t + this.w * var8 / 4.0D, this.u + this.x * var8 / 4.0D, this.v + this.y * var8 / 4.0D, -this.w, -this.x + 0.2D, -this.y);
    	    }
    	  }
    	  this.t += this.w;
    	  this.u += this.x;
    	  this.v += this.y;
    	  float var19 = jv.a(this.w * this.w + this.y * this.y);
    	  this.z = (float)(Math.atan2(this.w, this.y) * 180.0D / 3.141592653589793D);
    	  for (this.A = (float)(Math.atan2(this.x, var19) * 180.0D / 3.141592653589793D); this.A - this.C < -180.0F; this.C -= 360.0F);
    	  while (this.A - this.C >= 180.0F)
    	  {
    	    this.C += 360.0F;
    	  }
    	  while (this.z - this.B < -180.0F)
    	  {
    	    this.B -= 360.0F;
    	  }
    	  while (this.z - this.B >= 180.0F)
    	  {
    	    this.B += 360.0F;
    	  }
    	  this.A = (this.C + (this.A - this.C));
    	  this.z = (this.B + (this.z - this.B));
    	  float var23 = 1.0F;
    	  float var10 = 0.05F;
    	  if (H())
    	  {
    	    for (int var25 = 0; var25 < 4; var25++)
    	    {
    		  float var24 = 0.25F;
    		  this.p.a("bubble", this.t - this.w * var24, this.u - this.x * var24, this.v - this.y * var24, this.w, this.x, this.y);
    	    }
    	    var23 = 0.8F;
    	  }
    	  this.w *= var23;
    	  this.x *= var23;
    	  this.y *= var23;
    	  this.x -= var10;
    	  D();
        }
        b(this.t, this.u, this.v);
      }
      public void b(double par1, double par3, double par5)
      {
        this.q = this.t;
        this.r = this.u;
        this.s = this.v;
        this.t = par1;
        this.u = par3;
        this.v = par5;
        float var7 = this.N / 2.0F;
        float var8 = this.O;
        this.D.b(par1 - var7, par3 - this.M + this.W, par5 - var7, par1 + var7, par3 - this.M + this.W + var8, par5 + var7);
      }
      public void b(bh par1NBTTagCompound)
      {
        par1NBTTagCompound.a("xTile", (short)this.xTile);
        par1NBTTagCompound.a("yTile", (short)this.yTile);
        par1NBTTagCompound.a("zTile", (short)this.zTile);
        par1NBTTagCompound.a("inTile", (byte)this.inTile);
        par1NBTTagCompound.a("inData", (byte)this.inData);
        par1NBTTagCompound.a("shake", (byte)this.arrowShake);
        par1NBTTagCompound.a("inGround", (byte)(this.inGround ? 1 : 0));
        par1NBTTagCompound.a("player", this.doesArrowBelongToPlayer);
        par1NBTTagCompound.a("damage", this.damage);
      }
      public void a(bh par1NBTTagCompound)
      {
        this.xTile = par1NBTTagCompound.d("xTile");
        this.yTile = par1NBTTagCompound.d("yTile");
        this.zTile = par1NBTTagCompound.d("zTile");
        this.inTile = (par1NBTTagCompound.c("inTile") & 0xFF);
        this.inData = (par1NBTTagCompound.c("inData") & 0xFF);
        this.arrowShake = (par1NBTTagCompound.c("shake") & 0xFF);
        this.inGround = (par1NBTTagCompound.c("inGround") == 1);
        this.doesArrowBelongToPlayer = par1NBTTagCompound.n("player");
        if (par1NBTTagCompound.b("damage"))
        {
    	  this.damage = par1NBTTagCompound.h("damage");
        }
      }
      public void b_(qg par1EntityPlayer)
      {
        if (!this.p.J)
        {
    	  if ((this.inGround) && (this.doesArrowBelongToPlayer) && (this.arrowShake <= 0) && (par1EntityPlayer.bK.a(new tv(HandGunMod.UsedBullet, 1))))
    	  {
    	    this.p.a(this, "random.pop", 0.2F, ((this.aa.nextFloat() - this.aa.nextFloat()) * 0.7F + 1.0F) * 2.0F);
    	    par1EntityPlayer.a(this, 1);
    	    x();
    	  }
        }
      }
      public float R()
      {
        return 0.0F;
      }
      public void setDamage(double par1)
      {
        this.damage = par1;
      }
      public double getDamage()
      {
        return this.damage;
      }
      public void setKnockbackStrength(int par1)
      {
        this.knockbackStrength = par1;
      }
      public boolean aq()
      {
        return false;
      }
    }



    sorry if the code was long

    mod name:3D handgun mod
    file:enitybullet9mm
    Posted in: Tutorials
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    im just wondering but if i give you coding from another mod can you care to explain it
    Posted in: Tutorials
  • 0

    posted a message on [1.7.x]Touhou Alice's Doll Mod
    im sorry if this is all of a sudden but is it possible if you can teach me how to make A.I. like this i am a beginner for modding.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    is it ok if you can ju
    Quote from jcm2606

    I know exactly what you mean, and I think I may know how to do this, but I don't know whether it would work.

    is it ok for you to just give me an example code
    Posted in: Tutorials
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    sorry that i didn't mention much on one of my old questions but what i meant by a 3d item being held by the player a example of it would be this one
    Posted in: Tutorials
  • 0

    posted a message on [1.5.x] Darkhax's Forge Mod Tutorials [30/03/2013]
    do you know how to make a custom projectile
    Posted in: Tutorials
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    is it posible to put music files into minecraft and play them at a specific event
    Posted in: Tutorials
  • 0

    posted a message on [1.5.x] Darkhax's Forge Mod Tutorials [30/03/2013]
    im not sure if this has been asked yet but is their a way for a item to shoot multiple projectiles at once and also shoot out modded projectiles
    Posted in: Tutorials
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    Quote from jcm2606

    Neutral yes I can... but please explain "attack pattern". I don't quite understand.


    an example of what i mean is kinda like the mutant creeper mod but also a bit more advance.
    Posted in: Tutorials
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    is it possible if you can make a tutorial on how to make mobs neutral and how to add a attack pattern to them
    Posted in: Tutorials
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    ummm sorry for not saying this in the last post but is it possible for you to make a ai move by your command for example commanding it to follow you or something.
    Posted in: Tutorials
  • 0

    posted a message on [1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included
    is it possible for you to make a tutorial on how to create a custom ai mob maybe with a talkable script.

    Also can you make a tutorial on how to import 3D models as tools in the characters had ... if that makes science.

    sorry for my bad english
    Posted in: Tutorials
  • To post a comment, please or register a new account.