Examples of canPlaceBlockAt()


Examples of net.minecraft.block.Block.canPlaceBlockAt()

          //Prevent the passenger from popping off. Not sent to clients.
          worldObj.setBlock(targetX, yCoord, targetZ, Block.getBlockFromName("stone"), 0, 0);
          //Move non-TE blocks
          Block passengerId = worldObj.getBlock(xCoord, yCoord + 1, zCoord);

          if (worldObj.isAirBlock(xCoord, yCoord + 1, zCoord) || passengerId.canPlaceBlockAt(worldObj, targetX, yCoord + 1, targetZ)) {

            if (passenger == null) {
              if (passengerId != Block.getBlockFromName("bedrock") && passengerId != Block.getBlockFromName("")) {
                worldObj.setBlock(targetX, yCoord + 1, targetZ, passengerId, worldObj.getBlockMetadata(xCoord, yCoord + 1, zCoord), 3);
                if (passengerId != Block.getBlockFromName("air") && passengerId != Block.getBlockFromName("piston_head")) {
View Full Code Here

Examples of net.minecraft.block.Block.canPlaceBlockAt()

        }
        if (!player.canPlayerEdit(x, y, z, side, itemstack) || !player.canPlayerEdit(x, y + 1, z, side, itemstack))
        {
            return false;
        }
        if (!block.canPlaceBlockAt(world, x, y, z))
        {
            return false;
        }
        else
        {
View Full Code Here

Examples of net.minecraft.block.Block.canPlaceBlockAt()

            if(blockToPlace != null) {
              if(blockToPlace instanceof ISpecialFlower)
                return;

              ChunkCoordinates coords = validPositions.get(supertile.getWorldObj().rand.nextInt(validPositions.size()));
              if(blockToPlace.canPlaceBlockAt(supertile.getWorldObj(), coords.posX, coords.posY, coords.posZ)) {
                supertile.getWorldObj().setBlock(coords.posX, coords.posY, coords.posZ, blockToPlace, stack.getItemDamage(), 1 | 2);
                if(ConfigHandler.blockBreakParticles)
                  supertile.getWorldObj().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(blockToPlace) + (stack.getItemDamage() << 12));
                validPositions.remove(coords);
View Full Code Here

Examples of net.minecraft.block.Block.canPlaceBlockAt()

        if (b == Blocks.snow && (world.getBlockMetadata(x, y, z) & 7) < 1)
        {
            side = 1;
        }
        else if (b != Blocks.vine && b != Blocks.tallgrass && b != Blocks.deadbush && (b == null || !b.canPlaceBlockAt(world, x, y, z)))
        {
            if (side == 0)
            {
                --y;
            }
View Full Code Here

Examples of net.minecraft.block.Block.canPlaceBlockAt()

    }

    protected void setBlockAndMetadata (World world, int x, int y, int z, Block blockID, int blockMeta)
    {
        Block block = world.getBlock(x, y, z);
        if (block == null || block.canPlaceBlockAt(world, x, y, z))
        {
            if (this.notify)
            {
                world.setBlock(x, y, z, blockID, blockMeta, 3);
            }
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.