Package net.minecraft.world

Examples of net.minecraft.world.ChunkPosition


     * Strongly favors positive y positions.
     */
    @Override
    public ChunkPosition findBiomePosition (int par1, int par2, int par3, List par4List, Random par5Random)
    {
        return par4List.contains(this.biomeGenerator) ? new ChunkPosition(par1 - par3 + par5Random.nextInt(par3 * 2 + 1), 0, par2 - par3 + par5Random.nextInt(par3 * 2 + 1)) : null;
    }
View Full Code Here


                double var8 = (1.25D * (double) var6 + random.nextDouble()) * this.distance * (double) var6;
                int var10 = (int) Math.round(Math.cos(randomNumBetween0and2PI) * var8);
                int var11 = (int) Math.round(Math.sin(randomNumBetween0and2PI) * var8);
                ArrayList var12 = new ArrayList();
                Collections.addAll(var12, this.allowedBiomeGenBases);
                ChunkPosition var13 = this.worldObj.getWorldChunkManager().findBiomePosition((var10 << 4) + 8, (var11 << 4) + 8, 112, var12, random);

                if (var13 != null)
                {
                    var10 = var13.chunkPosX >> 4;
                    var11 = var13.chunkPosZ >> 4;
View Full Code Here

        int m = paramInt2 + paramInt3 >> 2;

        int n = k - i + 1;
        int i1 = m - j + 1;
        int[] arrayOfInt = this.biomeGenerator.getBiomesUnZoomed(null, i, j, n, i1, OutputType.DEFAULT_FOR_WORLD);
        ChunkPosition localChunkPosition = null;
        int i2 = 0;
        for (int i3 = 0; i3 < arrayOfInt.length; i3++)
        {
            if (arrayOfInt[i3] >= DefaultBiome.values().length)
                continue;
            int i4 = i + i3 % n << 2;
            int i5 = j + i3 / n << 2;
            BiomeGenBase localBiomeBase = BiomeGenBase.getBiome(arrayOfInt[i3]);
            if ((!paramList.contains(localBiomeBase)) || ((localChunkPosition != null) && (paramRandom.nextInt(i2 + 1) != 0)))
                continue;
            localChunkPosition = new ChunkPosition(i4, 0, i5);
            i2++;
        }

        return localChunkPosition;
    }
View Full Code Here

        if(hit == null || hit.typeOfHit != MovingObjectType.BLOCK)
        {
            return null;
        }
       
        return new ChunkPosition(hit.blockX, hit.blockY, hit.blockZ);
    }
View Full Code Here

        final int var10 = var8 - var6 + 1;

        final int var16 = var6 + 0 % var10 << 2;
        final int var17 = var7 + 0 / var10 << 2;

        return new ChunkPosition(var16, 0, var17);
    }
View Full Code Here

                            float f3 = exploder != null ? exploder.func_145772_a(this, worldObj, l, i1, j1, block) : block.getExplosionResistance(exploder, worldObj, l, i1, j1, explosionX, explosionY, explosionZ);
                            f1 -= (f3 + 0.3F) * f2;

                            if (f1 > 0.0F && (exploder == null || exploder.func_145774_a(this, worldObj, l, i1, j1, block, f1)))
                            {
                                hashset.add(new ChunkPosition(l, i1, j1));
                            }

                            d0 += d3 * f2;
                            d1 += d4 * f2;
                            d2 += d5 * f2;
 
View Full Code Here

        {
            worldObj.spawnParticle("largeexplode", explosionX, explosionY, explosionZ, 1.0D, 0.0D, 0.0D);
        }

        Iterator iterator;
        ChunkPosition chunkposition;
        int i;
        int j;
        int k;
        Block block;
View Full Code Here

            extendedblockstorage.setExtBlockMetadata(x, y & 15, z, id);

            if (block1.hasTileEntity(k1)) {
                TileEntity te = chunk.getTileEntityUnsafe(x & 0x0F, y, z & 0x0F);
                if (te != null) {
                    ChunkPosition chunkposition = new ChunkPosition(x & 0x0F, y, z & 0x0F);
                    te = (TileEntity) chunk.chunkTileEntityMap.remove(chunkposition);
                    te.invalidate(); //urk hopefully this doesn't explode anything
                }
            }
View Full Code Here

        myChunks[cx][cz] = c;

        rwarTiles.addAll( ((HashMap<ChunkPosition, TileEntity>) c.chunkTileEntityMap).entrySet() );
        for (Entry<ChunkPosition, TileEntity> tx : rwarTiles)
        {
          ChunkPosition cp = tx.getKey();
          TileEntity te = tx.getValue();
          if ( te.xCoord >= minX && te.xCoord <= maxX && te.yCoord >= minY && te.yCoord <= maxY && te.zCoord >= minZ && te.zCoord <= maxZ )
          {
            if ( mr.askToMove( te ) )
            {
View Full Code Here

    if (FMLCommonHandler.instance().getEffectiveSide().isClient()) {
      return;
    }

    Explosion explosion = new Explosion(world, null, x + .5, y + .5, z + .5, 3f);
    explosion.affectedBlockPositions.add(new ChunkPosition(x, y, z));
    explosion.doExplosionB(true);

    for (EntityPlayer player : (List<EntityPlayer>) world.playerEntities) {
      if (!(player instanceof EntityPlayerMP)) {
        continue;
View Full Code Here

TOP

Related Classes of net.minecraft.world.ChunkPosition

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.