Examples of collides()


Examples of fr.neatmonster.nocheatplus.utilities.PassableRayTracing.collides()

        PassableRayTracing rt = new PassableRayTracing();
        rt.setBlockCache(bc);
        double[] coords = new double[]{0.5, 0.5, -0.5, 0.5, 0.5, 1.5};
        rt.set(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]);
        rt.loop();
        if (rt.collides()) {
            TestRayTracing.doFail("Expect not to collide when moving through a block.", coords);
        }
        if (rt.getStepsDone() > 4) {
            TestRayTracing.doFail("Expect less than 4 steps for moving straight through a block of air.", coords);
        }
View Full Code Here

Examples of games.stendhal.server.core.engine.StendhalRPZone.collides()

      if (action.has(CREATURE) && action.has(X) && action.has(Y)) {
        final StendhalRPZone zone = player.getZone();
        final int x = action.getInt(X);
        final int y = action.getInt(Y);
       
        if (!zone.collides(player, x, y)) {
          final EntityFactory factory = new EntityFactory(player) {
            @Override
            void found(final String type, final Entity entity) {
               final Entity entityToBePlaced;
              if (manager.isCreature(type)) { 
View Full Code Here

Examples of games.stendhal.server.core.engine.StendhalRPZone.collides()

      final int x = rpEntity.getX() + dir.getdx();
      final int y = rpEntity.getY() + dir.getdy();

      final StendhalRPZone zone = player.getZone();
      if (!zone.collides(rpEntity, x, y)) {
        move(player, rpEntity, x, y);
        // Stop players running toward to make trapping harder. Don't
        // stop anyone just following a path (again to make annoying
        // others harder)
        if (dir.oppositeDirection() == rpEntity.getDirection()
View Full Code Here

Examples of games.stendhal.server.core.engine.StendhalRPZone.collides()

          // done checking all of the border
          break;
        }
       
        boolean zCollides = zone.collides(zoneX, zoneY);
        boolean nCollides = neighbour.collides(neighbourX, neighbourY);
       
        if (zCollides != nCollides) {
          badness++;
          if (badness >= badnessThreshold) {
            problems.add(collidesMessage(zone.getName(), zoneX, zoneY, zCollides)
View Full Code Here

Examples of games.stendhal.server.core.engine.StendhalRPZone.collides()

        // checking if EntityManager knows about this creature type.
        final Creature tempCreature = new Creature((Creature) manager.getEntity(RAT_TYPES.get(tc)));
        final Creature rat = new Creature(tempCreature.getNewInstance());

        // chosen place is occupied
        if (zone.collides(rat,x,y)) {
          // Could not place the creature here.
          // Treat it like it was never exists.
          logger.debug("RATS " + zone.getName() + " " + x + " " + y + " collided.");
          continue;
        } else if (zone.getName().startsWith("0")) {
View Full Code Here

Examples of shapes.ADXPoint.collides()

      selected = false;
      return;
    }
   
    ADXPoint p = new ADXPoint(input.getMouseX(), input.getMouseY());
    hovered = p.collides(r);
    mouseDown = hovered && input.getButton(ADXInput.MOUSE_LEFT);
    if (!clickOver) {
      clicked = hovered && input.getButtonReleased(ADXInput.MOUSE_LEFT) || (selected && input.getKeyPressed(Keyboard.KEY_RETURN));
    } else {
      clickOver = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.