Package com.flansmod.client.debug

Examples of com.flansmod.client.debug.EntityDebugDot


                    playerHit.hitbox.player.arrowHitTimer++;
                    playerHit.hitbox.player.hurtResistantTime = playerHit.hitbox.player.maxHurtResistantTime / 2;
                  }
                 
                  if(FlansMod.DEBUG)
                    world.spawnEntityInWorld(new EntityDebugDot(world, new Vector3f(data.lastMeleePositions[k].x + dPos.x * playerHit.intersectTime, data.lastMeleePositions[k].y + dPos.y * playerHit.intersectTime, data.lastMeleePositions[k].z + dPos.z * playerHit.intersectTime), 1000, 1F, 0F, 0F));
                }
                else if(bulletHit instanceof EntityHit)
                {
                  EntityHit entityHit = (EntityHit)bulletHit;
                  if(entityHit.entity.attackEntityFrom(DamageSource.causePlayerDamage(player), swingDistance * type.meleeDamage) && entityHit.entity instanceof EntityLivingBase)
                  {
                    EntityLivingBase living = (EntityLivingBase)entityHit.entity;
                    //If the attack was allowed, we should remove their immortality cooldown so we can shoot them again. Without this, any rapid fire gun become useless
                    living.arrowHitTimer++;
                    living.hurtResistantTime = living.maxHurtResistantTime / 2;
                  }
                 
                  if(FlansMod.DEBUG)
                    world.spawnEntityInWorld(new EntityDebugDot(world, new Vector3f(data.lastMeleePositions[k].x + dPos.x * entityHit.intersectTime, data.lastMeleePositions[k].y + dPos.y * entityHit.intersectTime, data.lastMeleePositions[k].z + dPos.z * entityHit.intersectTime), 1000, 1F, 0F, 0F));
                }
              } 
            }
          }
          //End raytrace
View Full Code Here


        if(bulletHit instanceof DriveableHit)
        {
          DriveableHit driveableHit = (DriveableHit)bulletHit;
          penetratingPower = driveableHit.driveable.bulletHit(this, driveableHit, penetratingPower);
          if(FlansMod.DEBUG)
            worldObj.spawnEntityInWorld(new EntityDebugDot(worldObj, new Vector3f(posX + motionX * driveableHit.intersectTime, posY + motionY * driveableHit.intersectTime, posZ + motionZ * driveableHit.intersectTime), 1000, 0F, 0F, 1F));

        }
        else if(bulletHit instanceof PlayerBulletHit)
        {
          PlayerBulletHit playerHit = (PlayerBulletHit)bulletHit;
          penetratingPower = playerHit.hitbox.hitByBullet(this, penetratingPower);
          if(FlansMod.DEBUG)
            worldObj.spawnEntityInWorld(new EntityDebugDot(worldObj, new Vector3f(posX + motionX * playerHit.intersectTime, posY + motionY * playerHit.intersectTime, posZ + motionZ * playerHit.intersectTime), 1000, 1F, 0F, 0F));
        }
        else if(bulletHit instanceof EntityHit)
        {
          EntityHit entityHit = (EntityHit)bulletHit;
          if(entityHit.entity.attackEntityFrom(getBulletDamage(false), damage * type.damageVsLiving) && entityHit.entity instanceof EntityLivingBase)
          {
            EntityLivingBase living = (EntityLivingBase)entityHit.entity;
            for(PotionEffect effect : type.hitEffects)
            {
              living.addPotionEffect(new PotionEffect(effect));
            }
            //If the attack was allowed, we should remove their immortality cooldown so we can shoot them again. Without this, any rapid fire gun become useless
            living.arrowHitTimer++;
            living.hurtResistantTime = living.maxHurtResistantTime / 2;
          }
          if(type.setEntitiesOnFire)
            entityHit.entity.setFire(20);
          penetratingPower -= 1F;
          if(FlansMod.DEBUG)
            worldObj.spawnEntityInWorld(new EntityDebugDot(worldObj, new Vector3f(posX + motionX * entityHit.intersectTime, posY + motionY * entityHit.intersectTime, posZ + motionZ * entityHit.intersectTime), 1000, 1F, 1F, 0F));
        }
        else if(bulletHit instanceof BlockHit)
        {
          BlockHit blockHit = (BlockHit)bulletHit;
          MovingObjectPosition raytraceResult = blockHit.raytraceResult;
          //If the hit wasn't an entity hit, then it must've been a block hit
          int xTile = raytraceResult.blockX;
          int yTile = raytraceResult.blockY;
          int zTile = raytraceResult.blockZ;
          if(FlansMod.DEBUG)
            worldObj.spawnEntityInWorld(new EntityDebugDot(worldObj, new Vector3f(raytraceResult.hitVec.xCoord, raytraceResult.hitVec.yCoord, raytraceResult.hitVec.zCoord), 1000, 0F, 1F, 0F));

          Block block = worldObj.getBlock(xTile, yTile, zTile);
          Material mat = block.getMaterial();
          //If the bullet breaks glass, and can do so according to FlansMod, do so.
          if(type.breaksGlass && mat == Material.glass)
View Full Code Here

TOP

Related Classes of com.flansmod.client.debug.EntityDebugDot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.