Examples of asInt()


Examples of com.sk89q.jnbt.CompoundTag.asInt()

            boolean hasTilePosition = tag.containsKey("TileX") && tag.containsKey("TileY") && tag.containsKey("TileZ");
            boolean hasDirection = tag.containsKey("Direction");
            boolean hasLegacyDirection = tag.containsKey("Dir");

            if (hasTilePosition) {
                Vector tilePosition = new Vector(tag.asInt("TileX"), tag.asInt("TileY"), tag.asInt("TileZ"));
                Vector newTilePosition = transform.apply(tilePosition.subtract(from)).add(to);

                CompoundTagBuilder builder = tag.createBuilder()
                        .putInt("TileX", newTilePosition.getBlockX())
                        .putInt("TileY", newTilePosition.getBlockY())
View Full Code Here

Examples of com.sk89q.jnbt.CompoundTag.asInt()

            boolean hasTilePosition = tag.containsKey("TileX") && tag.containsKey("TileY") && tag.containsKey("TileZ");
            boolean hasDirection = tag.containsKey("Direction");
            boolean hasLegacyDirection = tag.containsKey("Dir");

            if (hasTilePosition) {
                Vector tilePosition = new Vector(tag.asInt("TileX"), tag.asInt("TileY"), tag.asInt("TileZ"));
                Vector newTilePosition = transform.apply(tilePosition.subtract(from)).add(to);

                CompoundTagBuilder builder = tag.createBuilder()
                        .putInt("TileX", newTilePosition.getBlockX())
                        .putInt("TileY", newTilePosition.getBlockY())
View Full Code Here

Examples of com.sk89q.jnbt.CompoundTag.asInt()

                        .putInt("TileX", newTilePosition.getBlockX())
                        .putInt("TileY", newTilePosition.getBlockY())
                        .putInt("TileZ", newTilePosition.getBlockZ());

                if (hasDirection || hasLegacyDirection) {
                    int d = hasDirection ? tag.asInt("Direction") : MCDirections.fromLegacyHanging((byte) tag.asInt("Dir"));
                    Direction direction = MCDirections.fromHanging(d);

                    if (direction != null) {
                        Vector vector = transform.apply(direction.toVector()).subtract(transform.apply(Vector.ZERO)).normalize();
                        Direction newDirection = Direction.findClosest(vector, Flag.CARDINAL);
View Full Code Here

Examples of com.sk89q.jnbt.CompoundTag.asInt()

                        .putInt("TileX", newTilePosition.getBlockX())
                        .putInt("TileY", newTilePosition.getBlockY())
                        .putInt("TileZ", newTilePosition.getBlockZ());

                if (hasDirection || hasLegacyDirection) {
                    int d = hasDirection ? tag.asInt("Direction") : MCDirections.fromLegacyHanging((byte) tag.asInt("Dir"));
                    Direction direction = MCDirections.fromHanging(d);

                    if (direction != null) {
                        Vector vector = transform.apply(direction.toVector()).subtract(transform.apply(Vector.ZERO)).normalize();
                        Direction newDirection = Direction.findClosest(vector, Flag.CARDINAL);
View Full Code Here

Examples of com.workingdogs.village.Value.asInt()

                    {
                        obj2 = new Short(value.asShort());
                    }
                    if (value.isInt())
                    {
                        obj2 = new Integer(value.asInt());
                    }
                    if (value.isLong())
                    {
                        obj2 = new Long(value.asLong());
                    }
View Full Code Here

Examples of erjang.EObject.asInt()

        ETuple dst = dd.testTuple();

        EObject key = dst.elm(1);
        EObject value = dst.elm(2);
        if (key == X_ATOM) {
          current = current.setx(value.asInt(),
              type == Type.DOUBLE_TYPE ? EDOUBLE_TYPE : type,
                     FV.this);
        } else if (key == Y_ATOM) {
          current = current.sety(value.asInt(),
              type == Type.DOUBLE_TYPE ? EDOUBLE_TYPE : type);
View Full Code Here

Examples of erjang.EObject.asInt()

        if (key == X_ATOM) {
          current = current.setx(value.asInt(),
              type == Type.DOUBLE_TYPE ? EDOUBLE_TYPE : type,
                     FV.this);
        } else if (key == Y_ATOM) {
          current = current.sety(value.asInt(),
              type == Type.DOUBLE_TYPE ? EDOUBLE_TYPE : type);
        } else if (key == FR_ATOM) {
          current = current.setf(value.asInt(), type);
        } else {
          throw new Error("unknown " + dst);
View Full Code Here

Examples of erjang.EObject.asInt()

                     FV.this);
        } else if (key == Y_ATOM) {
          current = current.sety(value.asInt(),
              type == Type.DOUBLE_TYPE ? EDOUBLE_TYPE : type);
        } else if (key == FR_ATOM) {
          current = current.setf(value.asInt(), type);
        } else {
          throw new Error("unknown " + dst);
        }

        return current;
View Full Code Here

Examples of erjang.ESmall.asInt()

    ETuple t = tup.testTuple();
    if (i == null || t == null || i.value < 1 || i.value > t.arity()) {
      throw ERT.badarg(idx, tup);
    }

    return t.elm(i.asInt());
  }

  /*
  @BIF
 
 
View Full Code Here

Examples of net.aufdemrand.denizen.objects.Element.asInt()

            }

            // Report to dB
            dB.report(scriptEntry, getName(), quantity.debug());

            int target = quantity.asInt();
            if (target <= 0)
            {
                dB.echoDebug(scriptEntry, "Zero count, not looping...");
                return;
            }
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.