Package fr.neatmonster.nocheatplus.checks.moving

Examples of fr.neatmonster.nocheatplus.checks.moving.MovingData


        boolean cancel = false;
   
    final float mcFallDistance = player.getFallDistance();
    final MovingConfig mCc = MovingConfig.getConfig(player);
    if (mcFallDistance > 0.0 && cc.debug && player.hasPermission(Permissions.ADMINISTRATION_DEBUG)){
      final MovingData mData = MovingData.getData(player);
     
      if (MovingListener.shouldCheckSurvivalFly(player, mData, mCc) && CheckType.MOVING_NOFALL.isEnabled(player)){
        // TODO: Set max y in MovingListener, to be independent of sf/nofall!
        player.sendMessage("Critical: fd=" + mcFallDistance + "(" + mData.noFallFallDistance +") y=" + loc.getY() + ((mData.hasSetBack() && mData.getSetBackY() < mData.noFallMaxY) ? (" jumped=" + StringUtil.fdec3.format(mData.noFallMaxY - mData.getSetBackY())): ""));
      }
    }

        // Check if the hit was a critical hit (positive fall distance, entity in the air, not on ladder, not in liquid
        // and without blindness effect).
   
    // TODO: Skip the on-ground check somehow?
    // TODO: Implement low jump penalty.
        if (mcFallDistance > 0f && !player.hasPotionEffect(PotionEffectType.BLINDNESS)){
          // Might be a violation.
          final MovingData dataM = MovingData.getData(player);
          if (dataM.sfLowJump || player.getFallDistance() < cc.criticalFallDistance && !BlockProperties.isOnGroundOrResetCond(player, loc, mCc.yOnGround)){
            final MovingConfig ccM = MovingConfig.getConfig(player);
              if (MovingListener.shouldCheckSurvivalFly(player, dataM, ccM)){
                    final double deltaFallDistance = (cc.criticalFallDistance - player.getFallDistance()) / cc.criticalFallDistance;
                    // TODO: Cleanup: velocity is more like the gravity constant.
View Full Code Here


      // TODO: Use stored distance calculation same as reach check?
      // TODO: For pvp: make use of "player was there" heuristic later on.
      // TODO: Confine further with simple pre-conditions.
      // TODO: Evaluate if moving traces can help here.
      if (!cancelled && TrigUtil.distance(loc.getX(), loc.getZ(), damagedLoc.getX(), damagedLoc.getZ()) < 4.5){
        final MovingData mData = MovingData.getData(player);
      // Check if fly checks is an issue at all, re-check "real sprinting".
        if (mData.fromX != Double.MAX_VALUE && mData.mediumLiftOff != MediumLiftOff.LIMIT_JUMP){
          final double hDist = TrigUtil.distance(loc.getX(), loc.getZ(), mData.fromX, mData.fromZ);
          if (hDist >= 0.23) {
            // TODO: Might need to check hDist relative to speed / modifiers.
View Full Code Here

TOP

Related Classes of fr.neatmonster.nocheatplus.checks.moving.MovingData

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.