Package net.minecraft.util

Examples of net.minecraft.util.ChunkCoordinates


                    break;
                }
            }
            break;
        case S_WAKE_PLAYER:
            ChunkCoordinates c = playerBase.playerLocation;

            if (c != null)
            {
                EventWakePlayer event = new EventWakePlayer(playerBase, c.posX, c.posY, c.posZ, false, true, true, true);
                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

        }
        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, MarsBlocks.tier2TreasureChest, 0))
        {
            this.chests.add(new ChunkCoordinates(hx, this.posY, hz));
        }
    }
View Full Code Here

    }

    @SubscribeEvent
    public void onPlayerWakeUp(EventWakePlayer event)
    {
        ChunkCoordinates c = event.entityPlayer.playerLocation;
        Block blockID = event.entityPlayer.worldObj.getBlock(c.posX, c.posY, c.posZ);
        int metadata = event.entityPlayer.worldObj.getBlockMetadata(c.posX, c.posY, c.posZ);

        if (blockID == MarsBlocks.machine && metadata >= BlockMachineMars.CRYOGENIC_CHAMBER_METADATA)
        {
View Full Code Here

    @SideOnly(Side.CLIENT)
    @SubscribeEvent
    public void onPlayerRotate(RotatePlayerEvent event)
    {
        ChunkCoordinates c = event.entityPlayer.playerLocation;
        Block block = event.entityPlayer.worldObj.getBlock(c.posX, c.posY - 2, c.posZ);
        int metadata = event.entityPlayer.worldObj.getBlockMetadata(c.posX, c.posY - 2, c.posZ);

        if (block == MarsBlocks.machine && metadata >= BlockMachineMars.CRYOGENIC_CHAMBER_METADATA)
        {
View Full Code Here

            {
                this.detachHome();
            }
            else
            {
                ChunkCoordinates chunkcoordinates = this.villageObj.getCenter();
                this.setHomeArea(chunkcoordinates.posX, chunkcoordinates.posY, chunkcoordinates.posZ, (int) (this.villageObj.getVillageRadius() * 0.6F));

                if (this.field_82190_bM)
                {
                    this.field_82190_bM = false;
View Full Code Here

        this.HALLWAY_HEIGHT = hallwayHeight;
    }

    public void generateUsingArrays(World world, long seed, int x, int y, int z, int chunkX, int chunkZ, Block[] blocks, byte[] metas)
    {
        final ChunkCoordinates dungeonCoords = this.getDungeonNear(seed, chunkX, chunkZ);
        if (dungeonCoords != null)
        {
            this.generate(world, new Random(seed * dungeonCoords.posX * dungeonCoords.posZ * 24789), dungeonCoords.posX, y, dungeonCoords.posZ, chunkX, chunkZ, blocks, metas, true);
        }
    }
View Full Code Here

        }
    }

    public void generateUsingSetBlock(World world, long seed, int x, int y, int z)
    {
        final ChunkCoordinates dungeonCoords = this.getDungeonNear(seed, x / 16, y / 16);
        if (dungeonCoords != null)
        {
            this.generate(world, new Random(seed * dungeonCoords.posX * dungeonCoords.posZ * 24789), x, y, z, x, z, null, null, false);
        }
    }
View Full Code Here

        {
            for (int z = j - range; z <= j + range; z++)
            {
                if (this.canGenDungeonAtCoords(worldSeed, x, z))
                {
                    return new ChunkCoordinates(x * 16 + 8, 0, z * 16 + 8);
                }
            }
        }

        return null;
View Full Code Here

                {
                    int i = 30000000;
                    int j = Math.min(i, Math.max(-i, MathHelper.floor_double(player.posX + 0.5D)));
                    int k = Math.min(256, Math.max(0, MathHelper.floor_double(player.posY + 1.5D)));
                    int l = Math.min(i, Math.max(-i, MathHelper.floor_double(player.posZ + 0.5D)));
                    ChunkCoordinates coords = new ChunkCoordinates(j, k, l);
                    player.setSpawnChunk(coords, true, player.worldObj.provider.dimensionId);
                }

                GalacticraftCore.packetPipeline.sendTo(new PacketSimple(EnumSimplePacket.C_RESET_THIRD_PERSON, new Object[] { }), player);
            }
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.