• 0

    posted a message on Why is my custom arrow invisible?
    Quote from RibShark

    Hmm... this may seem strange, it may not even work, and you should certainly delete this once ModLoader has updated, but can you try replacing
    public class EntityDarkArrow extends EntityArrow
    with
    public class EntityDarkArrow extends Entity implements IAnimals

    That just crashes the game.

          Minecraft has crashed!      
          ----------------------      
    
    Minecraft has stopped running because it encountered a problem; Exception in server tick loop
    This error has been saved to J:\MCP 1.3\jars\.\crash-reports\crash-2012-08-09_10.02.51-server.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
    
    
    
    --- BEGIN ERROR REPORT 4019b88 --------
    Generated 8/9/12 10:03 AM
    
    - Minecraft Version: 1.3.1
    - Operating System: Windows Vista (amd64) version 6.0
    - Java Version: 1.7.0_02, Oracle Corporation
    - Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    - Memory: 968694224 bytes (923 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    - JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    - ModLoader: Mods loaded: 3
    ModLoader 1.3.1
    mod_ModLoaderMp 1.3.1v1
    mod_Scoaleton 1.2.5
    
    - Type: Integrated Server
    - Is Modded: Unknown (can't tell)
    - Profiler Position: N/A (disabled)
    - Player Count: 1 / 8; [EntityPlayerMP['Player620'/121, l='New World', x=376.17, y=12.38, z=992.51]]
    - World New World Entities: 0 total; []
    - World New World Players: 0 total; []
    - World New World Chunk Stats: ServerChunkCache: 0 Drop: 0
    
    java.lang.ClassCastException: net.minecraft.src.EntityDarkArrow cannot be cast to net.minecraft.src.EntityLiving
    at net.minecraft.src.EntityTrackerEntry.getPacketForThisEntity(EntityTrackerEntry.java:477)
    at net.minecraft.src.EntityTrackerEntry.tryStartWachingThis(EntityTrackerEntry.java:250)
    at net.minecraft.src.EntityTrackerEntry.sendEventsToPlayers(EntityTrackerEntry.java:319)
    at net.minecraft.src.EntityTrackerEntry.sendLocationToAllClients(EntityTrackerEntry.java:80)
    at net.minecraft.src.EntityTracker.processOutstandingEntries(EntityTracker.java:185)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:628)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:555)
    at net.minecraft.src.IntegratedServer.tick(IntegratedServer.java:122)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:464)
    at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:17)
    --- END ERROR REPORT 3cd62eff ----------

    And also (this has nothing to do with the arrow problem but someone can help if they want), I tried making a new bow for the dark arrows since I didn't want compatibility problems, and it didn't work at all. When you right click it just gets stuck on the last texture until you close Minecraft. Plus the player model doesn't look like it's holding a bow at all, it's just holding it in one hand. I at least made it look a little better by doing this:

    public boolean isFull3D()
        {
         return true;
        }


    But it still doesn't act like a normal bow at all. Here's a video of it:

    Posted in: Modification Development
  • 0

    posted a message on Need someone to make item art
    Does this work? It's the best I could do:
    Posted in: Modification Development
  • 0

    posted a message on Why is my custom arrow invisible?
    Quote from Dealman

    Finally someone that uploaded a Video to show what's going on, it makes things so much easier!

    So let me see if I got this right, you've made a custom bow to use with your Dark Arrow, correct? And when you use these 2 Custom Items together, the Arrow is not rendered - but when you use the regular bow, the arrow is rendered?

    What happens if you try to use normal arrows with your custom bow? Same thing?

    Also, posting the code for your custom bow would be utmost helpful. :)
    I didn't make a custom bow. I'm saying my custom arrow texture worked fine with the normal bow, but not with the dark arrow itself.

    Quote from RibShark

    It's because ModLoader hasn't been fully updated yet.

    You can try replacing
    public class EntityDarkArrow extends Entity
    with
    public class EntityDarkArrow extends EntityArrow
    but then you may have to add a few extra methods to make it work the way you want (but then again, you may not).
    Whoa, that actually sorta worked. Except it doesn't have the right texture and almost every time I shoot it it ends up hitting me. Here's a video:


    Here's my code even though almost nothing is different:

    package net.minecraft.src;
    
    import java.util.Iterator;
    import java.util.List;
    
    public class EntityDarkArrow extends EntityArrow
    {
    private int xTile = -1;
    private int yTile = -1;
    private int zTile = -1;
    private int inTile = 0;
    private int inData = 0;
    private boolean inGround = false;
    
    /** 1 if the player can pick up the arrow */
    public int canBePickedUp = 0;
    
    /** Seems to be some sort of timer for animating an arrow. */
    public int arrowShake = 0;
    
    /** The owner of this arrow. */
    public Entity shootingEntity;
    private int ticksInGround;
    private int ticksInAir = 0;
    private double damage = 4.0D;
    
    /** The amount of knockback an arrow applies when it hits a mob. */
    private int knockbackStrength;
    
    public EntityDarkArrow(World par1World)
    {
    super(par1World);
    this.setSize(0.5F, 0.5F);
    }
    
    public EntityDarkArrow(World par1World, double par2, double par4, double par6)
    {
    super(par1World);
    this.setSize(0.5F, 0.5F);
    this.setPosition(par2, par4, par6);
    this.yOffset = 0.0F;
    }
    
    public EntityDarkArrow(World par1World, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving, float par4, float par5)
    {
    super(par1World);
    this.shootingEntity = par2EntityLiving;
    
    if (par2EntityLiving instanceof EntityPlayer)
    {
    this.canBePickedUp = 1;
    }
    
    this.posY = par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight() - 0.10000000149011612D;
    double var6 = par3EntityLiving.posX - par2EntityLiving.posX;
    double var8 = par3EntityLiving.posY + (double)par3EntityLiving.getEyeHeight() - 0.699999988079071D - this.posY;
    double var10 = par3EntityLiving.posZ - par2EntityLiving.posZ;
    double var12 = (double)MathHelper.sqrt_double(var6 * var6 + var10 * var10);
    
    if (var12 >= 1.0E-7D)
    {
    float var14 = (float)(Math.atan2(var10, var6) * 180.0D / Math.PI) - 90.0F;
    float var15 = (float)(-(Math.atan2(var8, var12) * 180.0D / Math.PI));
    double var16 = var6 / var12;
    double var18 = var10 / var12;
    this.setLocationAndAngles(par2EntityLiving.posX + var16, this.posY, par2EntityLiving.posZ + var18, var14, var15);
    this.yOffset = 0.0F;
    float var20 = (float)var12 * 0.2F;
    this.setArrowHeading(var6, var8 + (double)var20, var10, par4, par5);
    }
    }
    
    public EntityDarkArrow(World par1World, EntityLiving par2EntityLiving, float par3)
    {
    super(par1World);
    this.shootingEntity = par2EntityLiving;
    
    if (par2EntityLiving instanceof EntityPlayer)
    {
    this.canBePickedUp = 1;
    }
    
    this.setSize(0.5F, 0.5F);
    this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch);
    this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
    this.posY -= 0.10000000149011612D;
    this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
    this.setPosition(this.posX, this.posY, this.posZ);
    this.yOffset = 0.0F;
    this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
    this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
    this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
    this.setArrowHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F);
    }
    
    protected void entityInit()
    {
    this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
    }
    
    /**
    * Uses the provided coordinates as a heading and determines the velocity from it with the set force and random
    * variance. Args: x, y, z, force, forceVariation
    */
    public void setArrowHeading(double par1, double par3, double par5, float par7, float par8)
    {
    float var9 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5);
    par1 /= (double)var9;
    par3 /= (double)var9;
    par5 /= (double)var9;
    par1 += this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
    par3 += this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
    par5 += this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
    par1 *= (double)par7;
    par3 *= (double)par7;
    par5 *= (double)par7;
    this.motionX = par1;
    this.motionY = par3;
    this.motionZ = par5;
    float var10 = MathHelper.sqrt_double(par1 * par1 + par5 * par5);
    this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI);
    this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(par3, (double)var10) * 180.0D / Math.PI);
    this.ticksInGround = 0;
    }
    
    /**
    * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
    * posY, posZ, yaw, pitch
    */
    public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
    {
    this.setPosition(par1, par3, par5);
    this.setRotation(par7, par8);
    }
    
    /**
    * Sets the velocity to the args. Args: x, y, z
    */
    public void setVelocity(double par1, double par3, double par5)
    {
    this.motionX = par1;
    this.motionY = par3;
    this.motionZ = par5;
    
    if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
    {
    float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5);
    this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI);
    this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(par3, (double)var7) * 180.0D / Math.PI);
    this.prevRotationPitch = this.rotationPitch;
    this.prevRotationYaw = this.rotationYaw;
    this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
    this.ticksInGround = 0;
    }
    }
    
    /**
    * Called to update the entity's position/logic.
    */
    public void onUpdate()
    {
    super.onUpdate();
    
    this.isBurning();
    
    if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
    {
    float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
    this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
    this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)var1) * 180.0D / Math.PI);
    }
    
    worldObj.setBlockWithNotify((int) posX, (int) posY, (int) posZ, Block.fire.blockID);
    worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
    
    int var16 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
    
    if (var16 > 0)
    {
    Block.blocksList[var16].setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
    AxisAlignedBB var2 = Block.blocksList[var16].getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
    
    if (var2 != null && var2.isVecInside(Vec3.getVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ)))
    {
    this.inGround = true;
    }
    }
    
    if (this.arrowShake > 0)
    {
    --this.arrowShake;
    }
    
    if (this.inGround)
    {
    int var18 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
    int var19 = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
    
    if (var18 == this.inTile && var19 == this.inData)
    {
    ++this.ticksInGround;
    
    if (this.ticksInGround == 1200)
    {
    this.setDead();
    }
    }
    else
    {
    this.inGround = false;
    this.motionX *= (double)(this.rand.nextFloat() * 0.2F);
    this.motionY *= (double)(this.rand.nextFloat() * 0.2F);
    this.motionZ *= (double)(this.rand.nextFloat() * 0.2F);
    this.ticksInGround = 0;
    this.ticksInAir = 0;
    }
    }
    else
    {
    ++this.ticksInAir;
    Vec3 var17 = Vec3.getVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
    Vec3 var3 = Vec3.getVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
    MovingObjectPosition var4 = this.worldObj.rayTraceBlocks_do_do(var17, var3, false, true);
    var17 = Vec3.getVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
    var3 = Vec3.getVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
    
    if (var4 != null)
    {
    var3 = Vec3.getVec3Pool().getVecFromPool(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord);
    }
    
    Entity var5 = null;
    List var6 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
    double var7 = 0.0D;
    Iterator var9 = var6.iterator();
    float var11;
    
    while (var9.hasNext())
    {
    Entity var10 = (Entity)var9.next();
    
    if (var10.canBeCollidedWith() && (var10 != this.shootingEntity || this.ticksInAir >= 5))
    {
    var11 = 0.3F;
    AxisAlignedBB var12 = var10.boundingBox.expand((double)var11, (double)var11, (double)var11);
    MovingObjectPosition var13 = var12.calculateIntercept(var17, var3);
    
    if (var13 != null)
    {
    double var14 = var17.distanceTo(var13.hitVec);
    
    if (var14 < var7 || var7 == 0.0D)
    {
    var5 = var10;
    var7 = var14;
    }
    }
    }
    }
    
    if (var5 != null)
    {
    var4 = new MovingObjectPosition(var5);
    }
    
    float var20;
    
    if (var4 != null)
    {
    if (var4.entityHit != null)
    {
    var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
    int var24 = MathHelper.ceiling_double_int((double)var20 * this.damage);
    
    if (this.func_70241_g())
    {
    var24 += this.rand.nextInt(var24 / 2 + 2);
    }
    
    DamageSource var22 = null;
    
    if (this.shootingEntity == null)
    {
    var22 = mod_Scoaleton.causeDarkArrowDamage(this, this);
    }
    else
    {
    var22 = mod_Scoaleton.causeDarkArrowDamage(this, this.shootingEntity);
    }
    
    var4.entityHit.setFire(2);
    worldObj.setBlockWithNotify((int) var4.entityHit.posX, (int) var4.entityHit.posY, (int) var4.entityHit.posZ, Block.fire.blockID);
    
    if (var4.entityHit.attackEntityFrom(var22, var24))
    {
    if (var4.entityHit instanceof EntityLiving)
    {
    ++((EntityLiving)var4.entityHit).arrowHitTempCounter;
    
    if (this.knockbackStrength > 0)
    {
    float var25 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
    
    if (var25 > 0.0F)
    {
    var4.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)var25, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)var25);
    }
    }
    }
    
    this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
    this.setDead();
    }
    else
    {
    this.motionX *= -0.10000000149011612D;
    this.motionY *= -0.10000000149011612D;
    this.motionZ *= -0.10000000149011612D;
    this.rotationYaw += 180.0F;
    this.prevRotationYaw += 180.0F;
    this.ticksInAir = 0;
    }
    }
    else
    {
    this.xTile = var4.blockX;
    this.yTile = var4.blockY;
    this.zTile = var4.blockZ;
    this.inTile = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
    this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
    this.motionX = (double)((float)(var4.hitVec.xCoord - this.posX));
    this.motionY = (double)((float)(var4.hitVec.yCoord - this.posY));
    this.motionZ = (double)((float)(var4.hitVec.zCoord - this.posZ));
    var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
    this.posX -= this.motionX / (double)var20 * 0.05000000074505806D;
    this.posY -= this.motionY / (double)var20 * 0.05000000074505806D;
    this.posZ -= this.motionZ / (double)var20 * 0.05000000074505806D;
    this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
    this.inGround = true;
    this.arrowShake = 7;
    this.func_70243_d(false);
    }
    }
    
    if (this.func_70241_g())
    {
    for (int var21 = 0; var21 < 4; ++var21)
    {
    this.worldObj.spawnParticle("crit", this.posX + this.motionX * (double)var21 / 4.0D, this.posY + this.motionY * (double)var21 / 4.0D, this.posZ + this.motionZ * (double)var21 / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ);
    }
    }
    
    this.posX += this.motionX;
    this.posY += this.motionY;
    this.posZ += this.motionZ;
    var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
    this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
    
    for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)var20) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
    {
    ;
    }
    
    while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
    {
    this.prevRotationPitch += 360.0F;
    }
    
    while (this.rotationYaw - this.prevRotationYaw < -180.0F)
    {
    this.prevRotationYaw -= 360.0F;
    }
    
    while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
    {
    this.prevRotationYaw += 360.0F;
    }
    
    this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
    this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
    float var23 = 0.99F;
    var11 = 0.05F;
    
    if (this.isInWater())
    {
    for (int var26 = 0; var26 < 4; ++var26)
    {
    float var27 = 0.25F;
    this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)var27, this.posY - this.motionY * (double)var27, this.posZ - this.motionZ * (double)var27, this.motionX, this.motionY, this.motionZ);
    }
    
    var23 = 0.8F;
    }
    
    this.motionX *= (double)var23;
    this.motionY *= (double)var23;
    this.motionZ *= (double)var23;
    this.motionY -= (double)var11;
    this.setPosition(this.posX, this.posY, this.posZ);
    this.doBlockCollisions();
    }
    }
    
    /**
    * (abstract) Protected helper method to write subclass entity data to NBT.
    */
    public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
    {
    par1NBTTagCompound.setShort("xTile", (short)this.xTile);
    par1NBTTagCompound.setShort("yTile", (short)this.yTile);
    par1NBTTagCompound.setShort("zTile", (short)this.zTile);
    par1NBTTagCompound.setByte("inTile", (byte)this.inTile);
    par1NBTTagCompound.setByte("inData", (byte)this.inData);
    par1NBTTagCompound.setByte("shake", (byte)this.arrowShake);
    par1NBTTagCompound.setByte("inGround", (byte)(this.inGround ? 1 : 0));
    par1NBTTagCompound.setByte("pickup", (byte)this.canBePickedUp);
    par1NBTTagCompound.setDouble("damage", this.damage);
    }
    
    /**
    * (abstract) Protected helper method to read subclass entity data from NBT.
    */
    public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
    {
    this.xTile = par1NBTTagCompound.getShort("xTile");
    this.yTile = par1NBTTagCompound.getShort("yTile");
    this.zTile = par1NBTTagCompound.getShort("zTile");
    this.inTile = par1NBTTagCompound.getByte("inTile") & 255;
    this.inData = par1NBTTagCompound.getByte("inData") & 255;
    this.arrowShake = par1NBTTagCompound.getByte("shake") & 255;
    this.inGround = par1NBTTagCompound.getByte("inGround") == 1;
    
    if (par1NBTTagCompound.hasKey("damage"))
    {
    this.damage = par1NBTTagCompound.getDouble("damage");
    }
    
    if (par1NBTTagCompound.hasKey("pickup"))
    {
    this.canBePickedUp = par1NBTTagCompound.getByte("pickup");
    }
    else if (par1NBTTagCompound.hasKey("player"))
    {
    this.canBePickedUp = par1NBTTagCompound.getBoolean("player") ? 1 : 0;
    }
    }
    
    /**
    * Called by a player entity when they collide with an entity
    */
    public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
    {
    if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0)
    {
    boolean var2 = this.canBePickedUp == 1 || this.canBePickedUp == 2 && par1EntityPlayer.capabilities.isCreativeMode;
    
    if (this.canBePickedUp == 1 && !par1EntityPlayer.inventory.addItemStackToInventory(new ItemStack(mod_Scoaleton.darkArrow, 1)))
    {
    var2 = false;
    }
    
    if (var2)
    {
    this.worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
    par1EntityPlayer.onItemPickup(this, 1);
    this.setDead();
    }
    }
    }
    
    public float getShadowSize()
    {
    return 0.0F;
    }
    
    public void setDamage(double par1)
    {
    this.damage = par1;
    }
    
    public double getDamage()
    {
    return this.damage;
    }
    
    /**
    * Sets the amount of knockback the arrow applies when it hits a mob.
    */
    public void setKnockbackStrength(int par1)
    {
    this.knockbackStrength = par1;
    }
    
    /**
    * If returns false, the item will not inflict any damage against entities.
    */
    public boolean canAttackWithItem()
    {
    return false;
    }
    
    public void func_70243_d(boolean par1)
    {
    byte var2 = this.dataWatcher.getWatchableObjectByte(16);
    
    if (par1)
    {
    this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 | 1)));
    }
    else
    {
    this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 & -2)));
    }
    }
    
    public boolean func_70241_g()
    {
    byte var1 = this.dataWatcher.getWatchableObjectByte(16);
    return (var1 & 1) != 0;
    }
    }
    Posted in: Modification Development
  • 0

    posted a message on Invisible Thrown Entity
    I'm having this exact same problem. Someone please help :(
    Posted in: Mods Discussion
  • 0

    posted a message on Why is my custom arrow invisible?
    Quote from Pollo_loco

    You could try a particle effect to at least make it visible… it may not be the best for an arrow, but it at least shows the projectile's existence.
    Yeah, I'll try that I guess. It doesn't seem to show any particles though, like the critical hit arrow particle thing when it's flying through the air. I had the same problem with a throwable item before, it wouldn't show it going through the air or it's particle effects, so I'm not sure if this is gonna work.

    I don't know what I did to fix my other throwable item being invisible, but I'm pretty sure it's the same problem. If I can somehow make my old item invisible again, maybe I can figure out my problem.

    EDIT: As expected, it didn't create any particle effect. I tried this with a regular arrow, and it worked fine:



    And this is the code I used (not that it matters):

    worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);


    Someone, if you have any suggestions, or if you have had this problem before, please tell me them. I have no idea what I'm doing wrong.
    Posted in: Modification Development
  • 0

    posted a message on [1.5] [Temporarily only ModLoader] Scoaleton V2.1.0 [My first mod] [SMP & SSP]
    Quote from TheFavoriteFruit

    Really nice mod, but is it incompatible with optifine?
    As far as I know, if you have Forge, Optifine, and this mod installed, the textures won't show up. Not sure about ModLoaderMP though.
    Quote from swiftlucat

    first mod? dang, someones got talent! looks fascinating, and seems totally original! good job man!
    Thank you!
    Quote from goldminer9989

    can i do mod review when its done i will give you the link to it so you can feature it on this
    Sure, that would be awesome :)
    Posted in: Minecraft Mods
  • 0

    posted a message on New Mob not showing up in the World?
    Quote from kushirules

    I am! Or assume i am O.o
    Could you show your mod_XXXXX file then? If you're using ModLoader you should have one of those.
    Posted in: Modification Development
  • 0

    posted a message on New Mob not showing up in the World?
    So are you not using ModLoader?
    Posted in: Modification Development
  • 0

    posted a message on Why is my custom arrow invisible?
    Quote from Pollo_loco

    It's an issue with the texture. Make sure the directory is correct and that the texture isn't used by any item.
    I don't know why the second one is an issue, but I had this problem with a WIP mod I'm making. I had used my texture for another item. Instead of fixing the problem, I just added a particle effect to it and ended up making it much cooler.
    The directory is correct, it worked when I used it in RenderBow. I wouldn't be using the texture for anything else either.

    EDIt; Well, I guess I'll just release the mod like this.
    Posted in: Modification Development
  • 0

    posted a message on Why is my custom arrow invisible?
    Welp, here's a video of what I'm talking about:


    I really hope someone can help, I'm absolutely clueless on why this is happening..
    Posted in: Modification Development
  • 0

    posted a message on Why is my custom arrow invisible?
    I only need to do one last thing before I release the newest version of my mod, which is making it so my arrow isn't invisible. All I did was copy code from the Arrow render file, and the Entity file, and it's not working. Here's my code:

    RenderDarkArrow:
    package net.minecraft.src;
    
    import org.lwjgl.opengl.GL11;
    import org.lwjgl.opengl.GL12;
    
    public class RenderDarkArrow extends RenderArrow
    {
    public void renderArrow(EntityDarkArrow par1EntityDarkArrow, double par2, double par4, double par6, float par8, float par9)
    {
    this.loadTexture("/ocomo/darkarrows.png");
    GL11.glPushMatrix();
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    GL11.glRotatef(par1EntityDarkArrow.prevRotationYaw + (par1EntityDarkArrow.rotationYaw - par1EntityDarkArrow.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);
    GL11.glRotatef(par1EntityDarkArrow.prevRotationPitch + (par1EntityDarkArrow.rotationPitch - par1EntityDarkArrow.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F);
    Tessellator var10 = Tessellator.instance;
    byte var11 = 0;
    float var12 = 0.0F;
    float var13 = 0.5F;
    float var14 = (float)(0 + var11 * 10) / 32.0F;
    float var15 = (float)(5 + var11 * 10) / 32.0F;
    float var16 = 0.0F;
    float var17 = 0.15625F;
    float var18 = (float)(5 + var11 * 10) / 32.0F;
    float var19 = (float)(10 + var11 * 10) / 32.0F;
    float var20 = 0.05625F;
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    float var21 = (float)par1EntityDarkArrow.arrowShake - par9;
    
    if (var21 > 0.0F)
    {
    float var22 = -MathHelper.sin(var21 * 3.0F) * var21;
    GL11.glRotatef(var22, 0.0F, 0.0F, 1.0F);
    }
    
    GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
    GL11.glScalef(var20, var20, var20);
    GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
    GL11.glNormal3f(var20, 0.0F, 0.0F);
    var10.startDrawingQuads();
    var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)var16, (double)var18);
    var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)var17, (double)var18);
    var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)var17, (double)var19);
    var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)var16, (double)var19);
    var10.draw();
    GL11.glNormal3f(-var20, 0.0F, 0.0F);
    var10.startDrawingQuads();
    var10.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double)var16, (double)var18);
    var10.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double)var17, (double)var18);
    var10.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double)var17, (double)var19);
    var10.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double)var16, (double)var19);
    var10.draw();
    
    for (int var23 = 0; var23 < 4; ++var23)
    {
    GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
    GL11.glNormal3f(0.0F, 0.0F, var20);
    var10.startDrawingQuads();
    var10.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double)var12, (double)var14);
    var10.addVertexWithUV(8.0D, -2.0D, 0.0D, (double)var13, (double)var14);
    var10.addVertexWithUV(8.0D, 2.0D, 0.0D, (double)var13, (double)var15);
    var10.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double)var12, (double)var15);
    var10.draw();
    }
    
    GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    GL11.glPopMatrix();
    }
    
    /**
    * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
    * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
    * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
    * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
    */
    public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    {
    this.renderArrow((EntityDarkArrow)par1Entity, par2, par4, par6, par8, par9);
    }
    }

    mod_XXXXX:
    package net.minecraft.src;
    
    import java.util.Map;
    import java.io.File;
    import net.minecraft.client.Minecraft;
    
    public class mod_Scoaleton extends BaseMod{
    
    public mod_Scoaleton()
    {
    
    }
    public static DamageSource causeDarkArrowDamage(EntityDarkArrow par0EntityDarkArrow, Entity par1Entity)
    {
    return (new EntityDamageSourceIndirect("darkarrow", par0EntityDarkArrow, par1Entity)).setProjectile();
    }
    -stuff-
    public static Item darkArrow = (new
    Item(3841).setItemName("arrowDark").setTabToDisplayOn(CreativeTabs.tabMisc));
    -more stuff-
    
    public void load()
    {
    -stuff-
    ModLoader.registerEntityID(EntityDarkArrow.class, "DarkArrow", 88);
    ModLoader.addName(darkArrow, "Dark Arrow");
    darkArrow.iconIndex = ModLoader.addOverride("/gui/items.png", "/ocomo/darkarrow.png");
    -more stuff-
    }
    
    public void addRenderer(Map map)
    {
    -stuff-
    map.put(EntityDarkArrow.class, new RenderDarkArrow());
    -more stuff-
    }
    
    public String getVersion()
    {
    return "1.2.5";
    }
    }

    EntityDarkArrow:
    package net.minecraft.src;
    
    import java.util.Iterator;
    import java.util.List;
    
    public class EntityDarkArrow extends Entity
    {
    private int xTile = -1;
    private int yTile = -1;
    private int zTile = -1;
    private int inTile = 0;
    private int inData = 0;
    private boolean inGround = false;
    
    /** 1 if the player can pick up the arrow */
    public int canBePickedUp = 0;
    
    /** Seems to be some sort of timer for animating an arrow. */
    public int arrowShake = 0;
    
    /** The owner of this arrow. */
    public Entity shootingEntity;
    private int ticksInGround;
    private int ticksInAir = 0;
    private double damage = 8.0D;
    
    /** The amount of knockback an arrow applies when it hits a mob. */
    private int knockbackStrength;
    
    public EntityDarkArrow(World par1World)
    {
    super(par1World);
    this.setSize(0.5F, 0.5F);
    }
    
    public EntityDarkArrow(World par1World, double par2, double par4, double par6)
    {
    super(par1World);
    this.setSize(0.5F, 0.5F);
    this.setPosition(par2, par4, par6);
    this.yOffset = 0.0F;
    }
    
    public EntityDarkArrow(World par1World, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving, float par4, float par5)
    {
    super(par1World);
    this.shootingEntity = par2EntityLiving;
    
    if (par2EntityLiving instanceof EntityPlayer)
    {
    this.canBePickedUp = 1;
    }
    
    this.posY = par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight() - 0.10000000149011612D;
    double var6 = par3EntityLiving.posX - par2EntityLiving.posX;
    double var8 = par3EntityLiving.posY + (double)par3EntityLiving.getEyeHeight() - 0.699999988079071D - this.posY;
    double var10 = par3EntityLiving.posZ - par2EntityLiving.posZ;
    double var12 = (double)MathHelper.sqrt_double(var6 * var6 + var10 * var10);
    
    if (var12 >= 1.0E-7D)
    {
    float var14 = (float)(Math.atan2(var10, var6) * 180.0D / Math.PI) - 90.0F;
    float var15 = (float)(-(Math.atan2(var8, var12) * 180.0D / Math.PI));
    double var16 = var6 / var12;
    double var18 = var10 / var12;
    this.setLocationAndAngles(par2EntityLiving.posX + var16, this.posY, par2EntityLiving.posZ + var18, var14, var15);
    this.yOffset = 0.0F;
    float var20 = (float)var12 * 0.2F;
    this.setArrowHeading(var6, var8 + (double)var20, var10, par4, par5);
    }
    }
    
    public EntityDarkArrow(World par1World, EntityLiving par2EntityLiving, float par3)
    {
    super(par1World);
    this.shootingEntity = par2EntityLiving;
    
    if (par2EntityLiving instanceof EntityPlayer)
    {
    this.canBePickedUp = 1;
    }
    
    this.setSize(0.5F, 0.5F);
    this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch);
    this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
    this.posY -= 0.10000000149011612D;
    this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
    this.setPosition(this.posX, this.posY, this.posZ);
    this.yOffset = 0.0F;
    this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
    this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
    this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
    this.setArrowHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F);
    }
    
    protected void entityInit()
    {
    this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
    }
    
    /**
    * Uses the provided coordinates as a heading and determines the velocity from it with the set force and random
    * variance. Args: x, y, z, force, forceVariation
    */
    public void setArrowHeading(double par1, double par3, double par5, float par7, float par8)
    {
    float var9 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5);
    par1 /= (double)var9;
    par3 /= (double)var9;
    par5 /= (double)var9;
    par1 += this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
    par3 += this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
    par5 += this.rand.nextGaussian() * 0.007499999832361937D * (double)par8;
    par1 *= (double)par7;
    par3 *= (double)par7;
    par5 *= (double)par7;
    this.motionX = par1;
    this.motionY = par3;
    this.motionZ = par5;
    float var10 = MathHelper.sqrt_double(par1 * par1 + par5 * par5);
    this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI);
    this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(par3, (double)var10) * 180.0D / Math.PI);
    this.ticksInGround = 0;
    }
    
    /**
    * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
    * posY, posZ, yaw, pitch
    */
    public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
    {
    this.setPosition(par1, par3, par5);
    this.setRotation(par7, par8);
    }
    
    /**
    * Sets the velocity to the args. Args: x, y, z
    */
    public void setVelocity(double par1, double par3, double par5)
    {
    this.motionX = par1;
    this.motionY = par3;
    this.motionZ = par5;
    
    if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
    {
    float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5);
    this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI);
    this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(par3, (double)var7) * 180.0D / Math.PI);
    this.prevRotationPitch = this.rotationPitch;
    this.prevRotationYaw = this.rotationYaw;
    this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
    this.ticksInGround = 0;
    }
    }
    
    /**
    * Called to update the entity's position/logic.
    */
    public void onUpdate()
    {
    super.onUpdate();
    
    if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
    {
    float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
    this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
    this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)var1) * 180.0D / Math.PI);
    }
    
    int var16 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
    
    if (var16 > 0)
    {
    Block.blocksList[var16].setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
    AxisAlignedBB var2 = Block.blocksList[var16].getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
    
    if (var2 != null && var2.isVecInside(Vec3.getVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ)))
    {
    this.inGround = true;
    }
    }
    
    if (this.arrowShake > 0)
    {
    --this.arrowShake;
    }
    
    if (this.inGround)
    {
    int var18 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
    int var19 = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
    
    if (var18 == this.inTile && var19 == this.inData)
    {
    ++this.ticksInGround;
    
    if (this.ticksInGround == 1200)
    {
    this.setDead();
    }
    }
    else
    {
    this.inGround = false;
    this.motionX *= (double)(this.rand.nextFloat() * 0.2F);
    this.motionY *= (double)(this.rand.nextFloat() * 0.2F);
    this.motionZ *= (double)(this.rand.nextFloat() * 0.2F);
    this.ticksInGround = 0;
    this.ticksInAir = 0;
    }
    }
    else
    {
    ++this.ticksInAir;
    Vec3 var17 = Vec3.getVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
    Vec3 var3 = Vec3.getVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
    MovingObjectPosition var4 = this.worldObj.rayTraceBlocks_do_do(var17, var3, false, true);
    var17 = Vec3.getVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ);
    var3 = Vec3.getVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
    
    if (var4 != null)
    {
    var3 = Vec3.getVec3Pool().getVecFromPool(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord);
    }
    
    Entity var5 = null;
    List var6 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
    double var7 = 0.0D;
    Iterator var9 = var6.iterator();
    float var11;
    
    while (var9.hasNext())
    {
    Entity var10 = (Entity)var9.next();
    
    if (var10.canBeCollidedWith() && (var10 != this.shootingEntity || this.ticksInAir >= 5))
    {
    var11 = 0.3F;
    AxisAlignedBB var12 = var10.boundingBox.expand((double)var11, (double)var11, (double)var11);
    MovingObjectPosition var13 = var12.calculateIntercept(var17, var3);
    
    if (var13 != null)
    {
    double var14 = var17.distanceTo(var13.hitVec);
    
    if (var14 < var7 || var7 == 0.0D)
    {
    var5 = var10;
    var7 = var14;
    }
    }
    }
    }
    
    if (var5 != null)
    {
    var4 = new MovingObjectPosition(var5);
    }
    
    float var20;
    
    if (var4 != null)
    {
    if (var4.entityHit != null)
    {
    var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
    int var24 = MathHelper.ceiling_double_int((double)var20 * this.damage);
    
    if (this.func_70241_g())
    {
    var24 += this.rand.nextInt(var24 / 2 + 2);
    }
    
    DamageSource var22 = null;
    
    if (this.shootingEntity == null)
    {
    var22 = mod_Scoaleton.causeDarkArrowDamage(this, this);
    }
    else
    {
    var22 = mod_Scoaleton.causeDarkArrowDamage(this, this.shootingEntity);
    }
    
    if (this.isBurning())
    {
    var4.entityHit.setFire(5);
    }
    
    if (var4.entityHit.attackEntityFrom(var22, var24))
    {
    if (var4.entityHit instanceof EntityLiving)
    {
    ++((EntityLiving)var4.entityHit).arrowHitTempCounter;
    
    if (this.knockbackStrength > 0)
    {
    float var25 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
    
    if (var25 > 0.0F)
    {
    var4.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)var25, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)var25);
    }
    }
    }
    
    this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
    this.setDead();
    }
    else
    {
    this.motionX *= -0.10000000149011612D;
    this.motionY *= -0.10000000149011612D;
    this.motionZ *= -0.10000000149011612D;
    this.rotationYaw += 180.0F;
    this.prevRotationYaw += 180.0F;
    this.ticksInAir = 0;
    }
    }
    else
    {
    this.xTile = var4.blockX;
    this.yTile = var4.blockY;
    this.zTile = var4.blockZ;
    this.inTile = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
    this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
    this.motionX = (double)((float)(var4.hitVec.xCoord - this.posX));
    this.motionY = (double)((float)(var4.hitVec.yCoord - this.posY));
    this.motionZ = (double)((float)(var4.hitVec.zCoord - this.posZ));
    var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
    this.posX -= this.motionX / (double)var20 * 0.05000000074505806D;
    this.posY -= this.motionY / (double)var20 * 0.05000000074505806D;
    this.posZ -= this.motionZ / (double)var20 * 0.05000000074505806D;
    this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
    this.inGround = true;
    this.arrowShake = 7;
    this.func_70243_d(false);
    }
    }
    
    if (this.func_70241_g())
    {
    for (int var21 = 0; var21 < 4; ++var21)
    {
    this.worldObj.spawnParticle("crit", this.posX + this.motionX * (double)var21 / 4.0D, this.posY + this.motionY * (double)var21 / 4.0D, this.posZ + this.motionZ * (double)var21 / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ);
    }
    }
    
    this.posX += this.motionX;
    this.posY += this.motionY;
    this.posZ += this.motionZ;
    var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
    this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
    
    for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)var20) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
    {
    ;
    }
    
    while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
    {
    this.prevRotationPitch += 360.0F;
    }
    
    while (this.rotationYaw - this.prevRotationYaw < -180.0F)
    {
    this.prevRotationYaw -= 360.0F;
    }
    
    while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
    {
    this.prevRotationYaw += 360.0F;
    }
    
    this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
    this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
    float var23 = 0.99F;
    var11 = 0.05F;
    
    if (this.isInWater())
    {
    for (int var26 = 0; var26 < 4; ++var26)
    {
    float var27 = 0.25F;
    this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)var27, this.posY - this.motionY * (double)var27, this.posZ - this.motionZ * (double)var27, this.motionX, this.motionY, this.motionZ);
    }
    
    var23 = 0.8F;
    }
    
    this.motionX *= (double)var23;
    this.motionY *= (double)var23;
    this.motionZ *= (double)var23;
    this.motionY -= (double)var11;
    this.setPosition(this.posX, this.posY, this.posZ);
    this.doBlockCollisions();
    }
    }
    
    /**
    * (abstract) Protected helper method to write subclass entity data to NBT.
    */
    public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
    {
    par1NBTTagCompound.setShort("xTile", (short)this.xTile);
    par1NBTTagCompound.setShort("yTile", (short)this.yTile);
    par1NBTTagCompound.setShort("zTile", (short)this.zTile);
    par1NBTTagCompound.setByte("inTile", (byte)this.inTile);
    par1NBTTagCompound.setByte("inData", (byte)this.inData);
    par1NBTTagCompound.setByte("shake", (byte)this.arrowShake);
    par1NBTTagCompound.setByte("inGround", (byte)(this.inGround ? 1 : 0));
    par1NBTTagCompound.setByte("pickup", (byte)this.canBePickedUp);
    par1NBTTagCompound.setDouble("damage", this.damage);
    }
    
    /**
    * (abstract) Protected helper method to read subclass entity data from NBT.
    */
    public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
    {
    this.xTile = par1NBTTagCompound.getShort("xTile");
    this.yTile = par1NBTTagCompound.getShort("yTile");
    this.zTile = par1NBTTagCompound.getShort("zTile");
    this.inTile = par1NBTTagCompound.getByte("inTile") & 255;
    this.inData = par1NBTTagCompound.getByte("inData") & 255;
    this.arrowShake = par1NBTTagCompound.getByte("shake") & 255;
    this.inGround = par1NBTTagCompound.getByte("inGround") == 1;
    
    if (par1NBTTagCompound.hasKey("damage"))
    {
    this.damage = par1NBTTagCompound.getDouble("damage");
    }
    
    if (par1NBTTagCompound.hasKey("pickup"))
    {
    this.canBePickedUp = par1NBTTagCompound.getByte("pickup");
    }
    else if (par1NBTTagCompound.hasKey("player"))
    {
    this.canBePickedUp = par1NBTTagCompound.getBoolean("player") ? 1 : 0;
    }
    }
    
    /**
    * Called by a player entity when they collide with an entity
    */
    public void onCollideWithPlayer(EntityPlayer par1EntityPlayer)
    {
    if (!this.worldObj.isRemote && this.inGround && this.arrowShake <= 0)
    {
    boolean var2 = this.canBePickedUp == 1 || this.canBePickedUp == 2 && par1EntityPlayer.capabilities.isCreativeMode;
    
    if (this.canBePickedUp == 1 && !par1EntityPlayer.inventory.addItemStackToInventory(new ItemStack(mod_Scoaleton.darkArrow, 1)))
    {
    var2 = false;
    }
    
    if (var2)
    {
    this.worldObj.playSoundAtEntity(this, "random.pop", 0.2F, ((this.rand.nextFloat() - this.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
    par1EntityPlayer.onItemPickup(this, 1);
    this.setDead();
    }
    }
    }
    
    public float getShadowSize()
    {
    return 0.0F;
    }
    
    public void setDamage(double par1)
    {
    this.damage = par1;
    }
    
    public double getDamage()
    {
    return this.damage;
    }
    
    /**
    * Sets the amount of knockback the arrow applies when it hits a mob.
    */
    public void setKnockbackStrength(int par1)
    {
    this.knockbackStrength = par1;
    }
    
    /**
    * If returns false, the item will not inflict any damage against entities.
    */
    public boolean canAttackWithItem()
    {
    return false;
    }
    
    public void func_70243_d(boolean par1)
    {
    byte var2 = this.dataWatcher.getWatchableObjectByte(16);
    
    if (par1)
    {
    this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 | 1)));
    }
    else
    {
    this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 & -2)));
    }
    }
    
    public boolean func_70241_g()
    {
    byte var1 = this.dataWatcher.getWatchableObjectByte(16);
    return (var1 & 1) != 0;
    }
    }

    /ocomo/darkarrows.png loads perfectly fine if I use it in RenderArrow. Does anyone have any idea why this isn't working? And if you need any more information, don't expect me to respond for a while since I'll be asleep.
    Posted in: Modification Development
  • 0

    posted a message on [1.5] [Temporarily only ModLoader] Scoaleton V2.1.0 [My first mod] [SMP & SSP]
    Quote from Faustnero

    the problem is, i don't play minecraft without optifine XD
    There's nothing I can do about that.
    Quote from Gavenom

    Can you make it so scoaletons can also spawn riding spiders? If you could that would be awesome. And Awesome mod
    I will definitely add that, I don't know why I didn't think of it. And thank you!
    Quote from PhoEver

    I have a problem when I downloaded this mod, when I got it installed, and went on minecraft i could plant in the dark bonemeal ,but couldnt plant in seeds after? even for normal farm soil. Please help me out ):
    I fixed it, re-download the mod please.
    Quote from ScorpioDan

    Nice mod, uploading my review for the 3rd time now because of YT problems

    Edit: Here we go


    -snip-
    Thank you, I'll put it in the thread.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5] [Temporarily only ModLoader] Scoaleton V2.1.0 [My first mod] [SMP & SSP]
    Quote from PhoEver

    I have a problem when I downloaded this mod, when I got it installed, and went on minecraft i could plant in the dark bonemeal ,but couldnt plant in seeds after? even for normal farm soil. Please help me out ):
    Silly me, I should have noticed that. It had to do with 1.3, all I had to do was change the name of something. This will be fixed in probably the next hour.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5] [Temporarily only ModLoader] Scoaleton V2.1.0 [My first mod] [SMP & SSP]
    Quote from Thescorpi0n

    I just made & uploaded a Mod Showcase featuring this mod, I hope you enjoy it ;) .


    Thank you very much! I'll put it in the thread. You show basically everything about the mod which is good.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5] [Temporarily only ModLoader] Scoaleton V2.1.0 [My first mod] [SMP & SSP]
    Just fixed a bunch of stuff with the last version. I didn't wanna make it V1.7.1 since it was just some small changes. For anyone who downloaded V1.7.0 before, please download it again since I just updated it. There's a lot of bugs with the last download. And I also added SMP support for the latest ModLoaderMP.

    I wish people would give more feedback, it's kind of discouraging to work on my mod for half of the day and update it and get no replies.
    Posted in: Minecraft Mods
  • To post a comment, please .