Examples of ChunkPosition


Examples of net.minecraft.world.ChunkPosition

    @Override
    public boolean interact(EntityPlayer player){
        ItemStack equippedItem = player.getCurrentEquippedItem();
        if(!worldObj.isRemote && equippedItem != null) {
            if(equippedItem.getItem() == Itemss.GPSTool) {
                ChunkPosition gpsLoc = ItemGPSTool.getGPSLocation(equippedItem);
                if(gpsLoc != null) {
                    getNavigator().tryMoveToXYZ(gpsLoc.chunkPosX, gpsLoc.chunkPosY, gpsLoc.chunkPosZ, 0.1D);
                }
            }
        }
View Full Code Here

Examples of net.minecraft.world.ChunkPosition

        }
        return areaTypes;
    }

    public void addArea(int x, int y, int z){
        area.add(new ChunkPosition(x, y, z));
    }
View Full Code Here

Examples of net.minecraft.world.ChunkPosition

    public void addArea(int x1, int y1, int z1, int x2, int y2, int z2, String areaType) throws IllegalArgumentException{
        area.addAll(getArea(x1, y1, z1, x2, y2, z2, areaType));
    }

    public void removeArea(int x, int y, int z){
        area.remove(new ChunkPosition(x, y, z));
    }
View Full Code Here

Examples of se.llbit.chunky.world.ChunkPosition

          for (int sx = x-1; sx <= x+1; ++sx) {
            int wx = cp.x*16 + sx;
            for (int sz = z-1; sz <= z+1; ++sz) {
              int wz = cp.z*16 + sz;

              ChunkPosition ccp = ChunkPosition.get(wx >> 4, wz >> 4);
              if (chunkSet.contains(ccp)) {
                nsum += 1;
                int biomeId = biomeIdMap.get(wx, wz);
                float[] grassColor = Biomes.getGrassColorLinear(biomeId);
                grassMix[0] += grassColor[0];
View Full Code Here

Examples of se.llbit.chunky.world.ChunkPosition

          }
          if (containsRegion) {
            next = ChunkPosition.get(cx, cz);
            return;
          } else {
            ChunkPosition chunk = ChunkPosition.get(cx, cz);
            if (chunks.contains(chunk)) {
              next = chunk;
              return;
            }
          }
        }
        next = null;
      }

      @Override
      public boolean hasNext() {
        return next != null;
      }

      @Override
      public ChunkPosition next() {
        ChunkPosition pos = next;
        findNext();
        return pos;
      }

      @Override
View Full Code Here

Examples of se.llbit.chunky.world.ChunkPosition

import se.llbit.chunky.world.ChunkPosition;

public class Test {

  public static void main(String[] args) {
    ChunkPosition cp;
    cp = ChunkPosition.get(17179869197L);
    System.out.println(cp.toString());
    cp = ChunkPosition.get(8589934606L);
    System.out.println(cp.toString());
    cp = ChunkPosition.get(8589934605L);
    System.out.println(cp.toString());
    cp = ChunkPosition.get(17179869198L);
    System.out.println(cp.toString());
    cp = ChunkPosition.get(12884901902L);
    System.out.println(cp.toString());
    cp = ChunkPosition.get(12884901901L);
    System.out.println(cp.toString());
  }
View Full Code Here

Examples of se.llbit.chunky.world.ChunkPosition

      if (dx == 0 && dy == 0) {
        return;
      }

      ChunkPosition chunk = getChunk(e);
      if (chunk != end) {
        end = chunk;
        repaint();
      }
View Full Code Here

Examples of se.llbit.chunky.world.ChunkPosition

      }
    }

    @Override
    public void mouseMoved(MouseEvent e) {
      ChunkPosition chunk = getChunk(e);
      if (chunk != start) {
        start = chunk;
        end = chunk;
        repaint();
      }
View Full Code Here

Examples of se.llbit.chunky.world.ChunkPosition

      int cz = (int) QuickMath.floor(z);
      int bx = (int) QuickMath.floor((x-cx)*16);
      int bz = (int) QuickMath.floor((z-cz)*16);
      bx = Math.max(0, Math.min(Chunk.X_MAX-1, bx));
      bz = Math.max(0, Math.min(Chunk.Z_MAX-1, bz));
      ChunkPosition cp = ChunkPosition.get(cx, cz);
      Chunk hoveredChunk = chunky.getWorld().getChunk(cp);
      if (!hoveredChunk.isEmpty()) {
        mapLabel.setText(String.format("%s, biome: %s",
            ""+hoveredChunk.toString(),
            hoveredChunk.biomeAt(bx, bz)));
View Full Code Here

Examples of se.llbit.chunky.world.ChunkPosition

    }
  }

  protected synchronized void selectWithinRect() {
    if (selectRect) {
      ChunkPosition cp0 = start;
      ChunkPosition cp1 = end;
      int x0 = Math.min(cp0.x, cp1.x);
      int x1 = Math.max(cp0.x, cp1.x);
      int z0 = Math.min(cp0.z, cp1.z);
      int z1 = Math.max(cp0.z, cp1.z);
      chunky.selectChunks(x0, x1, z0, z1);
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.