Package com.bergerkiller.bukkit.common.bases

Examples of com.bergerkiller.bukkit.common.bases.IntVector2


      newChunksBuffer.clear();
      for (MinecartMember<?> mm : this) {
        mm.updateChunks(previousChunksBuffer, newChunksBuffer);
      }
      int cx, cz;
      IntVector2 chunk;
      final World world = getWorld();
      Iterator<IntVector2> iter;
      if (this.canUnload()) {
        // Check whether the new chunks are unloaded
        iter = newChunksBuffer.iterator();
View Full Code Here


    this.z = z;
    int cx, cz;
    int i = 0;
    for (cx = -CHUNK_RANGE; cx <= CHUNK_RANGE; cx++) {
      for (cz = -CHUNK_RANGE; cz <= CHUNK_RANGE; cz++) {
        chunks[i++] = new IntVector2(x + cx, z + cz);
      }
    }
  }
View Full Code Here

    }
    // Limit radius
    radWidth = MathUtil.clamp(radWidth, TrainCarts.maxTransferRadius);
    radHeight = MathUtil.clamp(radHeight, TrainCarts.maxTransferRadius);
    // Done
    return new IntVector2(radWidth, radHeight);
  }
View Full Code Here

    if (typesToCheck.isEmpty()) {
      return Collections.emptyList();
    }

    // Parse radius width and height (negative allowed for reversed sorting)
    IntVector2 radius = readRadius(info.getLine(1));

    // Get the blocks to collect/deposit using radiuses previously parsed
    Collection<BlockState> found = TransferSignUtil.getBlockStates(info, radius);
    if (found.isEmpty()) {
      return Collections.emptyList();
View Full Code Here

    // I added this for some reason, if this reason is found, please look into a way of fixing the bugs
    //CommonNMS.getNative(getWorld()).getPlayerChunkMap().movePlayer(getHandle(EntityPlayer.class));

    // Instantly send the chunk the vehicle is currently in
    // This avoid the player losing track of the vehicle because the chunk is missing
    final IntVector2 chunk = loc.xz.chunk();
    if (getChunkSendQueue().remove(chunk)) {
      PacketUtil.sendChunk(getEntity(), getWorld().getChunkAt(chunk.x, chunk.z));
    }

    // Tell all other entities to send spawn packets
View Full Code Here

  public VectorXZAbstract set(VectorXZAbstract value) {
    return set(value.getX(), value.getZ());
  }

  public IntVector2 floor() {
    return new IntVector2(x.getFloor(), z.getFloor());
  }
View Full Code Here

  public IntVector2 floor() {
    return new IntVector2(x.getFloor(), z.getFloor());
  }
 
  public IntVector2 toBlock() {
    return new IntVector2(x.block(), z.block());
  }
View Full Code Here

    z.fixNaN(defz);
    return this;
  }

  public IntVector2 chunk() {
    return new IntVector2(x.chunk(), z.chunk());
  }
View Full Code Here

    return new ChunkCoordIntPair(x, z);
  }

  public static IntVector2 getPair(Object chunkCoordIntPair) {
    ChunkCoordIntPair pair = (ChunkCoordIntPair) chunkCoordIntPair;
    return new IntVector2(pair.x, pair.z);
  }
View Full Code Here

TOP

Related Classes of com.bergerkiller.bukkit.common.bases.IntVector2

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.