Package net.minecraft.util

Examples of net.minecraft.util.ChunkCoordinates


            }
        }

        final int hx = (this.posX + this.posX + this.sizeX) / 2;
        final int hz = (this.posZ + this.posZ + this.sizeZ) / 2;
        this.spawnerCoords = new ChunkCoordinates(hx, this.posY + 2, hz);
    }
View Full Code Here


                }
            }
        }
        if (this.placeBlock(chunk, meta, this.posX + 1, this.posY - 1, this.posZ + 1, cx, cz, Blocks.mob_spawner, 0))
        {
            this.spawners.add(new ChunkCoordinates(this.posX + 1, this.posY - 1, this.posZ + 1));
        }
        if (this.placeBlock(chunk, meta, this.posX + this.sizeX - 1, this.posY - 1, this.posZ + this.sizeZ - 1, cx, cz, Blocks.mob_spawner, 0))
        {
            this.spawners.add(new ChunkCoordinates(this.posX + this.sizeX - 1, this.posY - 1, this.posZ + this.sizeZ - 1));
        }
    }
View Full Code Here

        }
    }

    public boolean wakeUpPlayer(EntityPlayerSP player, boolean par1, boolean par2, boolean par3, boolean bypass)
    {
        ChunkCoordinates c = player.playerLocation;

        if (c != null)
        {
            EventWakePlayer event = new EventWakePlayer(player, c.posX, c.posY, c.posZ, par1, par2, par3, bypass);
            MinecraftForge.EVENT_BUS.post(event);
View Full Code Here

        }
        final int hx = (this.posX + this.posX + this.sizeX) / 2;
        final int hz = (this.posZ + this.posZ + this.sizeZ) / 2;
        if (this.placeBlock(chunk, meta, hx, this.posY, hz, cx, cz, Blocks.chest, 0))
        {
            this.chests.add(new ChunkCoordinates(hx, this.posY, hz));
        }
    }
View Full Code Here

        }
    }

    public boolean wakeUpPlayer(EntityPlayerMP player, boolean par1, boolean par2, boolean par3, boolean bypass)
    {
        ChunkCoordinates c = player.playerLocation;

        if (c != null)
        {
            EventWakePlayer event = new EventWakePlayer(player, c.posX, c.posY, c.posZ, par1, par2, par3, bypass);
            MinecraftForge.EVENT_BUS.post(event);
View Full Code Here

            }
        }

        final int hx = (this.posX + this.posX + this.sizeX) / 2;
        final int hz = (this.posZ + this.posZ + this.sizeZ) / 2;
        this.spawnerCoords = new ChunkCoordinates(hx, this.posY + 2, hz);
    }
View Full Code Here

        final int hx = (this.posX + this.posX + this.sizeX) / 2;
        final int hz = (this.posZ + this.posZ + this.sizeZ) / 2;

        if (this.placeBlock(chunk, meta, hx, this.posY, hz, cx, cz, GCBlocks.treasureChestTier1, 0))
        {
            this.chests.add(new ChunkCoordinates(hx, this.posY, hz));
        }
    }
View Full Code Here

    @Override
    public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
    {
        if (player.isSneaking())
            return false;
        player.setSpawnChunk(new ChunkCoordinates(x, y, z), false, world.provider.dimensionId);

        if (!world.isRemote)
            player.addChatMessage(player.func_145748_c_().appendText("Spawn point set!"));
        world.setBlockMetadataWithNotify(x, y, z, 1, 3);
        world.playSound(x + 0.5D, y + 0.5D, z + 0.5D, "portal.portal", 1.0F, Natura.random.nextFloat() * 0.4F + 0.8F, false);
View Full Code Here

    Integer chunkZ = z >> 4;
   
    for (int x1 = chunkX.intValue() - range; x1 <= chunkX.intValue() + range; x1++) {
      for (int z1 = chunkZ.intValue() - range; z1 <= chunkZ.intValue() + range; z1++) {
       
        ChunkCoordinates chunkcoordinates = world.getSpawnPoint();
              int k = x1 * 16 + 8 - chunkcoordinates.posX;
              int l = z1 * 16 + 8 - chunkcoordinates.posZ;
              short short1 = 128;

              if (k < -short1 || k > short1 || l < -short1 || l > short1){
View Full Code Here

            if(t != null)
                wbr.ticket = t;
            else
                wbr.ticket = ForgeChunkManager.requestTicket(DynmapMod.instance, w, ForgeChunkManager.Type.NORMAL);
            if(wbr.ticket != null) {
                ChunkCoordinates cc = w.getSpawnPoint();
                ChunkCoordIntPair ccip = new ChunkCoordIntPair(cc.posX >> 4, cc.posZ >> 4);
                ForgeChunkManager.forceChunk(wbr.ticket, ccip);
                busy_worlds.put(w.provider.dimensionId, wbr)// Add to busy list
            }
        }
View Full Code Here

TOP

Related Classes of net.minecraft.util.ChunkCoordinates

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.